In a servlet running under tomcat4.0.4,
I have to access to an ejb home interface installed on jboss 3.0.0 this is my code:
Properties.setProperty "java.naming.provider.url" , "localhost" ) ;
Properties . setProperty ( "java.naming.factory.initial" , "org.jnp.interfaces.NamingContextFactory" ) ;
Properties . setProperty ( "java.naming.factory.url.pkgs" ,"org.jboss.naming:org.jnp.interfaces" ) ;
InitialContext jndiContext = new InitialContext(Properties);
Object obj = jndiContext.lookup ("NameClassHome")
I tried putting jndi.properties with the same settings in tomcat classpath and calling the default constructor of InitialContext but doesn't match: this attempt tries to access to Tomcat context.
Can anyone help me?
Thanks in advance