Re: [OT] context-param vs env-entry. Ready? Fight!

2007-09-07 Thread Brian Munroe
On 9/6/07, Christopher Schultz [EMAIL PROTECTED] wrote: Finally Martin Fowler said dependency injection, and nobody ever had to worry about programs making any kind of sense ever again. And it was Good (for hourly contractors!) That's it, I'm going back to Perl CGI application development!

Re: context-param vs env-entry. Ready? Fight!

2007-09-06 Thread Lionel Crine
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,

Re: context-param vs env-entry. Ready? Fight!

2007-09-06 Thread Brian Munroe
On 9/6/07, Lionel Crine [EMAIL PROTECTED] wrote: 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. Yep, that is what I am pushing for (JNDI) -- brian

Re: [OT] context-param vs env-entry. Ready? Fight!

2007-09-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian, In The Beginning, there was only global scope, and it was Good. Then someone said, nested scopes would be really convenient, so we don't have to manage stacks ourselves, and the nested scope was created, and it was Good. Then someone else

Re: context-param vs env-entry. Ready? Fight!

2007-08-31 Thread Tim Funk
context-param requires access to the servlet context. env-entry requires access to jndi 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. -Tim Brian Munroe wrote: I just started to help

Re: context-param vs env-entry. Ready? Fight!

2007-08-31 Thread Brian Munroe
On 8/31/07, Tim Funk [EMAIL PROTECTED] 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

Re: context-param vs env-entry. Ready? Fight!

2007-08-31 Thread Tim Funk
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.

context-param vs env-entry. Ready? Fight!

2007-08-30 Thread Brian Munroe
I just started to help maintain an application that I didn't originally develop. It is using context-param elements and getInitParameter() to access application configuration items in web.xml. I have always used env-entry elements and JNDI to store and read these items, respectively.