I want to access remote EJB from my Portal Service.
the EJB and the portal Service run on a separated machines.
here is what i wrote:
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sap.engine.services.jndi.InitialContextFactoryImpl");
properties.put(Context.PROVIDER_URL, "p030633:50004");
InitialContext context = new InitialContext(properties);
String name = "sap.com/GDS/GtinManager";
GtinManagerHome home = (GtinManagerHome)
javax.rmi.PortableRemoteObject.narrow.narrow(
context.lookup(name), GtinManagerHome.class);
gm = (GtinManager)home.create();
i run this code from java application and it works.
but in portal i get this error:
"com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at GDS, the whole lookup name is sap.com/GDS/GtinManager."
Thanks
Raja
Hello,
if you NW 04 SP7 or higher, please look this document
https://www.sdn.sap.com/sdn/index.sdn?contenttype=url&content=/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how to access an ejb from a portal component.mht
else in EP6 SP2, it is more difficult to access to an EJB because the portal have an other classloader sysem and other JNDI context
Best Regards,
Fabrice
Add a comment