Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

InitialContext problem  RSS feed

 
Linda Andersson
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I�m working in WSAD and are trying to do a lookup aginst a session bean from a java class in a webproject.

InitialContext ctx = new InitialContext();
Object obj = ctx.lookup("ejb/Db2Connect");
Db2ConnectHome home = (Db2ConnectHome) PortableRemoteObject.narrow(obj, Db2ConnectHome.class);
Db2Connect db2Connect = home.create();
db2Connect.updateDB2();
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So tell us a little more information.

1. Are you getting an Exception? WHat is it? and Post the Exception text here.
2. Is this lookup done on the client or server side?
3. If on the client side, do you have a jndi.properties file that points to your server?

Thanks

Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!