I have developed a Web Dynpro Java Application & the requirement is it should run in background daily in Sap Portal 7.31
For this We have developed a Web dynpro java 7.3 application & created a EJB project for scehduliong job in portal.
Application is working properly & EJB project is working properly,but when we add Web dynpro java application in EJB project & scehdule in portal .it si giving an error.
Once the Application runs on schedule it is giving an "Error" as the Status
This is the code in EJB ,but it is not working...]
public void onJob(JobContext jobContext) throws Exception
{
InitialContext ctx = new InitialContext();
String lookupString = "company.com~grpassign.ear";
Object obj = ctx.lookup(lookupString);
TestComp ejbHome = (TestComp)javax.rmi.PortableRemoteObject.narrow(obj,TestComp.class);
Grpassign ejbHome = (Grpassign)javax.rmi.PortableRemoteObject.narrow(obj,Grpassign.class);
ejbHome.wdDoInit();
}