tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lionel Crine <lcr...@linagora.com>
Subject Re: context-param vs env-entry. Ready? Fight!
Date Thu, 06 Sep 2007 17:42:25 GMT
Hello,


IMO, you should use JNDI variable (env) instead of (context variable).
In that case, there will be no link the application server and you'll 
can deploy your application on another server.

Of course, you ll have to define the JNDI variable in a different way. 
But most important, you'll don't have to change your java classes 
because the JNDI tree will stay the same.






Lionel CRINE - GROUPE LINAGORA
Open Source Software Engineer
Tel. : 01 58 18 68 28 - Fax : 01 58 18 68 29
www.linagora.com / www.linagora.org


Tim Funk a écrit :
> Sort of. I mean any java class which saves, loads, or gets data from 
> somewhere and thus requires configuration at some time. Using IOC you 
> can hand wave around those configuration issues and having one "smarter" 
> class dependent on the servlet api which configures the rest of your 
> beans is OK.
> 
> -Tim
> 
> Brian Munroe wrote:
>> On 8/31/07, Tim Funk <funkman@joedog.org> wrote:
>>
>>> Do you really want code that has nothing to do with the servlet api
>>> dependent on ServletContext? Plugging in a new jndi lookup for testing
>>> is much easier.
>>>
>>
>> Forgive my ignorance here, but do you mean, say, in a bean?  That
>> doesn't inherit the servlet's scope?  I've never tried it because I
>> always use JNDI :)
>>
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message