WAS v8.5 > Migrate, coexisting, and interoperating > Migrate applications to the Liberty profile > Migrate data access applications to the Liberty profile

Migrate a Derby embedded data source to the Liberty profile

We can migrate a Derby Embedded data source to the Liberty profile.

See the following code examples for the configurations for a Derby Embedded data source in the full profile and Liberty profile.


Example

In the full profile:

<resources.jdbc:JDBCProvider xmi:id="JDBCProvider_1183122153343" 
          providerType="Derby JDBC Provider" 
          implementationClassName="org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource" 
          xa="false">    <classpath>${DERBY_JDBC_DRIVER_PATH}/derby.jar</classpath>    <factories xmi:type="resources.jdbc:DataSource" xmi:id="DataSource_1183122153625" 
          name="DefaultDerbyDatasource" jndiName="jdbc/DefaultDatasource" 
          providerType="Derby JDBC Provider" authMechanismPreference="BASIC_PASSWORD" 
          relationalResourceAdapter="builtin_rra" statementCacheSize="10" 
          datasourceHelperClassname="com.ibm.websphere.rsadapter.DerbyDataStoreHelper">       <propertySet xmi:id="J2EEResourcePropertySet_1183122153625">          <resourceProperties xmi:id="J2EEResourceProperty_1183122153625" name="databaseName" 
          type="java.lang.String" value="C:/myDerby/DefaultDB" required="true"/>          <resourceProperties xmi:id="J2EEResourceProperty_1183122153626" name="shutdownDatabase" 
          type="java.lang.String" value="false" required="false"/>          <resourceProperties xmi:id="J2EEResourceProperty_1183122153629" name="connectionAttributes" 
          type="java.lang.String" value="upgrade=true" required="false"/>          <resourceProperties xmi:id="J2EEResourceProperty_1183122153630" name="createDatabase" 
          type="java.lang.String" value="create" required="false"/>       </propertySet>       <connectionPool xmi:id="ConnectionPool_1183122153625" connectionTimeout="180" 
          maxConnections="10" minConnections="1" reapTime="180" unusedTimeout="1800" 
          agedTimeout="7200" purgePolicy="EntirePool"/>    </factories> </resources.jdbc:JDBCProvider>

In the Liberty profile, the equivalent configuration is:

< variable name="DERBY_JDBC_DRIVER_PATH" value="C:/Drivers/derby" /> < library id="derbyLib">    < fileset dir="${DERBY_JDBC_DRIVER_PATH}" includes="derby.jar" /> </library> <dataSource id="DefaultDerbyDatasource" jndiName="jdbc/DefaultDerbyDatasource" 
       statementCacheSize="10">    <jdbcDriver libraryRef="derbyLib" 
       javax.sql.ConnectionPoolDataSource="org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource"/>    < properties.derby.embedded 
       databaseName="C:/myDerby/DefaultDB"
       shutdownDatabase="false" 
       connectionAttributes="upgrade=true"
       createDatabase="create"
   />    <connectionManager connectionTimeout="180" maxPoolSize="10" minPoolSize="1" reapTime="180" 
       maxIdleTime="1800" agedTimeout="7200" purgePolicy="EntirePool" /> </dataSource>


Parent topic: Migrate data access applications to the Liberty profile


|