> 
> > Copy %JBOSS_HOME%/client/[jboss-client.jar,jboss-common-client.jar,
> > jbosssx-client.jar, jnp-client.jar, jboss-j2ee.jar, and log4j.jar]
to
> > %CATALINA_HOME%/shared/lib.  
>
> Doesn't work.....it still does not pick up my JBoss-specific 
> jndi.properties file.  
> I've got that file in the WEB-INF/classes and the shared/classes 
> directories...to 
> no avail.
>

I use this method instead of using the jndi.properties file.  See my
comments below...

> > This works for me:
> > 
> > // Try to find each of these individual parameters 
> > // and construct the properties
> > // object appropriately
> > java.util.Properties p = new java.util.Properties();
> > 
> > p.put(InitialContext.INITIAL_CONTEXT_FACTORY,
> >   "org.jnp.interfaces.NamingContextFactory");
> > p.put(InitialContext.URL_PKG_PREFIXES,
> >             "org.jboss.naming:org.jnp.interfaces");
> > p.put(InitialContext.PROVIDER_URL,"yourservername");
> > InitialContext context = new InitialContext(p);
> > 
> > 
> > After that you can do your EJB lookup's with that context.
>
> That works for me too Michael....has for some time now.  The issue I
have > with 
> it is that I don't want to hard-code the JBoss server URL's and such
into > my 
> code, since then the servlet can't be deployed by others with
different 
> setups 
> without a code change and a recompile.
>
> What I am trying to figure out is how to just do a:
>
>    InitialContext context = new InitialContext();
>
> call...without the hardcoded properties object....and have it pick up
the 
> properties from the jndi.properties file...like it's supposed to.
>
>

I ran into the same problem and decided to address this by making all of
the parameters JNDI environment variables and configuring those params
in my web.xml file.  I can easily change the configuration by commenting
out or changing the environment entries in my web.xml file.  Eventually,
I want to run with the integrated JBoss and Tomcat solution, but I had
some problems with them running together and decided to run them
separately and use this configuration until I can get the integrated
solution running correctly.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to