tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Goulmy <sygou...@gmail.com>
Subject Re: How to create an Oracle XA Datasource within Tomcat 7
Date Mon, 01 Sep 2014 11:49:38 GMT
Hi Stefan,

I think that the url parameter is invalid, but the driverType parameter was
definitly helpful. I can start my application without any errors with the
following configuration :

  <Resource
> factory="org.apache.tomcat.jdbc.naming.GenericNamingResourcesFactory"
> name="jdbc/mydatasource-xa"
>  type="oracle.jdbc.xa.client.OracleXADataSource" driverType="thin"
> serverName="myDatabaseHost" portNumber="1522" databaseName="databaseName"
> user="userName" password="password" />



>   <Resource abandonWhenPercentageFull="50" auth="Container"
> dataSourceJNDI="mydatasource-xa"
> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" initialSize="5"
> jdbcInterceptors="ResetAbandonedTimer" logAbandoned="true" maxActive="20"
> maxAge="0" maxIdle="10" maxWait="0" minEvictableIdleTimeMillis="120000"
> minIdle="5" name="jdbc/mydatasource" removeAbandoned="true"
> removeAbandonedTimeout="600" testOnBorrow="true"
> timeBetweenEvictionRunsMillis="30000" type="javax.sql.XADataSource"
> validationInterval="30000" validationQuery="select 1 from dual" />


I've yet to test the XA commit/rollback functionality, but the pool
itself is up now.

Thank you for your support.



On Fri, Aug 29, 2014 at 5:17 PM, Stefan Mayr <stefan@mayr-stefan.de> wrote:

> Am 29.08.2014 14:23, schrieb Sylvain Goulmy:
>
>  Thank you for your feedbacks.
>>
>> I had actually already tried a configuration with a "url" parameter. With
>> this configuration :
>>
>>    <Resource
>>
>>> factory="org.apache.tomcat.jdbc.naming.GenericNamingResourcesFactory"
>>> name="jdbc/mydatasource-xa" password="password"
>>> type="oracle.jdbc.xa.client.OracleXADataSource" user="userName"
>>> url="jdbc:oracle:thin:@myHost:1522:myDataBase" />
>>>
>>>
> Did you try the other option of adding driverType="thin" and
> portNumber="1521" ?
>
> Although I don't get why makeURL is called if an URL is set. From what I
> find via google this could be a bug in the oracle driver.
>
> Regards,
>
>   Stefan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message