Client Mode

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

Notes

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

Embedded Mode

<bean id="dynaresumeDataSource" 
class="com.atomikos.jdbc.AtomikosDataSourceBean"
        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">
   <props>
   <prop key="databaseName">${user.home}/myDerbyDB</prop>

</props>
</property>

</bean>

-- MartinBengl - 23 Feb 2009

Contact Us

Atomikos Corporate Headquarters
Hoveniersstraat, 39/1, 2800
Mechelen, Belgium

E info@atomikos.com
E sales@atomikos.com
T +3215613055

Subscribe to our newsletter

Never miss an update

Copyright 2016 Atomikos BVBA