[jboss-dev-forums] [Design of JCA on JBoss] - Re: JBAS-4662 Implementation details.
vickyk
do-not-reply at jboss.com
Tue Apr 22 23:16:28 EDT 2008
Adrain , while making the changes related to JBAS-4662 in the trunk I noticed that
1) The ha behavior in the xa-datasource configuration is not working as expected .
I tested the following configuration
<xa-datasource>
|
| <jndi-name>XAOracleDS1</jndi-name>
| <reauthentication-mechanism>org.jboss.resource.adapter.jdbc.vendor.DummyReauthenticationMechanism</reauthentication-mechanism>
| <user-name>scott</user-name>
| <password>tiger</password>
| <track-connection-by-tx/>
| <isSameRM-override-value>false</isSameRM-override-value>
| <connection-property name="connectionProperties">key=Value</connection-property>
| <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
| <xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1527|jdbc:oracle:thin:@localhost:1523|jdbc:oracle:thin:@localhost:1524|jdbc:oracle:thin:@localhost:1521</xa-datasource-property>
| <url-delimiter>|</url-delimiter>
| <url-property>URL</url-property>
| <!-- xa-datasource-property name="User">scott</xa-datasource-property -->
| <!-- xa-datasource-property name="Password">tiger</xa-datasource-property -->
| <!-- xa-datasource-property name="ConnectionProperties">XATransLoose=true</xa-datasource-property -->
| <min-pool-size>1</min-pool-size>
| <max-pool-size>5</max-pool-size>
| <prefill>true</prefill>
| <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
| <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
| <!-- Checks the Oracle error codes and messages for fatal errors -->
| <!-- exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name -->
| <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
| <no-tx-separate-pools/>
| <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
| <metadata>
| <type-mapping>Oracle9i</type-mapping>
| </metadata>
|
| </xa-datasource>
And I get this exception
08:04:40,585 INFO [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=XAOracleDS1' from JNDI name 'java:XAOracleDS1'
| 08:04:48,109 WARN [JBossManagedConnectionPool] Unable to fill pool
| org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Io exception: Invalid connection string format, a valid format is: "host:port:sid" )
| at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:452)
| at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:405)
| at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:611)
| at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.fillToMin(InternalManagedConnectionPool.java:527)
| at org.jboss.resource.connectionmanager.PoolFiller.run(PoolFiller.java:74)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.sql.SQLException: Io exception: Invalid connection string format, a valid format is: "host:port:sid"
| 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:414)
| at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
| at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
| at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
| at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:297)
| at oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXADataSource.java:456)
| at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:143)
| at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:129)
| at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:444)
| ... 5 more
| 08:04:49,844 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=XAOracleDS1' to JNDI name 'java:XAOracleDS1'
In the above configuration the last URL is valid so it should have been considered but the deployment does not consider the chain of URL's seperated by url delimiter .
2) The similar changes in the local-tx-datasource works as expected .
I have noticed that this from the logs
2008-04-23 08:04:43,856 DEBUG [org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory] (HDScanner) inside the initSelectornull
|
which appears to be coming from
private void initSelector() throws JBossResourceException
| {
| log.debug("inside the initSelector"+urlProperty);
| if(urlProperty != null && urlProperty.length() > 0)
| {
| String urlsStr = xaProps.getProperty(urlProperty);
| if(urlsStr != null && urlsStr.trim().length() > 0 && urlDelimiter != null && urlDelimiter.trim().length() > 0)
| {
| List xaDataList = new ArrayList();
I also confirmed that the JBAS-4662 changes are not causing this issue , will have to see how the Deployment builder populate the values from the MetaData into the MBeanService through the ServiceMetaData .
Any thoughts here ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4146020#4146020
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4146020
More information about the jboss-dev-forums
mailing list