[jboss-user] [JCA/JBoss] - Re: XA Connection error

weston.price@jboss.com do-not-reply at jboss.com
Wed Sep 6 19:52:41 EDT 2006


Note, one more word to the wise :-)

If you don't need XA (enlistment of multiple resources in a transaction) then don't use it and use a <local-tx-datasource>. 

XA is typically used for things like updating multiple DB's in the same UOW, JMS and JDBC in the same transaction etc. etc. 

There are examples of <local-tx-datasource> configurations in the JBOSS_ROOT/doc/examples/jca directory. For your stuff, you will want to look at oracle-ds.xml. The new *-ds.xml file would look something like


  | <datasources>
  |   <local-tx-datasource>
  |     <jndi-name>OracleDS</jndi-name>
  |     <track-connection-by-tx/>
  |     <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
  |     <user-name>x</user-name>
  |     <password>y</password>
  |      <connection-url>yoururl</connection-url>     
  | <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
  |     <no-tx-separate-pools/>
  |     <!--pooling parameters-->
  |     <min-pool-size>1</min-pool-size>
  |     <max-pool-size>100</max-pool-size>
  |     <blocking-timeout-millis>5000</blocking-timeout-millis>
  |     <idle-timeout-minutes>15</idle-timeout-minutes>
  |       <metadata>
  |          <type-mapping>Oracle9i</type-mapping>
  |       </metadata>
  |   </local-tx-datasource>
  |  </datasources>	
  | 

Obviously you will want to replace the properties in config with your own. 



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969917#3969917

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969917



More information about the jboss-user mailing list