Skip to content

Commit

Permalink
JDBC-618 Remove JCA support and eliminate connector-api dependency
Browse files Browse the repository at this point in the history
See also jdp-2020-03-remove-jca-support
  • Loading branch information
mrotteveel committed Mar 26, 2020
1 parent 4525835 commit fcd28f4
Show file tree
Hide file tree
Showing 62 changed files with 1,660 additions and 2,941 deletions.
1 change: 0 additions & 1 deletion .classpath
Expand Up @@ -14,7 +14,6 @@
<classpathentry kind="lib" path="src/lib/providerutil.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/junit.jar"/>
<classpathentry kind="lib" path="src/lib/connector-api-1.5.jar"/>
<classpathentry kind="lib" path="lib/test/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="lib/test/hamcrest-library-1.3.jar"/>
<classpathentry kind="lib" path="src/lib/antlr-runtime-4.7.2.jar"/>
Expand Down
3 changes: 1 addition & 2 deletions build.xml
@@ -1,13 +1,12 @@
<?xml version="1.0"?>
<!-- ======================================================================= -->
<!-- JDBC-JCA Driver for Firebird build file -->
<!-- JDBC Driver for Firebird build file -->
<!-- ======================================================================= -->
<project name="FirebirdSQL" default="tests-report-html-pure-java" basedir=".">
<import file="build/init.xml"/>
<import file="build/util.xml"/>
<import file="build/compile.xml"/>
<import file="build/archive.xml"/>
<import file="build/deploy.xml"/>
<import file="build/test.xml"/>
<import file="build/dist.xml"/>
<import file="build/docs.xml"/>
Expand Down
43 changes: 2 additions & 41 deletions build/archive.xml
Expand Up @@ -3,23 +3,16 @@
<!-- =================================================================== -->
<!-- Creates the jar archives -->
<!-- =================================================================== -->
<target name="jars" depends="jar-j2ee, jar-ra, jar-test, jar-sources, jar-javadoc"/>
<target name="jars" depends="jar-driver, jar-test, jar-sources, jar-javadoc"/>

<!-- Not really a jar operation but necessary :) -->
<target name="jar-j2ee" depends="compile">
<mkdir dir="${build.lib}"/>
<copy file="${module.thirdparty}/connector-api-1.5.jar" tofile="${build.lib}/connector-api-1.5.jar"/>
</target>

<target name="jar-ra" depends="compile">
<target name="jar-driver" depends="compile">
<mkdir dir="${build.lib}"/>
<jar jarfile="${build.lib}/${archive.name.simple}" manifest="${build.etc}/default.mf">
<fileset dir="${build.classes}">
<include name="org/firebirdsql/**"/>
</fileset>
<fileset dir="${build.resources}">
<exclude name="log4j.properties"/>
<exclude name="META-INF/ra.xml"/>
<include name="**/*.properties"/>
<include name="**/*.xml"/>
</fileset>
Expand All @@ -30,24 +23,6 @@
<include name="maven/**/*"/>
</zipfileset>
</jar>

<jar jarfile="${build.lib}/${archive.name.full}" manifest="${build.etc}/default.mf">
<fileset dir="${build.classes}">
<include name="org/firebirdsql/**"/>
</fileset>
<fileset dir="${build.resources}">
<exclude name="log4j.properties"/>
<exclude name="META-INF/ra.xml"/>
<include name="**/*.properties"/>
<include name="**/*.xml"/>
</fileset>
<fileset dir="${build.j2ee}">
<include name="javax/**"/>
</fileset>
<zipfileset dir="${build.resources}/META-INF" prefix="META-INF">
<include name="services/**/*"/>
</zipfileset>
</jar>
</target>

<target name="jar-test" depends="compile">
Expand Down Expand Up @@ -101,18 +76,4 @@
</jar>
</target>


<!-- =================================================================== -->
<!-- Creates the rar archives -->
<!-- =================================================================== -->
<target name="rar" depends="jar-ra">
<jar jarfile="${build.lib}/${archive.name.rar}" manifest="${build.etc}/default.mf">
<fileset dir="${build.lib}">
<include name="${archive.name.simple}"/>
</fileset>
<fileset dir="${build.resources}">
<include name="META-INF/ra.xml"/>
</fileset>
</jar>
</target>
</project>
3 changes: 0 additions & 3 deletions build/clean.xml

This file was deleted.

8 changes: 1 addition & 7 deletions build/compile.xml
Expand Up @@ -4,13 +4,7 @@
<!-- Compiles the source code -->
<!-- =================================================================== -->
<target name="compile"
depends="compile-j2ee, compile-driver, compile-tests, compile-etc, compile-resources, compile-stylesheets"/>

<!-- calling this unjar a compile is stretching the truth a bit-->
<target name="compile-j2ee" depends="init">
<mkdir dir="${build.j2ee}"/>
<unjar src="${module.thirdparty}/connector-api-1.5.jar" dest="${build.j2ee}"/>
</target>
depends="compile-driver, compile-tests, compile-etc, compile-resources, compile-stylesheets"/>

<target name="set-jdbc-42-src" if="jdbc.42">
<path id="source.java.additional">
Expand Down
14 changes: 0 additions & 14 deletions build/deploy.xml

This file was deleted.

6 changes: 1 addition & 5 deletions build/dist.xml
Expand Up @@ -12,7 +12,7 @@
doctitle="${Name}"
additionalparam="${javadoc.additionalparam}"
excludepackagenames="${excludedPackages}"
bottom="Copyright &amp;copy; 2001-${YEAR} Jaybird (Firebird JDBC/JCA) team. All rights reserved.">
bottom="Copyright &amp;copy; 2001-${YEAR} Jaybird (Firebird JDBC) team. All rights reserved.">
<arg line="${java.module.arg}"/>
<classpath refid="javac.driver.classpath"/>
<sourcepath>
Expand Down Expand Up @@ -60,7 +60,6 @@
<mkdir dir="${build.dist}"/>
<zip zipfile="${build.dist}/${maven.artifactId}-${version.maven}.zip">
<fileset dir="${build.lib}">
<include name="${archive.name.full}"/>
<include name="${archive.name.simple}"/>
<include name="${archive.name.sources}"/>
<include name="${archive.name.javadoc}"/>
Expand All @@ -71,9 +70,6 @@
<fileset dir=".">
<include name="CONTRIBUTING.md"/>
</fileset>
<zipfileset dir="${build.lib}" prefix="lib">
<include name="connector-api-1.5.jar"/>
</zipfileset>
<zipfileset dir="${module.thirdparty}" prefix="lib">
<include name="antlr-runtime-4.7.2.jar"/>
</zipfileset>
Expand Down
18 changes: 0 additions & 18 deletions build/init.xml
Expand Up @@ -67,8 +67,6 @@
<property name="archive.name.simple" value="${archive.maven.simple}"/>
<property name="archive.name.sources" value="${archive.maven.sources}"/>
<property name="archive.name.javadoc" value="${archive.maven.javadoc}"/>
<property name="archive.name.rar" value="${maven.artifactId}-${version.maven}.rar"/>
<property name="archive.name.full" value="${name}-full-${version.maven}.jar"/>
<property name="archive.name.test" value="${name}-test-${version.maven}.jar"/>

<!-- Manifest version info -->
Expand All @@ -92,12 +90,6 @@
<property name="lib.dir" value="${basedir}/lib"/>
<property name="lib_test.dir" value="${lib.dir}/test"/>

<!--you will presumably need to change this if you want to use it.-->
<!--
<property name="jboss.base.dir" value="/usr/java/jboss/rc1/jboss-all/build/output/jboss-3.0.1RC1"/>
<property name="jboss.deploy.dir" value="${jboss.base.dir}/server/all/deploy"/>
-->

<!-- Setup the module environment. -->
<property name="module.root" value="${basedir}"/>

Expand All @@ -122,11 +114,7 @@
<property name="source.test.jna" value="${module.source}/jna-test"/>
<property name="source.documentation" value="${module.source}/documentation"/>

<property name="thirdparty" value="${module.root}/thirdparty"/>
<property name="jboss.source.root" location="${thirdparty}/jboss/"/>

<!-- Where build generated files will go -->
<property name="build.j2ee" value="${module.output}/j2ee"/>
<property name="build.classes" value="${module.output}/classes"/>
<property name="build.test" value="${module.output}/test"/>
<property name="build.lib" value="${module.output}/lib"/>
Expand Down Expand Up @@ -200,13 +188,7 @@
-->
<property name="pandoc.app" location="/home/${user.name}/.cabal/bin/pandoc"/>

<path id="javac.j2ee.classpath">
<pathelement location="${module.thirdparty}/connector-api-1.5.jar"/>
</path>

<path id="javac.driver.classpath">
<path refid="javac.j2ee.classpath"/>
<pathelement location="${build.j2ee}"/>
<pathelement location="${module.thirdparty}/antlr-runtime-4.7.2.jar"/>
<pathelement location="${module.thirdparty}/jna-5.5.0.jar"/>
<pathelement location="${module.thirdparty}/servlet-api.jar"/>
Expand Down
2 changes: 1 addition & 1 deletion build/maven-release/jaybird-relocation.pom
Expand Up @@ -30,7 +30,7 @@
<url>https://www.gnu.org/copyleft/lesser.html</url>
<distribution>repo</distribution>
<comments>
The Jaybird JCA/JDBC driver is distributed free of charge under the
The Jaybird JDBC driver is distributed free of charge under the
GNU Lesser General Public License (LGPL). Text of the license can be
obtained from http://www.gnu.org/copyleft/lesser.html
</comments>
Expand Down
8 changes: 2 additions & 6 deletions build/maven-release/jaybird-template.pom
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down Expand Up @@ -147,7 +148,7 @@
<url>https://www.gnu.org/copyleft/lesser.html</url>
<distribution>repo</distribution>
<comments>
The Jaybird JCA/JDBC driver is distributed free of charge under the
The Jaybird JDBC driver is distributed free of charge under the
GNU Lesser General Public License (LGPL). Text of the license can be
obtained from https://www.gnu.org/copyleft/lesser.html
</comments>
Expand All @@ -174,11 +175,6 @@
</issueManagement>

<dependencies>
<dependency>
<groupId>javax.resource</groupId>
<artifactId>connector-api</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
Expand Down
3 changes: 0 additions & 3 deletions build/test.xml
Expand Up @@ -36,7 +36,6 @@
<classpath>
<pathelement location="${build.lib}/${archive.name.simple}"/>
<pathelement location="${build.lib}/${archive.name.test}"/>
<pathelement location="${build.lib}/connector-api-1.5.jar"/>

<fileset dir="lib">
<include name="**/*.jar"/>
Expand Down Expand Up @@ -103,7 +102,6 @@

<pathelement location="${build.lib}/${archive.name.simple}"/>
<pathelement location="${build.lib}/${archive.name.test}"/>
<pathelement location="${build.lib}/connector-api-1.5.jar"/>

<fileset dir="lib">
<include name="**/*.jar"/>
Expand Down Expand Up @@ -173,7 +171,6 @@

<pathelement location="${build.lib}/${archive.name.simple}"/>
<pathelement location="${build.lib}/${archive.name.test}"/>
<pathelement location="${build.lib}/connector-api-1.5.jar"/>

<fileset dir="lib">
<include name="**/*.jar"/>
Expand Down
2 changes: 0 additions & 2 deletions build/user.properties
@@ -1,2 +0,0 @@
jboss.base.dir = /usr/java/jboss/rc1/jboss-all/build/output/jboss-3.0.1RC1
jboss.deploy.dir = ${jboss.base.dir}/server/all/deploy
9 changes: 0 additions & 9 deletions build/util.xml
Expand Up @@ -19,13 +19,4 @@
<delete dir="${module.output}"/>
</target>

<!-- =================================================================== -->
<!-- Total cleanup -->
<!-- =================================================================== -->
<target name="total-clean" depends="clean">
<delete dir="${jboss.source.root}"/>
<delete file="${Name}-${version}.zip"/>
<delete file="${Name}-${version}.tar"/>
<delete file="${Name}-${version}.tar.gz"/>
</target>
</project>
4 changes: 2 additions & 2 deletions devdoc/jdp/jdp-2020-03-remove-jca-support.md
Expand Up @@ -2,8 +2,8 @@

## Status

- Draft
- Proposed for: Jaybird 5
- Published
- Implemented in: Jaybird 5

## Type

Expand Down
47 changes: 39 additions & 8 deletions src/documentation/faq.md
Expand Up @@ -6,6 +6,41 @@ Where do I get Jaybird?

### Maven ###

<!-- TODO Hidden for now
#### Jaybird 5 ####
Jaybird 5 is in development and not yet available from Maven central:
Groupid: `org.firebirdsql.jdbc`, \
Artifactid: `jaybird`, \
Version: `5.0.0.javaXX` (where `XX` is `7`, `8` or `11`)
For backwards compatibility, we also provide a Maven relocation artifact with
artifact id `jaybird-XX` (with `XX` `jdk17`, `jdk18` or `java11`. However, we
recommend switching to the `jaybird` artifact.
For example, for Java 8:
~~~ {.xml}
<dependency>
<groupId>org.firebirdsql.jdbc</groupId>
<artifactId>jaybird</artifactId>
<version>4.0.0.java8</version>
</dependency>
~~~
If you want to use Type 2 support (native, local or embedded), you need to
explicitly include JNA 5.5.0 as a dependency:
~~~ {.xml}
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.5.0</version>
</dependency>
~~~
-->

#### Jaybird 4 ####

Jaybird 4 is available from Maven central:
Expand Down Expand Up @@ -172,8 +207,8 @@ Each release is also tagged in the repository.
How is Jaybird licensed?
------------------------

Jaybird JCA/JDBC driver is distributed under the GNU Lesser General Public
License (LGPL). Text of the license can be obtained from
Jaybird JDBC driver is distributed under the GNU Lesser General Public License
(LGPL). Text of the license can be obtained from
[http://www.gnu.org/copyleft/lesser.html](http://www.gnu.org/copyleft/lesser.html).

Using Jaybird (by importing Jaybird's public interfaces in your Java code), and
Expand Down Expand Up @@ -690,15 +725,11 @@ implemented as they are not supported by Firebird.
Implemented features:

* Most useful JDBC functionality ("useful" in the opinion of the developers).
* Complete JCA API support: may be used directly in JCA-supporting application
servers.
* XA transactions with true two phase commit when used as a JCA resource adapter
in a managed environment (with a `TransactionManager` and JCA deployment
support) as well as when used via `javax.sql.XADataSource` implementation.
* XA transactions with true two phase commit when used via
`javax.sql.XADataSource` implementation.
* `ObjectFactory` implementation for use in environments with JNDI but no
`TransactionManager`.
* `DataSource` implementations without pooling.
* Driver implementation for use in legacy applications.
* Complete access to all Firebird database parameter block and transaction
parameter block settings.
* JMX mbean for database management (so far just database create and drop).
Expand Down

0 comments on commit fcd28f4

Please sign in to comment.