define each resource at the server level server.xml with GlobalNamingResources <GlobalNamingResources ...> <Resource name="jdbc/DEVDS"^M auth="Container"^M type="oracle.jdbc.pool.OracleDataSource"^M driverClassName="oracle.jdbc.driver.OracleDriver"^M factory="oracle.jdbc.pool.OracleDataSourceFactory"^M url="jdbc:oracle:thin:@server1:1521:GDOC"^M user="username"^M password="password"^M connectionCacheProperties="{MaxStatementsLimit=10, MinLimit=0, InitialLimit=0, ValidateConnection=true, ConnectionWaitTimeout=10, MaxLimit=25}"^M connectionCachingEnabled="true"^M connectionCacheName="ConnCache"^M maxWait="-1" />^M
<Resource name="jdbc/TRGDS" auth="Container" type="oracle.jdbc.pool.OracleDataSource" driverClassName="oracle.jdbc.driver.OracleDriver" factory="oracle.jdbc.pool.OracleDataSourceFactory" url="jdbc:oracle:thin:@server2:1521:GDOC" user="username" password="password" scope="Shareable" connectionCachingEnabled="true" connectionCacheName="ConnCache" connectionCacheProperties="{MaxStatementsLimit=10, MinLimit=0, InitialLimit=0, ValidateConnection=true, ConnectionWaitTime out=10, MaxLimit=4}" maxWait="-1" /> </GlobalNamingResources> and then reference the desired resource in context.xml with ResourceLink <Context> <ResourceLink global="jdbc/TRGDS" name="jdbc/TRGDS" type="oracle.jdbc.pool.OracleDataSource"/> </Context> explained here at http://www.microdeveloper.com/html/JNDI_Orcl_Tomcat1p.html Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: pnkumar...@gmail.com > Date: Thu, 6 May 2010 11:02:57 -0400 > Subject: not able to use two oracle resources/ > To: users@tomcat.apache.org > > Hi, > > was trying to load and use both oracle DB resources from server.xml file ... > but it loads only the first one and not the second one. > > > <Resource name="jdbc/DEVDS"^M > auth="Container"^M > type="oracle.jdbc.pool.OracleDataSource"^M > driverClassName="oracle.jdbc.driver.OracleDriver"^M > factory="oracle.jdbc.pool.OracleDataSourceFactory"^M > url="jdbc:oracle:thin:@server1:1521:GDOC"^M > user="username"^M > password="password"^M > connectionCacheProperties="{MaxStatementsLimit=10, MinLimit=0, > InitialLimit=0, ValidateConnection=true, ConnectionWaitTimeout=10, > MaxLimit=25}"^M > connectionCachingEnabled="true"^M > connectionCacheName="ConnCache"^M > maxWait="-1" />^M > <Resource name="jdbc/TRGDS" > auth="Container" > type="oracle.jdbc.pool.OracleDataSource" > driverClassName="oracle.jdbc.driver.OracleDriver" > factory="oracle.jdbc.pool.OracleDataSourceFactory" > url="jdbc:oracle:thin:@server2:1521:GDOC" > user="username" > password="password" > scope="Shareable" > connectionCachingEnabled="true" > connectionCacheName="ConnCache" > connectionCacheProperties="{MaxStatementsLimit=10, MinLimit=0, > InitialLimit=0, ValidateConnection=true, ConnectionWaitTime > out=10, MaxLimit=4}" > maxWait="-1" /> > > ************************************ > Best Regards > Kumaresh _________________________________________________________________ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2