Configuring Liberty Profile for Derby manually

IBM Worklight V5.0.5. automatically configures your databases. However, if you are using an older version of IBM Worklight, or if you are experiencing problems with the automatic configuration process for Liberty Profile on Derby, you must manually set up and configure your Apache Derby database and then the Liberty Profile for Derby. Complete the Apache Derby database setup procedure before continuing.

Configure the data source in the LIBERTY_HOME/usr/servers/defaultServer/server.xml file as follows:

<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="path_to_db/WorklightDB"
    shutdownDatabase="false" 
    connectionAttributes="upgrade=true"
/>
<properties.derby.embedded databaseName="<path_to_db>/WorklightReportsDB"
    shutdownDatabase="false" 
    connectionAttributes="upgrade=true"
  />
  <connectionManager connectionTimeout="180" maxPoolSize="10" minPoolSize="1" reapTime="180" maxIdleTime="1800" agedTimeout="7200" purgePolicy="EntirePool" />
</dataSource>


Parent topic Troubleshooting


+

Search Tips   |   Advanced Search