Hi, I tried this with Geronimo 1.1 w/ daytrader. Basically I need to copy the oracle tranql rar file and the oracle jar file into my repository, and specify the dependency of the oracle jar file somewhere in the plan -

      <dep:dependency>
        <dep:groupId>oracle</dep:groupId>
        <dep:artifactId>classes12</dep:artifactId>
        <dep:version>10g</dep:version>
        <dep:type>jar</dep:type>
      </dep:dependency>


and develop a resource adapter plan like below (below is an application scoped connection pool plan, but it can also be a server wide plan).

  <ext-module>
    <connector>TradeDataSource</connector>

<external-path>tranql/tranql-connector-oracle-xa/1.1/rar</external-path>
<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1";>
      <resourceadapter>
        <outbound-resourceadapter>
          <connection-definition>

<connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
            <connectiondefinition-instance>
              <name>jdbc/TradeDataSource</name>
<config-property-setting name="UserName">trade</config-property-setting> <config-property-setting name="Password">trade</config-property-setting> <config-property-setting name="DatabaseName">tradedb</config-property-setting> <config-property-setting name="DataSourceName">TradeDataSource</config-property-setting> <config-property-setting name="ServerName">linsun2</config-property-setting> <config-property-setting name="PortNumber">1521</config-property-setting> <config-property-setting name="DriverType">thin</config-property-setting>
              <connectionmanager>
                <xa-transaction>
                  <transaction-caching/>
                </xa-transaction>
                <single-pool>
                  <max-size>10</max-size>
                  <min-size>0</min-size>

<blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
                  <idle-timeout-minutes>30</idle-timeout-minutes>
                  <match-one/>
                </single-pool>
              </connectionmanager>
            </connectiondefinition-instance>
          </connection-definition>
        </outbound-resourceadapter>
      </resourceadapter>
    </connector>
  </ext-module>

The oracle tranql rar file isn't in the geronimo assembly, unfortunatelly. So you'll have to get it from the Tranql project (http://tranql.codehaus.org/Download). You can download the binary (that is a bit old than what I used) or build it yourself. The ra.xml inside of the rar file contains what configuration parameters you can specify in the connection pool plan.

HTH, Lin

Piers Geyman wrote:
Hi,

I am trying to migrate from tomcat to geronimo and I am having trouble being
able to configure my Oracle RAC datasource in geronimo to use the Oracle
Driver's connection pooling rather than the default geonimo pooling.

In tomcat I configured my datasource as follows, which used the Oracle
Datasource connection pool rather than DBCP, but I cannot see how I can do
the same in Geronimo.


        <Resource
                auth="Container"
                description="My Oracle Datasource"
                name="jdbc/myOracleDataSource"
                type="oracle.jdbc.pool.OracleDataSource"
                factory="oracle.jdbc.pool.OracleDataSourceFactory"
                driverClassName="oracle.jdbc.OracleDriver"
                        
url="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oraclehost1)(PORT=1529))(ADDRESS=(PROTOCOL=TCP)(HOST=oraclehost2)(PORT=1529))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=TESTDB)))"
                user="devapp"
                password="devapp"
                maxIdle="20"
                minIdle="10"
                maxWait="5000"
                maxActive="100"
                connectionCachingEnabled="true"
                fastConnectionFailoverEnabled="true"
                connectionCacheName="myOracleDatasourceCache"
                onsConfigStr="nodes=oraclehost1:6200,oraclehost2:6200"
                connectionProperties="oracle.jdbc.ReadTimeout=30000"/>



I see that other connection pools to the databases seem to use tranQL, but
there seems to be no documentation for this product.

Any help would be appreciated.

Thanks and regards

Piers

Reply via email to