geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lin Sun <linsun....@gmail.com>
Subject Re: How to configure a datasource to use OracleDataSource for Datasource pooling
Date Thu, 14 Jun 2007 14:47:13 GMT
Hi, The sample plan I used below is with the oracle vendor resource 
adapter (named something like tranql-connector-oracle-xa-1.1.rar), that 
is developed by the Tranql project.   You can look at the source file 
for the vendor rar (at the tranql-vendors/oracle directory) after you 
check out the source.  I think it did use oracle.jdbc.pool.OracleDataSource.

Lin

Piers Geyman wrote:
> Hi,
> 
> I can get a connection running to Oracle just using the tranql connector
> that uses the tranQL/geronimo connection pooling, but I need to use the
> Oracle Connection Pooling as I am using Oracle RAC and oracle needs to
> manage the connections in the pool based on information it receives from the
> Oracle RAC.
> 
> Do I need to develop my own Resource Adapter to be able to have database
> connection served by the Oracle Connection Factory Pool
> (oracle.jdbc.pool.OracleDataSourceFactory), or am I missing some obvious
> configuration of geronimo/tranQL that would allow me to specify the Oracle
> class (oracle.jdbc.pool.OracleDataSourceFactory) as my connection pool?
> 
> Thanks and regards
> 
> Piers
> 
> 
> 
> Lin Sun-2 wrote:
>> 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
>>
>>
> 


Mime
View raw message