Yep, I had a coworker suggest using the OCI driver as well... seems you can just drop the TNS string into the URL parameter in server.xml... I couldn't get it to work, but I suspect it was just a minor typo or something, the theory seems dead-on.
I would up just writing the connection string to go to a specific node in the cluster... This isn't a problem because it only comes up when I have my desktop running against the QA database, which should probably never happen... the actual QA server will be configured properly to talk to the cluster (it's actually Websphere besides, but I develop with Tomcat). Thanks for that reference though... The DBA wants me to not talk to a specific node, and I think that may help get me all squared away with the OCI driver. Thanks again! :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, June 20, 2005 2:03 pm, Patrick Thomas said: > Hi Frank, > > With the caveat that I don't use RAC, it looks like you're doing > things right from a JDBC/Tomcat perspective, but I thought I'd bring > one point just to clarify for you and any lurkers: JDBC doesn't use > TNS at all; it only cares about the host, port and SID as specified in > the connection string (or xml config). > > I'm going to presume that either RAC default or your custom setup is > what's dictating your choice of port (as it's not the standard for a > regular 1-server oracle connection). Since you seemed to indicate that > you have oracle client software actually installed on the box that > you're running TC from, might I suggest the OCI driver (instead of > thin) which should allow you to make use of the working TNS > configuration, and appears to offer support for RAC setups. > > Here's one quick reference that google turned up; there are probably > others that may be more specific to your cause: > http://www.praetoriate.com/10g_11_25.htm > > Good luck, > Patrick > > On 6/20/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: >> Does anyone have any experience configuring Tomcat to connect to an >> Oracle >> RAC cluster? >> >> I have an application that currently works in a test environment, where >> it >> connects to a single Oracle server. Now I'm moving it to a QA >> environment, where there is a 3-node Oracle cluster using RAC. I'm >> getting an Oracle 12505 error (SID not found) trying to talk to the >> cluster. Problem is, I'm not sure how the configuration differs in >> Tomcat, if it does, in this situation. >> >> I have a TNS entry in tnsnames, and I can connect to the cluster using >> Toad or Oracle Enterprise Manager, so the basic setup appears correct. >> >> Here's my server.xml context entry: >> >> <Context path="/app" docBase="app" swallowOutput="false" >> override="true"> >> <Resource name="jdbc/appdb" auth="Container" >> type="javax.sql.DataSource" /> >> <ResourceParams name="jdbc/appdb"> >> >> <parameter><name>driverClassName</name><value>oracle.jdbc.driver.OracleDriver</value></parameter> >> <!-- >> <parameter><name>username</name><value>app</value></parameter> >> <parameter><name>password</name><value>apptest</value></parameter> >> >> <parameter><name>url</name><value>jdbc:oracle:thin:@server.company.net:1700:testsid</value></parameter> >> --> >> <parameter><name>username</name><value>appweb</value></parameter> >> <parameter><name>password</name><value>appqa</value></parameter> >> >> <parameter><name>url</name><value>jdbc:oracle:thin:@node1.company.net:1700:qasid</value></parameter> >> <parameter><name>maxActive</name><value>100</value></parameter> >> <parameter><name>maxIdle</name><value>75</value></parameter> >> <parameter><name>minIdle</name><value>50</value></parameter> >> <parameter><name>testOnBorrow></name><value>false</value></parameter> >> <parameter><name>logAbandoned</name><value>true</value></parameter> >> <parameter><name>removeAbandoned</name><value>true</value></parameter> >> <parameter><name>whenExhaustedAction</name><value>1</value></parameter> >> </ResourceParams> >> </Context> >> >> Passwords and such have been changed to protect the innocent :) I also >> left the commented section for the test environment that *does* work, >> just >> for comparison. >> >> Now, the first thing that struck me as wrong is that the server I'm >> connecting to is only one node in the cluster. Should RAC provide a >> single server name that the cluster is accesible through? >> >> Otherwise, everything looks correct to me. Anyone have any ideas? TIA! >> >> Frank >> >> --------------------------------------------------------------------- >> 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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
