logo  AtomServer, Upgrading to AtomServer 2.3

Chris Berry. Updated 09/08/010

This document describes specific details about upgrading an existing installation to AtomServer version 2.3.

General Information

AtomServer 2.3 broke the single DataSource (which was indentified by the Spring bean; org.atomserver-dataSource) into three distinct DataSources. These new DataSources include;
This decomposition was done so that we could have finer control over the JDBC settings. In particular,
This change as backwards compatible as possible. In particular, we left around the original DAOs and Impls, which now delegate to the Read/Write DAOs.

Conversion

All that has to be done to upgrade an existing application to AtomServer 2.3 is the following steps.

1) If you have extended any of the AtomServer Beans (e.g. databaseBeans.xml), you will need to change the location of the Classes that have moved around. The org.atomserver.core.dbstore.dao package was refactored. And in particular the Class; org.atomserver.core.dbstore.dao.EntriesDAOiBatisImpl was moved to org.atomserver.core.dbstore.dao.impl.EntriesDAOiBatisImpl.

2) Define the newly required Java properties in your "env files".  You don't actually have to do this. The new properties are defaulted as folows. Note, db.poolsize.max is the pool size of the read-write DataSource. But you will probbaly want to trim these pool sizes down since there are now 3 separate pools.
db.read.poolsize.max=${db.poolsize.max}
db.aggregate.poolsize.max=${db.poolsize.max}

3) If you extend databaseBeans.xml yourself, then you may want to take advantage of the 3 new DataSources. For example, a databaseBeans.xml might look like this;

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
       <!-- NOTE: the timeouts are set in the JDBC URLs -->
    <bean id="com.homeaway-sqlserver-jtds-BASE-dataSource"
          class="org.apache.commons.dbcp.BasicDataSource"
          destroy-method="close"
          lazy-init="true"
          depends-on="org.atomserver-propertyConfigurer"
          abstract="true" >
        <property name="driverClassName" value="${db.driver}"/>
        <property name="username" value="${db.username}"/>
        <property name="password" value="${db.password}"/>
        <property name="maxWait" value="${db.pool.maxWait}"/>
    </bean>
    <bean id="org.atomserver-dataSource"
          class="org.apache.commons.dbcp.BasicDataSource"
          parent="com.homeaway-sqlserver-jtds-BASE-dataSource" >
        <property name="url" value="${db.url}"/>
        <property name="maxActive" value="${db.poolsize.max}"/>
        <property name="initialSize" value="${db.poolsize.init}" />
    </bean>
    <bean id="org.atomserver-read-dataSource"
          class="org.apache.commons.dbcp.BasicDataSource"
          parent="com.homeaway-sqlserver-jtds-BASE-dataSource" >
        <property name="url" value="${db.read.url}"/>
        <property name="maxActive" value="${db.read.poolsize.max}"/>
        <property name="initialSize" value="${db.read.poolsize.init}" />
    </bean>
    <bean id="org.atomserver-aggregate-dataSource"
          class="org.apache.commons.dbcp.BasicDataSource"
          parent="com.homeaway-sqlserver-jtds-BASE-dataSource" >
        <property name="url" value="${db.url}"/>
        <property name="maxActive" value="${db.aggregate.poolsize.max}"/>
        <property name="initialSize" value="${db.aggregate.poolsize.init}" />
    </bean>
</beans>