Re: cross-context DataSource?
* Jon Archer [EMAIL PROTECTED] [0330 20:30]: Certainly do-able. I have done so in two ways: either by putting my datasource in under a DefaultContext (using the tomcat admin tool click on Tomcat Server -- Service -- Host, choose create DefaultCOntext from dropdown list of actions on RHS, then create a DataSource against the new DefaultContext) Hmm, me and the admin app aren't on speaking terms after it ate my lovingly-crafted server.xml and crapped out something simlar but invalid back around 4.1.12... or, alternatively like this: http://www.mail-archive.com/[EMAIL PROTECTED]/msg88811.html That's great, cheers Jon! I've seen the context.xmlin META-INF trick mentioned a few times now; is that portable? I guess it's a 2.3 thing? -- The early bird who catches the worm works for someone who comes in late and owns the worm farm. -- Travis McGee Rasputin :: Jack of All Trades - Master of Nuns - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cross-context DataSource?
* Rasputin [EMAIL PROTECTED] [0332 13:32]: * Jon Archer [EMAIL PROTECTED] [0330 20:30]: Certainly do-able. I have done so in two ways: either by putting my datasource in under a DefaultContext (using the tomcat admin tool click on Tomcat Server -- Service -- Host, choose create DefaultCOntext from dropdown list of actions on RHS, then create a DataSource against the new DefaultContext) Hmm, me and the admin app aren't on speaking terms after it ate my lovingly-crafted server.xml and crapped out something simlar but invalid back around 4.1.12... or, alternatively like this: http://www.mail-archive.com/[EMAIL PROTECTED]/msg88811.html That's great, cheers Jon! Ugh, spoke too soon. I've obviously missed something because I get the infanous cannot load JDBC driver name 'null' - error. I went for the global resources and context.xml in META-INF path, if that makes a difference. The only thing I can think might be related is that I'm deploying webapps by copying wars to webapps/ and they don't get extracted , not sure if that messes up the code that handles resources forwebapps. If I went down the DefaultContext route, would that generate a datasource in each Context that 'inheritsfrom it, or would it be truly shared? ' -- The trouble with a kitten is that When it grows up, it's always a cat -- Ogden Nash. Rasputin :: Jack of All Trades - Master of Nuns - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cross-context DataSource?
snip Ugh, spoke too soon. I've obviously missed something because I get the infanous cannot load JDBC driver name 'null' - error. I went for the global resources and context.xml in META-INF path, if that makes a difference. The only thing I can think might be related is that I'm deploying webapps by copying wars to webapps/ and they don't get extracted , not sure if that messes up the code that handles resources forwebapps. That definitely makes a difference although I must confess I don't fully understand why, suffice to say when I tried copying a WAR to webapps/ that didn't work for me either. I use the Ant deploy task and it works a treat. Not sure quite what the approach would be to make this work if you want to drop your WAR file in by hand as you are...anyone? If I went down the DefaultContext route, would that generate a datasource in each Context that 'inheritsfrom it, or would it be truly shared? ' I believe it to be truly shared -- I don't think you'll see a DataSource get created in each new context. Cheers, Jon -- The trouble with a kitten is that When it grows up, it's always a cat -- Ogden Nash. Rasputin :: Jack of All Trades - Master of Nuns - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cross-context DataSource?
context.xml in META-INF only applies to deploying a webapp via the Ant manager taskdef deploy task. If the .war is not getting copied to a directory of the same name as the .war file (less the .war extension), that means you have a Context ... entry defined somewhere either in server.xml or in a context configuration file in the webapps directory. Actually, it is entirely possible that Tomcat is looking at META-INF/context.xml even for the case of just copying the .war into the webapps directory. I guess I never tried that. Either way, if you define a Context ... for your app, the .war will *not* be expanded to a directory structure. Don't define a Context ... entry and it *will* get deployed to a directory structure by default. Jake At 05:06 PM 3/26/2003 +, you wrote: * Rasputin [EMAIL PROTECTED] [0332 13:32]: * Jon Archer [EMAIL PROTECTED] [0330 20:30]: Certainly do-able. I have done so in two ways: either by putting my datasource in under a DefaultContext (using the tomcat admin tool click on Tomcat Server -- Service -- Host, choose create DefaultCOntext from dropdown list of actions on RHS, then create a DataSource against the new DefaultContext) Hmm, me and the admin app aren't on speaking terms after it ate my lovingly-crafted server.xml and crapped out something simlar but invalid back around 4.1.12... or, alternatively like this: http://www.mail-archive.com/[EMAIL PROTECTED]/msg88811.html That's great, cheers Jon! Ugh, spoke too soon. I've obviously missed something because I get the infanous cannot load JDBC driver name 'null' - error. I went for the global resources and context.xml in META-INF path, if that makes a difference. The only thing I can think might be related is that I'm deploying webapps by copying wars to webapps/ and they don't get extracted , not sure if that messes up the code that handles resources forwebapps. If I went down the DefaultContext route, would that generate a datasource in each Context that 'inheritsfrom it, or would it be truly shared? ' -- The trouble with a kitten is that When it grows up, it's always a cat -- Ogden Nash. Rasputin :: Jack of All Trades - Master of Nuns - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cross-context DataSource?
Certainly do-able. I have done so in two ways: either by putting my datasource in under a DefaultContext (using the tomcat admin tool click on Tomcat Server -- Service -- Host, choose create DefaultCOntext from dropdown list of actions on RHS, then create a DataSource against the new DefaultContext) or, alternatively like this: http://www.mail-archive.com/[EMAIL PROTECTED]/msg88811.html Regards, Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]