there is another way to provide the information, but what you're trying to
do is much "better". An alternative is to use the InitialContext
constructor that takes a Hashtable (?) as an argument, and set the
key-value pairs in the hashtable instead of the properties file. BUT -
what you are doing is much better, so dont do what I just said (o:
second point - is there any reason you're not running embedded tomcat -
this would also remove the need to worry about it, as the properties are
already set for you. afaik there are no drawbacks to running
embeddedtomcat - you can still run apache in front of it, and use
whichever apache-tomcat connector you want.
to answer you real question though - from the sounds of what you've done,
everything should be ok _unless_ there is another jndi.properties file in
your classpath somewhere...? I dont know - thats the only thing I can
think of.
cheesr
dim
On Thu, 13 Sep 2001, Scheil, Sven wrote:
> 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
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user