We found out the following settings for Oracle XA Datasource. These settings
have been tested with:
Java 1.5, Geronimo 2.1.3,2.1.4 and Oracle 10g Express (XE), 11g Express and
11 Production. 
The jar File for connect was in all cases the appropriate 10g Express thin
jar file that is provided on oracle download site (version for java 1.4 and
higher).

Settings:
User Name:              oracleuser    (schema name)
Service Name:           xe
Password:                       XXX
Confirm Password:       XXX
Port:                           1521
Data Source Name:       oracle.jdbc.xa.client.OracleXADataSource
Network Protocol:       TCP
Database Name:  xe
TNS Entry Name: (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(Host =
localhost)(Port = 1521))(CONNECT_DATA = (SID = xe)))
Driver Type:            thin
Server Name:            localhost

The appropriate value for Data Source Name is the name of the datasource
class in the jdbc driver jar file. The value for TNS Entry Name is the
appropriate entry in the tnsnames.ora file.

With geronimo 2.1.4 an error is reported when deploying the datasource and
also on every server startup. But this error can be ignored. The datasource
works as desired. Rollbacks are performed correctly and no erronous data
remains in the database in case of unchecked execptions. 




rbaumhof wrote:
> 
> Console dialog displays the following Info on editing the database pool
> settings:
> 
> Pool Type:
>       TranQL XA Resource Adapter for Oracle
>       A resource adaptor that provides access to an Oracle database with XA
> transaction support. 
> 
> This is the plan:
> <?xml version="1.0" encoding="UTF-8"?>
> <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";>
>     <dep:environment
> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2";>
>         <dep:moduleId>
>             <dep:groupId>console.dbpool</dep:groupId>
>             <dep:artifactId>oracle.dsa</dep:artifactId>
>             <dep:version>1.0</dep:version>
>             <dep:type>rar</dep:type>
>         </dep:moduleId>
>         <dep:dependencies>
>             <dep:dependency>
>                 <dep:groupId>oracle</dep:groupId>
>                 <dep:artifactId>oracle</dep:artifactId>
>                 <dep:version>jdbc14</dep:version>
>                 <dep:type>jar</dep:type>
>             </dep:dependency>
>         </dep:dependencies>
>     </dep:environment>
>     <resourceadapter>
>         <outbound-resourceadapter>
>             <connection-definition>
>                
> <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
>                 <connectiondefinition-instance>
>                     <name>oracle.erbreg.withplan</name>
>                     <config-property-setting
> name="NetworkProtocol">tcp</config-property-setting>
>                     <config-property-setting
> name="PortNumber">1521</config-property-setting>
>                     <config-property-setting name="TNSEntryName"/>
>                     <config-property-setting name="MaxStatements"/>
>                     <config-property-setting
> name="DataSourceName">OracleXADatasourceWithTranql</config-property-setting>
>                     <config-property-setting
> name="DriverType">thin</config-property-setting>
>                     <config-property-setting
> name="Password">xxx</config-property-setting>
>                     <config-property-setting
> name="ServerName">localhost</config-property-setting>
>                     <config-property-setting name="Description"/>
>                     <config-property-setting name="LoginTimeout"/>
>                     <config-property-setting name="DatabaseName"/>
>                     <config-property-setting
> name="ServiceName">XE</config-property-setting>
>                     <config-property-setting
> name="UserName">xxx</config-property-setting>
>                     <connectionmanager>
>                         <xa-transaction>
>                             <transaction-caching/>
>                         </xa-transaction>
>                         <single-pool>
>                             <max-size>10</max-size>
>                             <min-size>0</min-size>
>                             <match-one/>
>                         </single-pool>
>                     </connectionmanager>
>                 </connectiondefinition-instance>
>             </connection-definition>
>         </outbound-resourceadapter>
>     </resourceadapter>
> </connector>
> 
> 
> Yes you'r right, i also want to use the datasource within login module.
> But so far i did not try access by program. I only used the test mode when
> configuring the security realm. This should work - it worked without
> problems when configuring the postgresql database.
> 
> Error on Deployment:
> Caused by: java.sql.SQLException: I/O Exception: Connect identifier was
> empty.
>         at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
> :112)
>         at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
> :146)
>         at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
> :255)
>         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
>         at
> oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
> 441)
>         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
>         at
> oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
> n.java:35)
>         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
>         at
> oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSou
> rce.java:297)
>         at
> oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXA
> DataSource.java:472)
>         at
> oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXAData
> Source.java:159)
>         at
> oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXAData
> Source.java:133)
>         at
> org.tranql.connector.jdbc.AbstractXADataSourceMCF.getPhysicalConnecti
> on(AbstractXADataSourceMCF.java:74)
>         ... 42 more
> 09:49:53,817 ERROR [RecoveryController] javax.transaction.SystemException:
> Could
>  not obtain recovery XAResource for managedConnectionFactory
> XAMCF[jdbc:oracle:t
> hin:@]
> 
> Something seems to be wrong with the url of the connect
> 
> thanks for your help,
> Ralf
> 
> 
> 
> djencks wrote:
>> 
>> Could you please show the plan for the datasource  (fine to remove  
>> username/pw, but knowing the dependencies could be useful) and which  
>> tranql wrapper you are using?
>> 
>> Am I correct in thinking that you are using this datasource in an sql  
>> login module in your security realm?
>> 
>> thanks
>> david jencks
>> 
>> On May 25, 2009, at 9:55 AM, rbaumhof wrote:
>> 
>>>
>>> Hallo, we have got the following problem.
>>>
>>> Our application is nearly ready developed with a PostgreSQL Database  
>>> server.
>>> All works fine. Now the customer want's to migrate to Oracle database
>>> server. We use EJB 5 standards with managed datasources. Now we have
>>> problems to configure a XA datasource in geronimo. Access with  
>>> oracle local
>>> or oracle thin seemed to work partly, but no commits have been made.  
>>> This
>>> problem was earlier reported from other people in the forum (search  
>>> for
>>> oracle XA). Does anybody know how to configure an oracle datasource  
>>> with
>>> geronimo console dialog?
>>>
>>> Our settings are:
>>> user / password:   don't matter but ok
>>> Service Name:      xe
>>> Port Number:        1521
>>> Data Source name: (??)
>>> Network Protocol:  tcp (??)
>>> Database Name:   (??)
>>> Driver Type:         thin (??)
>>> Servername:        127.0.0.1 (server run's on localhost)
>>>
>>> What could be good values for Data Source Name, Network Protocol,  
>>> Database
>>> Name and Driver Type.
>>>
>>> The error i get on configuring an Security Realm is:
>>>        at java.lang.Thread.run(Thread.java:595)
>>> Caused by: java.sql.SQLException: E/A-Exception: Connect identifier  
>>> is empty
>>>        at oracle.jdbc.driver.DatabaseError.throwSqlException(Databa
>>> :111)
>>>        at oracle.jdbc.driver.DatabaseError.throwSqlException(Databa
>>> :145)
>>>        at oracle.jdbc.driver.DatabaseError.throwSqlException(Databa
>>> :254)
>>>        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java
>>>        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConn
>>> 413)
>>>        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.jav
>>>        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDr
>>> n.java:34)
>>>
>>>
>>> By the way:
>>> Some years ago i wrote a little java query manager console. With this
>>> program i can connect to the XE server and the program uses the  
>>> original
>>> jdbc driver from oracle corporation. This driver i have also used for
>>> connection from geronimo. In this little program i followed the  
>>> instructions
>>> from oracle and wrote my jdbc url as "oracle:thin". That's the  
>>> reason why i
>>> tried "thin" as driver type. So because this simple java program can
>>> establish a connect this should be basically possible - even for  
>>> geronimo.
>>>
>>> much thanks in advance,
>>> Ralf
>>>
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/Configure-Oracle-XA-Datasource-with-Oracle-XE-%2810g-Express%29-in-console-dialog-tp23707396s134p23707396.html
>>> Sent from the Apache Geronimo - Users mailing list archive at  
>>> Nabble.com.
>>>
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Configure-Oracle-XA-Datasource-with-Oracle-XE-%2810g-Express%29-in-console-dialog-tp23707396s134p23858245.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.

Reply via email to