lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yoav Shapira" <yo...@apache.org>
Subject Re: multiple solr webapps (tentative)
Date Mon, 22 May 2006 11:43:20 GMT
Hola,
There's a few different questions in here.  AFAIK:

- All servlet containers developed over the past ~5 years support at
least read-only JNDI, although it's only strictly required for
complete J2EE servers.

- There are three advantages to using JNDI over straight-up web.xml approaches:
  -- One is the ability to get the configuration data via JNDI using
command-line tools, JMX-driven consoles, and other stuff not specific
to a servlet container.  This allows for more managability and easier
unit-testing outside the container.

  -- The second advantage is easier dynamic changing of these
configuration files: typically to change web.xml you need to reload
the webapp, while changing JNDI does not require such a reload.

  -- Third, using JNDI allows you to specify default values and
override them without changing the WAR file that you distribute your
app in.

So yes, init-params would work, as would context-params, but you would
lose some of the above advantages.  How significant they are for Solr
is up for debate...

Finally:

> Is there an appserver that allows setting java:comp/env from outside
> the webapp but doesn't allow setting context-params?

Yes, in fact it's fairly normal for full J2EE servers to do this. In
general full J2EE servers (as opposed to servlet containers) allow the
admin to dynamically change JNDI resources, but are stricter with
stuff set by the developer like values in web.xml.  Recently they've
become a little less strict, but then again I haven't been using full
J2EE recently... ;)

Yoav


On 5/21/06, Yonik Seeley <yseeley@gmail.com> wrote:
> On 5/21/06, Chris Hostetter <hossman_lucene@fucit.org> wrote:
> >
> > : I just wanted to make sure that JNDI was really the right way to go...
> > : Using those Context xml files in Catalina/localhost would also work
> > : with init-params AFAIK.
> >
> > Aren't init-params and context-params required to be specified in
> > the web.xml?
>
> I meant context-param, not init-param.  I brought it up because Tomcat
> also allows one to specify context-params outside the webapp.
> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
> (search down for context-param).
>
> The upside to context-param is that it's a mandatory part of the servlet spec.
> Is there an advantage to the JNDI approach?
> Is there an appserver that allows setting java:comp/env from outside
> the webapp but doesn't allow setting context-params?
>
> -Yonik
>


-- 
Yoav Shapira
Nimalex LLC
1 Mifflin Place, Suite 310
Cambridge, MA, USA
yoavs@computer.org / www.yoavshapira.com

Mime
View raw message