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
<servlet> <servlet-name>UpToDater</servlet-name> <servlet-class>org.sourceforge.uptodater.j2ee.UpToDaterServlet</servlet-class> <init-param> <!-- the jndi name for your datasource --> <param-name>datasource</param-name> <param-value>java:jdbc/YourJdbcPool</param-value> </init-param> <init-param> <!-- the name of the table to use --> <param-name>tablename</param-name> <param-value>uptodater</param-value> </init-param> <init-param> <!-- the zipfile for your changes; for example --> <param-name>zipfile</param-name> <param-value>dbupdates.zip</param-value> </init-param> <!-- The servlet should load before any business classes access the database. --> <load-on-startup>1</load-on-startup> </servlet>
<service> <mbean code="org.sourceforge.uptodater.j2ee.jboss.JbossUpToDater" name="uptodater:service=UpToDater"> <attribute name="UpDateZip">updates.zip</attribute> <attribute name="DatasourceName">java:jdbc/YourJdbcPool</attribute> <attribute name="TableName">ddlchanges</attribute> </mbean> </service>
A generic JMX implementation is also available, see the src for details.
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 )