Hi All,
I created a EJB DC project and trying to invoke through Webdynpro DC Project. I am using NWDS CE 7.11.
1. Entity Forwarding was enabled in EJB in Development Infrastructure.
2. Public part was added to ear
3. In webdynpro Dc project - the ear was added as the Dependency.
4. Add the ejb20 jar files to the DC Project External Libraries.
Context Initial_Context = new InitialContext();
InitialContext ctx = new InitialContext();
String Look_Up_String = "demo.sap.com/empname_ear/Empname_ejbBean";
obj = ctx.lookup(Look_Up_String);
Empname_ejbHome home = (Empname_ejbHome)javax.rmi.PortableRemoteObject.narrow(obj,Empname_ejbHome.class);
But when i write the code to get the Bean methods, i am unable to see the EJB Name.
empname_ejb localobject = home.create();
In the above line, i am unable to see "employeename_ejb" .
The Look Up string is correct as i got the JNDI Name from SAP NWA.
What else i required? Please do help me in this.
Thanks and Regards,
Divya
Plw
Hi Divya,
It seems that your EJB is not exposed as a public part.
Go to your ejbmodule.
Click on Windows->Show View->Development Infrastructure->Component Properties->Public Parts->Add the EJBs which you
want to expose to the other DC.
Hope this helps to solve the problem.
Regards,
Radhika
Add a comment