Edit | Attach | New | Raw | Delete | History | Print | Tools

Configuring Apache Derby for XA using Spring Framework

Client Mode

<bean id="myXADatasource" class="com.atomikos.jdbc.AtomikosDataSourceBean" init-method="init" 
   <property name="uniqueResourceName" value="MYDERBYUNIQUENAME" />
   <property name="xaDataSourceClassName" value="org.apache.derby.jdbc.ClientXADataSource" />
   <property name="xaProperties">
         <prop key="databaseName">testDB</prop>
         <prop key="serverName">localhost</prop>
         <prop key="portNumber">1527</prop>


The Apache Derby ClientXADataSource is part of the derby-client library, which could be found in the Maven2 Repository.

Embedded Mode

<bean id="dynaresumeDataSource" 
        init-method="init" destroy-method="close">
   <!-- set an arbitrary but unique name for the datasource -->
   <property name="uniqueResourceName" value="myDerbyDB" />

   <property name="xaDataSourceClassName" 
   value="org.apache.derby.jdbc.EmbeddedXADataSource" />
   <property    name="minPoolSize"><value>1</value></property>
   <property    name="maxPoolSize"><value>5</value></property>
   <property name="xaProperties">
   <prop key="databaseName">${user.home}/myDerbyDB</prop>



-- MartinBengl - 23 Feb 2009 spacer

Copyright © 2015 Atomikos BVBA. Transaction Management for Extreme Transaction Processing and SOA Environments serving ISV, Commercial, OEM and Open Source Markets
Site map RSS ATOM