From: Pifen E. <pif...@wa...> - 2001-04-11 18:53:13
|
Hi, Before I used jboss.xml to specifiy the jndi-name, my servlet can lookup my sessesion bean using; System.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingC ontextFactory"); System.setProperty("java.naming.provider.url","localhost:1099"); InitialContext jndiContext = new InitialContext( System.getProperties() ); or InitialContext jndiContext = new InitialContext(); Object ref = jndiContext.lookup("my bean"); After I specified the jndi-name in jboss.xml and delpoy it, I can only use test client application using main(), not in servlet anymore. ..code snip.. Object ref = jndiContext.lookup("mytest /mybean"); I even put a copy of my ejb jar file under the tomcat\lib directory but still doesn't work. What do I miss??? Thanks Pifen Ellwood |