Installing UpToDater

  1. Make sure that the uptodater.jar file and the following libraries are in your WEB-INF/lib directory (or made available via the classpath to your application server). Refer to the dependencies document for the correct version of these libraries. You can download a copy of everything from jakarta or from your maven repository. At a minimum, you must have
    • commons-logging.jar
    • commons-lang.jar
    • log4j.jar (or an alternative commons-logging implementation)
  2. Define the uptodater in your deployment descriptor.

    To Deploy As A Servlet

        <!-- the jndi name for your datasource -->
        <!-- the name of the table to use -->
        <!-- the zipfile for your changes; for example -->
        <!-- The servlet should load before any business classes access the database. -->

    To Deploy As An MBean On JBoss

            <mbean code="org.sourceforge.uptodater.j2ee.jboss.JbossUpToDater" name="uptodater:service=UpToDater">
              <attribute name="UpDateZip"></attribute>
              <attribute name="DatasourceName">java:jdbc/YourJdbcPool</attribute>
              <attribute name="TableName">ddlchanges</attribute>

    A generic JMX implementation is also available, see the src for details.

  3. Create a zipfile containing your change files, and include it in the webapp. See the change files drafting db update files.
  4. Create a table for UpToDater to use. This should match the tablename you specified in the setup file. There are table create scripts in the src/sql directory. Here is a sample for SQL Server:
    create table uptodater (
        sqltext_hash varchar(100) primary key not null,
        insert_date datetime not null default getdate(),
        description varchar(250) not null,
        sqltext text,
        applied_date datetime