[ha-jdbc] Initial commit
Andy Grimm
arg at fedoraproject.org
Fri Mar 2 18:09:20 UTC 2012
commit 545ba0065c7da9ea8a9fb8fa8006a6bdcf17dd91
Author: Andy Grimm <agrimm at gmail.com>
Date: Fri Mar 2 13:08:07 2012 -0500
Initial commit
.gitignore | 1 +
ha-jdbc-build-fixes.patch | 212 +++++++++++++++++++++++++++++++++++++++++++++
ha-jdbc-jdk7.patch | 87 ++++++++++++++++++
ha-jdbc-jgroups3.patch | 90 +++++++++++++++++++
ha-jdbc.spec | 97 +++++++++++++++++++++
sources | 1 +
6 files changed, 488 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..c77879f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/ha-jdbc-2.0.16-rc-1-src.tar.gz
diff --git a/ha-jdbc-build-fixes.patch b/ha-jdbc-build-fixes.patch
new file mode 100644
index 0000000..d25eaf6
--- /dev/null
+++ b/ha-jdbc-build-fixes.patch
@@ -0,0 +1,212 @@
+--- ha-jdbc-2.0.16-rc-1/build.xml 2009-02-27 01:20:12.000000000 -0500
++++ ha-jdbc-2.0.16-rc-1/build.xml 2011-08-22 08:40:50.452000524 -0400
+@@ -26,39 +26,24 @@
+ <property name="build-1.4.dir" location="${basedir}/build-1.4"></property>
+ <property name="test.dir" location="${basedir}/test"></property>
+ <property name="doc.dir" location="${basedir}/doc"></property>
+- <property name="lib.dir" location="${basedir}/lib"></property>
+- <property name="lib-1.5.dir" location="${basedir}/lib-1.5"></property>
+- <property name="lib-1.4.dir" location="${basedir}/lib-1.4"></property>
++ <property name="lib.dir" location="/usr/share/java"/>
+
+ <property file="${src.dir}/net/sf/hajdbc/DatabaseClusterFactory.properties"></property>
+
+ <property name="test.output.dir" location="${basedir}/test-output"></property>
+ <property name="doc.build.dir" location="${doc.dir}/build"></property>
+ <property name="doc.api.dir" location="${doc.dir}/src/content/api"></property>
+- <property name="lib.compile.dir" location="${lib.dir}/compile"></property>
+- <property name="lib.runtime.dir" location="${lib.dir}/runtime"></property>
+- <property name="lib-1.5.runtime.dir" location="${lib-1.5.dir}/runtime"></property>
+- <property name="lib-1.4.compile.dir" location="${lib-1.4.dir}/compile"></property>
+- <property name="lib-1.4.runtime.dir" location="${lib-1.4.dir}/runtime"></property>
+- <property name="lib.test.dir" location="${lib.dir}/test"></property>
+ <property name="conf.dir" location="${basedir}/conf"></property>
+ <property name="conf.jibx.dir" location="${conf.dir}/jibx"></property>
+ <property name="dist.name" value="${ant.project.name}"></property>
+ <property name="dist.version.name" value="${dist.name}-${version}"></property>
+ <property name="dist-1.6.version.name" value="${dist.version.name}-jdk1.6"></property>
+- <property name="dist-1.5.version.name" value="${dist.version.name}-jdk1.5"></property>
+- <property name="dist-1.4.version.name" value="${dist.version.name}-jdk1.4"></property>
+ <property name="jar-1.6.file" location="${basedir}/${dist-1.6.version.name}.jar"></property>
+- <property name="jar-1.5.file" location="${basedir}/${dist-1.5.version.name}.jar"></property>
+- <property name="jar-1.4.file" location="${basedir}/${dist-1.4.version.name}.jar"></property>
+ <property name="dist-1.6.bin.file" location="${basedir}/${dist-1.6.version.name}-bin.tar.gz"></property>
+- <property name="dist-1.5.bin.file" location="${basedir}/${dist-1.5.version.name}-bin.tar.gz"></property>
+- <property name="dist-1.4.bin.file" location="${basedir}/${dist-1.4.version.name}-bin.tar.gz"></property>
+ <property name="dist.src.file" location="${basedir}/${dist.version.name}-src.tar.gz"></property>
+
+ <path id="src.classpath">
+ <fileset dir="${lib.dir}" includes="*.jar"></fileset>
+- <fileset dir="${lib.compile.dir}" includes="*.jar"></fileset>
+ </path>
+
+ <path id="build.classpath">
+@@ -66,35 +51,10 @@
+ <dirset dir="${build.dir}"></dirset>
+ </path>
+
+- <path id="build-1.4.classpath">
+- <path refid="src.classpath"></path>
+- <dirset dir="${build-1.4.dir}"></dirset>
+- </path>
+-
+- <path id="test.classpath">
+- <path refid="build.classpath"></path>
+- <dirset dir="${src.dir}"></dirset>
+- <dirset dir="${test.dir}"></dirset>
+- <fileset dir="${lib.test.dir}" includes="*.jar"></fileset>
+- </path>
+-
+- <path id="testng.classpath">
+- <fileset dir="${lib.test.dir}" includes="testng-*.jar"></fileset>
+- </path>
+-
+ <path id="jibx.classpath">
+- <fileset dir="${lib.compile.dir}" includes="*.jar"></fileset>
+- <fileset dir="${lib.dir}" includes="jibx-run-*.jar"></fileset>
++ <fileset dir="${lib.dir}/jibx" includes="*.jar"></fileset>
+ </path>
+
+- <path id="retrotranslate.classpath">
+- <fileset dir="${lib-1.4.dir}"></fileset>
+- <fileset dir="${lib-1.4.compile.dir}"></fileset>
+- </path>
+-
+- <taskdef name="retrotranslate" classname="net.sf.retrotranslator.transformer.RetrotranslatorTask" classpathref="retrotranslate.classpath"></taskdef>
+-
+- <taskdef name="testng" classname="org.testng.TestNGAntTask" classpathref="testng.classpath"></taskdef>
+ <taskdef name="bind" classname="org.jibx.binding.ant.CompileTask" classpathref="jibx.classpath"></taskdef>
+
+ <target name="clean" description="Clean build artifacts">
+@@ -111,12 +71,6 @@
+ </antcall>
+ </target>
+
+- <target name="compile-1.5" description="Compile for Java 1.5">
+- <antcall target="compile">
+- <param name="target" value="1.5"/>
+- </antcall>
+- </target>
+-
+ <target name="compile" depends="clean, init">
+ <javac srcdir="${src.dir}" destdir="${build.dir}" optimize="yes" debug="on" classpathref="build.classpath" source="1.5" target="${target}"></javac>
+ <copy todir="${build.dir}">
+@@ -135,84 +89,16 @@
+ </jar>
+ </target>
+
+- <target name="jar-1.5" depends="compile-1.5" description="Creates JAR for Java 1.5">
+- <jar jarfile="${jar-1.5.file}" index="true">
+- <fileset dir="${build.dir}"></fileset>
+- </jar>
+- </target>
+-
+- <target name="clean-1.4" description="Clean Java 1.4 build artifacts">
+- <delete dir="${build-1.4.dir}" quiet="true"></delete>
+- </target>
+-
+- <target name="init-1.4">
+- <mkdir dir="${build-1.4.dir}"/>
+- </target>
+-
+- <target name="compile-1.4" depends="init-1.4, compile-1.5" description="Compile for Java 1.4">
+- <retrotranslate srcdir="${build.dir}" destdir="${build-1.4.dir}"></retrotranslate>
+- </target>
+-
+- <target name="jar-1.4" depends="clean-1.4, compile-1.4" description="Creates JAR for Java 1.4">
+- <jar jarfile="${jar-1.4.file}" index="true">
+- <fileset dir="${build-1.4.dir}"></fileset>
+- </jar>
+- </target>
+-
+ <target name="dist-1.6" depends="jar-1.6, site" description="Creates Java 1.6 binary distribution tarball">
+ <tar tarfile="${dist-1.6.bin.file}" compression="gzip">
+ <tarfileset dir="${basedir}" prefix="${dist.version.name}">
+ <include name="${dist-1.6.version.name}.jar"/>
+ <include name="*.txt"/>
+ </tarfileset>
+- <tarfileset dir="${lib.dir}" prefix="${dist.version.name}/lib" includes="**">
+- <exclude name="compile/**"/>
+- <exclude name="test/**"/>
+- </tarfileset>
+ <tarfileset dir="${doc.build.dir}/site" prefix="${dist.version.name}/doc" includes="**"></tarfileset>
+ </tar>
+ </target>
+
+- <target name="dist-1.5" depends="jar-1.5, site" description="Creates Java 1.5 binary distribution tarball">
+- <tar tarfile="${dist-1.5.bin.file}" compression="gzip">
+- <tarfileset dir="${basedir}" prefix="${dist.version.name}">
+- <include name="${dist-1.5.version.name}.jar"/>
+- <include name="*.txt"/>
+- </tarfileset>
+- <tarfileset dir="${lib.dir}" prefix="${dist.version.name}/lib" includes="**">
+- <exclude name="compile/**"/>
+- <exclude name="test/**"/>
+- </tarfileset>
+- <tarfileset dir="${lib-1.5.dir}" prefix="${dist.version.name}/lib" includes="**">
+- <exclude name="compile/**"/>
+- <exclude name="test/**"/>
+- </tarfileset>
+- <tarfileset dir="${doc.build.dir}/site" prefix="${dist.version.name}/doc" includes="**"></tarfileset>
+- </tar>
+- </target>
+-
+- <target name="dist-1.4" depends="jar-1.4, site" description="Creates Java 1.4 binary distribution tarball">
+- <tar tarfile="${dist-1.4.bin.file}" compression="gzip">
+- <tarfileset dir="${basedir}" prefix="${dist.version.name}">
+- <include name="${dist-1.4.version.name}.jar"/>
+- <include name="*.txt"/>
+- </tarfileset>
+- <tarfileset dir="${lib.dir}" prefix="${dist.version.name}/lib" includes="**">
+- <exclude name="compile/**"/>
+- <exclude name="test/**"/>
+- <exclude name="jgroups-*.jar"/>
+- </tarfileset>
+- <tarfileset dir="${lib-1.5.dir}" prefix="${dist.version.name}/lib" includes="**">
+- <exclude name="compile/**"/>
+- <exclude name="test/**"/>
+- </tarfileset>
+- <tarfileset dir="${lib-1.4.dir}" prefix="${dist.version.name}/lib" includes="**">
+- <exclude name="compile/**"/>
+- </tarfileset>
+- <tarfileset dir="${doc.build.dir}/site" prefix="${dist.version.name}/doc" includes="**"></tarfileset>
+- </tar>
+- </target>
+-
+ <target name="dist-src" description="Creates source distribution tarball">
+ <tar tarfile="${dist.src.file}" compression="gzip">
+ <tarfileset dir="${basedir}" prefix="${dist.version.name}">
+@@ -221,9 +107,6 @@
+ </tarfileset>
+ <tarfileset dir="${src.dir}" prefix="${dist.version.name}/src" includes="**"></tarfileset>
+ <tarfileset dir="${test.dir}" prefix="${dist.version.name}/test" includes="**"></tarfileset>
+- <tarfileset dir="${lib.dir}" prefix="${dist.version.name}/lib" includes="**"></tarfileset>
+- <tarfileset dir="${lib-1.5.dir}" prefix="${dist.version.name}/lib-1.5" includes="**"></tarfileset>
+- <tarfileset dir="${lib-1.4.dir}" prefix="${dist.version.name}/lib-1.4" includes="**"></tarfileset>
+ <tarfileset dir="${conf.dir}" prefix="${dist.version.name}/conf" includes="**"></tarfileset>
+ <tarfileset dir="${doc.dir}" prefix="${dist.version.name}/doc" includes="**">
+ <exclude name="build/**"/>
+@@ -232,7 +115,7 @@
+ </tar>
+ </target>
+
+- <target name="dist-all" depends="dist-1.6, dist-1.5, dist-1.4, dist-src" description="Creates all distribution tarballs"></target>
++ <target name="dist-all" depends="dist-1.6, dist-src" description="Creates all distribution tarballs"></target>
+
+ <target name="javadoc" description="Generated Java API documentation">
+ <delete dir="${doc.api.dir}" quiet="true"></delete>
+@@ -250,14 +133,4 @@
+ <ant dir="${doc.dir}" inheritall="false"></ant>
+ </target>
+
+- <target name="compile-tests" depends="compile-1.6" description="Compiles TestNG test suite">
+- <javac srcdir="${test.dir}" destdir="${build.dir}" optimize="yes" debug="on" classpathref="test.classpath" source="1.6" target="1.6"></javac>
+- </target>
+-
+- <target name="run-tests" depends="compile-tests" description="Runs TestNG test suite">
+- <testng classpathref="test.classpath" verbose="2">
+- <xmlfileset dir="${test.dir}" includes="testng.xml"/>
+- </testng>
+- </target>
+-
+ </project>
diff --git a/ha-jdbc-jdk7.patch b/ha-jdbc-jdk7.patch
new file mode 100644
index 0000000..40d50d2
--- /dev/null
+++ b/ha-jdbc-jdk7.patch
@@ -0,0 +1,87 @@
+diff -ur ha-jdbc-2.0.16-rc-1.orig/src/net/sf/hajdbc/sql/DataSource.java ha-jdbc-2.0.16-rc-1/src/net/sf/hajdbc/sql/DataSource.java
+--- ha-jdbc-2.0.16-rc-1.orig/src/net/sf/hajdbc/sql/DataSource.java 2009-02-27 01:20:18.000000000 -0500
++++ ha-jdbc-2.0.16-rc-1/src/net/sf/hajdbc/sql/DataSource.java 2012-02-10 11:08:46.755186136 -0500
+@@ -23,6 +23,8 @@
+ import java.io.PrintWriter;
+ import java.sql.Connection;
+ import java.sql.SQLException;
++import java.sql.SQLFeatureNotSupportedException;
++import java.util.logging.Logger;
+
+ import javax.naming.NamingException;
+ import javax.naming.Reference;
+@@ -120,4 +122,9 @@
+ {
+ return new DataSourceReference(this.getCluster(), this.getConfig());
+ }
++
++ public Logger getParentLogger() throws SQLFeatureNotSupportedException {
++ throw new SQLFeatureNotSupportedException();
++ }
++
+ }
+diff -ur ha-jdbc-2.0.16-rc-1.orig/src/net/sf/hajdbc/sql/Driver.java ha-jdbc-2.0.16-rc-1/src/net/sf/hajdbc/sql/Driver.java
+--- ha-jdbc-2.0.16-rc-1.orig/src/net/sf/hajdbc/sql/Driver.java 2009-05-14 16:50:24.000000000 -0400
++++ ha-jdbc-2.0.16-rc-1/src/net/sf/hajdbc/sql/Driver.java 2012-02-10 11:10:50.453174994 -0500
+@@ -24,6 +24,7 @@
+ import java.sql.DriverManager;
+ import java.sql.DriverPropertyInfo;
+ import java.sql.SQLException;
++import java.sql.SQLFeatureNotSupportedException;
+ import java.util.Properties;
+ import java.util.regex.Matcher;
+ import java.util.regex.Pattern;
+@@ -198,4 +199,9 @@
+
+ return matcher.group(1);
+ }
++
++ public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException {
++ throw new SQLFeatureNotSupportedException();
++ }
++
+ }
+diff -ur ha-jdbc-2.0.16-rc-1.orig/src/net/sf/hajdbc/sql/pool/ConnectionPoolDataSource.java ha-jdbc-2.0.16-rc-1/src/net/sf/hajdbc/sql/pool/ConnectionPoolDataSource.java
+--- ha-jdbc-2.0.16-rc-1.orig/src/net/sf/hajdbc/sql/pool/ConnectionPoolDataSource.java 2009-02-27 01:20:18.000000000 -0500
++++ ha-jdbc-2.0.16-rc-1/src/net/sf/hajdbc/sql/pool/ConnectionPoolDataSource.java 2012-02-10 11:11:53.762169201 -0500
+@@ -22,6 +22,8 @@
+
+ import java.io.PrintWriter;
+ import java.sql.SQLException;
++import java.sql.SQLFeatureNotSupportedException;
++import java.util.logging.Logger;
+
+ import javax.naming.NamingException;
+ import javax.naming.Reference;
+@@ -105,4 +107,9 @@
+ {
+ return new ConnectionPoolDataSourceReference(this.getCluster(), this.getConfig());
+ }
++
++ public Logger getParentLogger() throws SQLFeatureNotSupportedException {
++ throw new SQLFeatureNotSupportedException();
++ }
++
+ }
+diff -ur ha-jdbc-2.0.16-rc-1.orig/src/net/sf/hajdbc/sql/xa/XADataSource.java ha-jdbc-2.0.16-rc-1/src/net/sf/hajdbc/sql/xa/XADataSource.java
+--- ha-jdbc-2.0.16-rc-1.orig/src/net/sf/hajdbc/sql/xa/XADataSource.java 2009-02-27 01:20:18.000000000 -0500
++++ ha-jdbc-2.0.16-rc-1/src/net/sf/hajdbc/sql/xa/XADataSource.java 2012-02-10 11:13:00.277162603 -0500
+@@ -22,6 +22,8 @@
+
+ import java.io.PrintWriter;
+ import java.sql.SQLException;
++import java.sql.SQLFeatureNotSupportedException;
++import java.util.logging.Logger;
+
+ import javax.naming.NamingException;
+ import javax.naming.Reference;
+@@ -104,4 +106,9 @@
+ {
+ return new XADataSourceReference(this.getCluster(), this.getConfig());
+ }
++
++ public Logger getParentLogger() throws SQLFeatureNotSupportedException {
++ throw new SQLFeatureNotSupportedException();
++ }
++
+ }
diff --git a/ha-jdbc-jgroups3.patch b/ha-jdbc-jgroups3.patch
new file mode 100644
index 0000000..50440c6
--- /dev/null
+++ b/ha-jdbc-jgroups3.patch
@@ -0,0 +1,90 @@
+diff -ur ha-jdbc-2.0.16-rc-1.orig/conf/jibx/binding-datasource.xml ha-jdbc-2.0.16-rc-1/conf/jibx/binding-datasource.xml
+--- ha-jdbc-2.0.16-rc-1.orig/conf/jibx/binding-datasource.xml 2009-02-27 01:20:17.000000000 -0500
++++ ha-jdbc-2.0.16-rc-1/conf/jibx/binding-datasource.xml 2012-02-10 11:15:03.046151692 -0500
+@@ -3,7 +3,6 @@
+ <binding>
+ <include path="binding.xml"/>
+ <mapping name="ha-jdbc" class="net.sf.hajdbc.sql.DataSourceDatabaseCluster" factory="net.sf.hajdbc.sql.DataSourceDatabaseCluster.extractDatabaseCluster">
+- <structure get-method="getDecorator" set-method="setDecorator" map-as="net.sf.hajdbc.distributable.DistributableDatabaseClusterDecorator" usage="optional"></structure>
+ <collection add-method="addSynchronizationStrategyBuilder" iter-method="getSynchronizationStrategyBuilders" item-type="net.sf.hajdbc.sync.SynchronizationStrategyBuilder"></collection>
+ <structure name="cluster">
+ <structure map-as="net.sf.hajdbc.sql.AbstractDatabaseCluster"></structure>
+@@ -15,4 +14,4 @@
+ <value name="name" get-method="getName" set-method="setName"/>
+ <structure map-as="net.sf.hajdbc.sql.AbstractDatabase"></structure>
+ </mapping>
+-</binding>
+\ No newline at end of file
++</binding>
+diff -ur ha-jdbc-2.0.16-rc-1.orig/conf/jibx/binding-driver.xml ha-jdbc-2.0.16-rc-1/conf/jibx/binding-driver.xml
+--- ha-jdbc-2.0.16-rc-1.orig/conf/jibx/binding-driver.xml 2009-02-27 01:20:17.000000000 -0500
++++ ha-jdbc-2.0.16-rc-1/conf/jibx/binding-driver.xml 2012-02-10 11:16:50.446141722 -0500
+@@ -3,8 +3,7 @@
+ <binding>
+ <include path="binding.xml"/>
+ <mapping name="ha-jdbc" class="net.sf.hajdbc.sql.DriverDatabaseCluster" factory="net.sf.hajdbc.sql.DriverDatabaseCluster.extractDatabaseCluster">
+- <structure get-method="getDecorator" set-method="setDecorator" map-as="net.sf.hajdbc.distributable.DistributableDatabaseClusterDecorator" usage="optional"></structure>
+- <collection add-method="addSynchronizationStrategyBuilder" iter-method="getSynchronizationStrategyBuilders" item-type="net.sf.hajdbc.sync.SynchronizationStrategyBuilder"></collection>
++:c
+ <structure name="cluster">
+ <structure map-as="net.sf.hajdbc.sql.AbstractDatabaseCluster"></structure>
+ <collection add-method="add" iter-method="getDatabases" item-type="net.sf.hajdbc.sql.DriverDatabase"></collection>
+@@ -17,4 +16,4 @@
+ <structure map-as="net.sf.hajdbc.sql.AbstractDatabase"></structure>
+ </mapping>
+
+-</binding>
+\ No newline at end of file
++</binding>
+diff -ur ha-jdbc-2.0.16-rc-1.orig/conf/jibx/binding-pool-datasource.xml ha-jdbc-2.0.16-rc-1/conf/jibx/binding-pool-datasource.xml
+--- ha-jdbc-2.0.16-rc-1.orig/conf/jibx/binding-pool-datasource.xml 2009-02-27 01:20:17.000000000 -0500
++++ ha-jdbc-2.0.16-rc-1/conf/jibx/binding-pool-datasource.xml 2012-02-10 11:17:14.995139532 -0500
+@@ -3,7 +3,6 @@
+ <binding>
+ <include path="binding.xml"/>
+ <mapping name="ha-jdbc" class="net.sf.hajdbc.sql.pool.ConnectionPoolDataSourceDatabaseCluster" factory="net.sf.hajdbc.sql.pool.ConnectionPoolDataSourceDatabaseCluster.extractDatabaseCluster">
+- <structure get-method="getDecorator" set-method="setDecorator" map-as="net.sf.hajdbc.distributable.DistributableDatabaseClusterDecorator" usage="optional"></structure>
+ <collection add-method="addSynchronizationStrategyBuilder" iter-method="getSynchronizationStrategyBuilders" item-type="net.sf.hajdbc.sync.SynchronizationStrategyBuilder"></collection>
+ <structure name="cluster">
+ <structure map-as="net.sf.hajdbc.sql.AbstractDatabaseCluster"></structure>
+@@ -15,4 +14,4 @@
+ <value name="name" get-method="getName" set-method="setName"/>
+ <structure map-as="net.sf.hajdbc.sql.AbstractDatabase"></structure>
+ </mapping>
+-</binding>
+\ No newline at end of file
++</binding>
+diff -ur ha-jdbc-2.0.16-rc-1.orig/conf/jibx/binding-xa-datasource.xml ha-jdbc-2.0.16-rc-1/conf/jibx/binding-xa-datasource.xml
+--- ha-jdbc-2.0.16-rc-1.orig/conf/jibx/binding-xa-datasource.xml 2009-02-27 01:20:17.000000000 -0500
++++ ha-jdbc-2.0.16-rc-1/conf/jibx/binding-xa-datasource.xml 2012-02-10 11:17:35.497137540 -0500
+@@ -3,7 +3,6 @@
+ <binding>
+ <include path="binding.xml"/>
+ <mapping name="ha-jdbc" class="net.sf.hajdbc.sql.xa.XADataSourceDatabaseCluster" factory="net.sf.hajdbc.sql.xa.XADataSourceDatabaseCluster.extractDatabaseCluster">
+- <structure get-method="getDecorator" set-method="setDecorator" map-as="net.sf.hajdbc.distributable.DistributableDatabaseClusterDecorator" usage="optional"></structure>
+ <collection add-method="addSynchronizationStrategyBuilder" iter-method="getSynchronizationStrategyBuilders" item-type="net.sf.hajdbc.sync.SynchronizationStrategyBuilder"></collection>
+ <structure name="cluster">
+ <structure map-as="net.sf.hajdbc.sql.AbstractDatabaseCluster"></structure>
+@@ -15,4 +14,4 @@
+ <value name="name" get-method="getName" set-method="setName"/>
+ <structure map-as="net.sf.hajdbc.sql.AbstractDatabase"></structure>
+ </mapping>
+-</binding>
+\ No newline at end of file
++</binding>
+diff -ur ha-jdbc-2.0.16-rc-1.orig/conf/jibx/binding.xml ha-jdbc-2.0.16-rc-1/conf/jibx/binding.xml
+--- ha-jdbc-2.0.16-rc-1.orig/conf/jibx/binding.xml 2009-02-27 01:20:17.000000000 -0500
++++ ha-jdbc-2.0.16-rc-1/conf/jibx/binding.xml 2012-02-10 11:15:52.007146410 -0500
+@@ -4,12 +4,6 @@
+ <format type="org.quartz.CronExpression" serializer="net.sf.hajdbc.util.Formatter.serializeCronExpression" deserializer="net.sf.hajdbc.util.Formatter.deserializeCronExpression"/>
+ <format type="java.lang.Class" serializer="net.sf.hajdbc.util.Formatter.serializeClass" deserializer="net.sf.hajdbc.util.Formatter.deserializeClass"/>
+
+- <mapping name="distributable" class="net.sf.hajdbc.distributable.DistributableDatabaseClusterDecorator">
+- <value name="config" field="config" style="attribute" usage="optional" default="stacks.xml"/>
+- <value name="stack" field="stack" style="attribute" usage="optional" default="udp-sync"/>
+- <value name="timeout" field="timeout" style="attribute" usage="optional" default="1000"/>
+- </mapping>
+-
+ <mapping name="sync" class="net.sf.hajdbc.sync.SynchronizationStrategyBuilder">
+ <value name="id" field="id" style="attribute"/>
+ <value name="class" field="targetClass" style="attribute"/>
diff --git a/ha-jdbc.spec b/ha-jdbc.spec
new file mode 100644
index 0000000..9468a6f
--- /dev/null
+++ b/ha-jdbc.spec
@@ -0,0 +1,97 @@
+Summary: High-Availability JDBC
+Name: ha-jdbc
+Version: 2.0.16
+Release: 0.1.rc1%{?dist}
+Epoch: 0
+License: LGPLv2+
+URL: http://ha-jdbc.sourceforge.net/
+Group: Development/Libraries
+Source0: http://sourceforge.net/projects/ha-jdbc/files/HA-JDBC%202.0%20_%20Stable/2.0.16-rc-1/ha-jdbc-2.0.16-rc-1-src.tar.gz
+Patch0: %{name}-build-fixes.patch
+Patch1: %{name}-jdk7.patch
+Patch2: %{name}-jgroups3.patch
+BuildRequires: jpackage-utils >= 0:1.6
+BuildRequires: ant >= 0:1.6
+BuildRequires: jgroups
+BuildRequires: junit
+BuildRequires: slf4j
+BuildRequires: jibx
+BuildRequires: quartz
+BuildRequires: bcel
+BuildRequires: tomcat6-servlet-2.5-api
+Requires: jpackage-utils >= 0:1.6
+Requires: java >= 0:1.4.2
+Requires: jgroups
+Requires: jibx
+Requires: quartz
+Requires: tomcat6-servlet-2.5-api
+Requires: xml-commons-apis
+Requires: slf4j
+
+BuildArch: noarch
+
+%description
+High-Availability JDBC - a JDBC driver proxy that adds light-weight,
+transparent, fault tolerant clustering capability to any underlying
+JDBC driver.
+
+%package javadoc
+Group: Documentation
+Summary: API documentation for %{name}
+BuildArch: noarch
+Requires: jpackage-utils
+
+%description javadoc
+API documentation for %{name}.
+
+%prep
+%setup -q -n %{name}-%{version}-rc-1
+# remove all binary libs
+rm -rf lib lib-1.4 lib-1.5
+
+# This code is no longer compatible with JGroups
+pushd src/net/sf/hajdbc/distributable
+rm AbstractMembershipListener.java
+rm DistributableDatabaseClusterDecorator.java
+rm DistributableLockManager.java
+rm DistributableStateManager.java
+popd
+
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+export CLASSPATH=$( build-classpath jgroups jibx/jibx-run quartz slf4j/slf4j-api bcel jibx/jibx-bind servlet_2_5_api )
+ant
+ant javadoc
+
+%install
+# jars
+install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
+install -m 644 %{name}-%{version}-rc-1-jdk1.6.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
+
+# javadoc
+install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+cp -pr doc/src/content/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+
+%files
+%doc LICENSE.txt
+%{_javadir}/%{name}*.jar
+
+%files javadoc
+%doc LICENSE.txt
+%{_javadocdir}/%{name}
+
+
+%changelog
+* Sun Feb 26 2012 Andy Grimm <agrimm at gmail.com> - 0:2.0.16-0.1.rc1
+- Fix release
+- Clean up duplicate Requires
+
+* Mon Feb 13 2012 Andy Grimm <agrimm at gmail.com> - 0:2.0.16-2
+- Build for JDK 7, follow current guidelines
+
+* Fri Aug 21 2011 Andy Grimm <agrimm at gmail.com> - 0:2.0.16-1
+- Initial build
+
diff --git a/sources b/sources
index e69de29..58ca2fa 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+6871bca2b13e6374231083fda8f18371 ha-jdbc-2.0.16-rc-1-src.tar.gz
More information about the scm-commits
mailing list