Hmm. Sounds like, yeah, this is what I need to do too.

-----Original Message-----
From: Matthew Kerle [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 16, 2007 1:37 PM
To: Tomcat Users List
Subject: Re: JDBC driver of class '' for connect URL 'null' in Tomcat 5.5.12

Hi Chris

I apologise for coming across a bit harsh there, don't mean to offend! 
I'll take it a bit easier...;-p

Either of the methods you recommended looks good, the only trouble is 
that the doco is a bit... terse on the subject of setting up a JNDI 
datasource outside the war file, and it's not as straightforward or easy 
to find as compared to the method for placing the context.xml inside the 
deployment war, which is well documented.

If I can make an observation, if people have been hitting the lists with 
this issue since the release of 5.5, then maybe the doco needs updating? 
a simple full code example on the JNDI resources howto page on both the 
ways you listed would probably kill most of those questions, and make 
life easier for the rest of us! How do you go about submitting an update 
to the documentation? I assume there's a short list of committers...

To be honest I hadn't looked deeply into the jndi setup since 5.0, when 
we moved to 5.5 I tried to get the external-context.xml working, but 
everytime we deployed a war without a context .xml tomcat would delete 
the existing one, or overwrite it. the project didn't have the scope to 
get a good solution and I wasn't in charge of building deploys so it 
never happened. I'll try and dig through the archives to find a good 
example of that which works so we can update our procedure.

cheers!

Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Matt,
>
> Matthew Kerle wrote:
>   
>> Most of the sysadmin's I've worked with really don't like the idea of
>> having to rip open a war and update some weird config file just to do a
>> deploy. the alternative is I know all the passwords and build a war for
>> each target, which is a crap solution.
>>     
>
> They're all crap solutions when nobody wants to do their job. Either the
> deployment folks have to do some work (horrors!) or the developers have
> to (oh, no!). The solution you're looking for is simply not recommended
> by this crowd.
>
> You CAN do this:
>
> 1. Set up a GlobalNamingResource and ResourceParams in your server.xml
>    file.
>    http://tomcat.apache.org/tomcat-5.5-doc/config/globalresources.html
> 2. Use a <ResourceLink> in your <Context> in your META-INF/context.xml
>    file.
>
>
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html#Resource%20Links
>
> Another option is to have a context.xml file /outside/ of the WAR file.
> This requires alternate configuration -- details can be found in the
> archives for just about every week since the release of TC 5.5 ('cause
> someone always asks before searching).
>
>   
>> We should just be able to configure a datasource for a particular
>> context in the target instance, and then forever after all deployments
>> are database transparent. Am i missing something?
>>     
>
> The only thing you're missing is that this is no longer recommended
> procedure, which is why everyone is telling you to do it differently.
> Feel free to do it your own way, but don't complain when we tell you
> it's not a recommended / supported configuration. Sure, Tomcat will do
> it, but if you're having problems, your free tech-support provided by
> this forum might just refuse to help.
>
>   
>> I can't understand why it would be better to target a war file for a
>> database, than have the configuration live in the instance and the war
>> file is database-agnostic. makes change migration a *lot* easier.
>>     
>
> See the option above about using an outside-the-WAR file context.xml
> configuration file.
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGxIYt9CaO5/Lv0PARArMNAKCZ/YLaoqADeT3OWZRkFdj0ycku0gCfc/bj
> M8Tiwu8RsSsOK0b+i9PLjaE=
> =x7NG
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>   

-- 
Matthew Kerle
IT Consultant
Canberra, Australia

Mobile: +61404 096 863
Email : [EMAIL PROTECTED]
Web : http://threebrightlights.blogspot.com/


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

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

Reply via email to