Oracle 11g UCP with Tomcat
Download Instant Client Package – Basic and SQL*Plus from Oracle.
Unzip packages to /Applications/oracle/instantclient_10_2.
Add the following to ~/.bash_profile:
export DYLD_LIBRARY_PATH=/Applications/oracle/instantclient_10_2
export TNS_ADMIN=/Applications/oracle/instantclient_10_2
export PATH=$PATH:$DYLD_LIBRARY_PATH
Ensure you have the below tnsnames.ora file in TNS_ADMIN so as to connect to the server from client using connect string: sqlplus <username>@xyz
xyz = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (PORT = <port>) (HOST = <server_name>) ) (CONNECT_DATA = (SID = <SID>)) )
Add the following to your
tomcat/conf/server.xml file:<GlobalNamingResources>
<Resource name="jdbc/<pool_jndi_name>" auth="Container" url="jdbc:oracle:thin:@<server_name>:<port>:<SID>" user="<username>" password="<password>" factory="oracle.ucp.jdbc.PoolDataSourceImpl" type="oracle.ucp.jdbc.PoolDataSource" connectionFactoryClassName="oracle.jdbc.pool.OracleDataSource" connectionPoolName="<pool_name>" connectionWaitTimeout="30" minPoolSize="5" maxPoolSize="25" inactiveConnectionTimeout="20" timeoutCheckInterval="60" validateConnectionOnBorrow="true" sqlForValidateConnection="SELECT 1 FROM DUAL" />
...and add the
ucp.jar to tomcat/libs directory.
No comments yet.
Leave a comment
You must be logged in to post a comment.
Agile CTO
- tech_startup: Puppet certificate issues http://t.co/oM6y53rx 4 days ago
- have invented a new UNIX tool for cutting the grass: sudo chmown aeells:aeells squid.conf.bkp sudo: chmown: command not found 5 days ago
- I support #wikipediablackout Show your support here http://t.co/UFN8O0gk 2 weeks ago
- reasonable man adapts himself to world; unreasonable man tries to adapt world to himself; => all progress depends on unreasonable man. 3 weeks ago
- @blinkdesign we could do that too!!!!? ;o) in reply to blinkdesign 3 weeks ago
- @blinkdesign we could do something similar on our tech blog maybe... in reply to blinkdesign 3 weeks ago
- ".....in all things, the supreme excellence is simplicity." Henry Wadsworth Longfellow 3 weeks ago
- good day bootstrapping #tomcat #memcached to #aws server via #puppet - looking forward to provisioning entire production replica in minutes! 3 weeks ago
- great (practical) example of how to do #continousdeployment and branching within teams http://t.co/ceeyvD0h courtesy @chacon @domfarr 2012-01-05
- hi @ruv, mind if i ask how you came by that statistic? cheers! in reply to ruv 2012-01-02
- More updates...


