tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vsevolod (Simon) Ilyushchenko" <sim...@cshl.edu>
Subject Re: Different JDBC sources?
Date Tue, 13 Sep 2005 21:04:25 GMT


Hassan Schroeder wrote on 09/13/2005 12:33 PM:
> Vsevolod (Simon) Ilyushchenko wrote:
> 
>> As a relative Tomcat newbie, I can't find anything about how to use 
>> two different JDBC sources with the same codebase. I'd like to have 
>> two different URLs that use the same classes and JSP pages, but 
>> reference two different databases (test and production). Is there a 
>> standard way of achieving this?
> 
> 
> Presumably these are two different Contexts; put the appropriate
> Resource in each ${context}.xml file...

Hassan,

Thanks! How will different contexts be invoked depending on the URL?

Also, I need to distinguish between the test and production environment 
in the code to figure out whether emails should be sent or not. Can I 
detect the current context there?

Thanks,
Simon

-- 

Simon (Vsevolod ILyushchenko)   simonf@cshl.edu
				http://www.simonf.com

Terrorism is a tactic and so to declare war on terrorism
is equivalent to Roosevelt's declaring war on blitzkrieg.

Zbigniew Brzezinski, U.S. national security advisor, 1977-81

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message