error in client file for wsad 5.0
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   u_s
Posted On:   Tuesday, January 7, 2003 08:50 AM

Hi I have a small problem here my jndi is not been recognized by wsad 5.0 here is my code which I use to talk and call the session bean inside the project. I did look for the right one but I did not find anything suitable for this to make it work. can anyone help in this..... try { java.util.Properties properties = new java.util.Properties(); properties.put(javax.naming.Context.PROVIDER_URL, "iiop://localhost:9080/"); properties.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory"); javax.naming.InitialContext initCtx = new javax.naming.InitialContext(properties); //InitialContext   More>>

Hi

I have a small problem here my jndi is not been recognized by wsad 5.0 here is my code which I use to talk and call the session bean inside the project. I did look for the right one but I did not find anything suitable for this to make it work.

can anyone help in this.....


try {

java.util.Properties properties = new java.util.Properties();

properties.put(javax.naming.Context.PROVIDER_URL, "iiop://localhost:9080/");

properties.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");


javax.naming.InitialContext initCtx = new javax.naming.InitialContext(properties);


//InitialContext initCtx = new InitialContext();

Object o = initCtx.lookup("ejb/PISessionEJBHome");


if (o == null) {

throw new Exception("ERROR: lookup failed");

}


System.out.println(" narrowing object " + o.getClass().getName());


m_sessionejbhome =(PISessionEJBHome) javax.rmi.PortableRemoteObject.narrow(o, PISessionEJBHome.class);


} catch (Exception e) {

System.out.println(e);

}

   <<Less
About | Sitemap | Contact