hi!

i've successfully deployed a stateless session bean on my jboss server. on
another server i'm running an web application under apache/tomcat. from my
webapplication (from within a javabean) i would like to get a connection to
my ejb with the following lines:

                InitialContext jndiContext = new InitialContext();
                logger.debug("got context");

                // Get a reference to the Interest Bean
                Object ref  = jndiContext.lookup("KundenModulServices");
                logger.debug("got reference");

                // Get a reference from this to the Bean's Home interface
                KundenModulServicesHome home = (KundenModulServicesHome)
                PortableRemoteObject.narrow(ref,
KundenModulServicesHome.class);

                // Create an Interest object from the Home interface
                kundenModulServices = home.create();
                logger.debug("ejb created");

the result is this error:
 
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file:  java.naming.factory.initial

i think the jndi.properties file is not found?!

but: i put the jndi.properties in the WEB-INF/classes directory where all my
other property files reside.

i've tested the above code  as a standalone client application. i've
deployed the test client on my web server and the connection was
established!

Is there another way to specify the needed information?????

please give me a hint....

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to