• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

WAS6.0 EJBs

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am running WebSphere 6. I am trying to do a lookup on an EJB. My code sample:

Properties prop = new Properties();
prop.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
prop.setProperty(Context.PROVIDER_URL, "iiop://localhost:2809/");
javax.naming.InitialContext ctx = new InitialContext(prop);
Object obj = ctx.lookup("cell/nodes/localhost/servers/server1/ejb/Manager");
ManagerHome ejbHome = (ManagerHome)
PortableRemoteObject.narrow(obj,ManagerHome.class);


I get a ClassNotFoundException with 'WsnInitialContextFactory'. Because it is not in my classpath.

But where do I find the jar file that contains the 'WsnInitialContextFactory' class? What is it called, and where can I download it? Or am I supposed to use a different initial context factory class with WAS6? If so what?

Thanks in advance
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the .jar you are searching for is "naming.jar".

It is in the <WAS folder>/lib
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic