[
https://issues.apache.org/jira/browse/KARAF-7032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17282967#comment-17282967
]
Grzegorz Grzybek edited comment on KARAF-7032 at 2/11/21, 10:26 AM:
--------------------------------------------------------------------
h3. Assumptions
* {{javax.transaction.xa}} package should always, unconditionally be exported
from JDK itself, as it's part of every JDK (javax.sql.XAConnection uses
javax.transaction.xa.XAResource)
* {{javax.transaction}} package is not part of JDK9+ (actually JDK11+) due to
Corba removal
* {{javax.transaction}} package is not complete in JDK8 - it contains only 3
exception classes required for Corba exception mapping
h3. Changes
* {{javax.transaction}} package should be exported by system bundle only with
{{partial=true;mandatory:=partial}} attribute/directive (_partial_ itself is an
arbitrary name) to prevent system bundle to be the wire candidate for bundles
with plain {{Import-Package: javax.transaction}}
* {{javax.transaction.xa}} package can (and I added it) be exported from system
bundle with any version and I chose 1.1, 1.2 and 1.3 to satisfy any possible
import version range - interfaces from this package should never, ever be
loaded by any non-system bundle, because they have to be loaded from the same
CL that loaded {{javax.sql.XAConnection}} interface.
* one special export from system bundle (in etc/jre.properties) is
{{Export-Package:
javax.transaction.xa;version="1.1";partial=true;mandatory:=partial}} which is
_only_ to satisfy strange and unexplained (see DBCP-571) import header in DBCP2
h3. Additional information
* https://github.com/eclipse-ee4j/jta-api/issues/186 is an issue where I want
to ensure that jakarta.transaction/jakarta.transaction-api/1.3.x exports
{{javax.transaction}} package with version 1.2 AND 1.3, because even if
JakartaEE 8 version explicitly mentions JTA 1.3 specification (see
https://jakarta.ee/specifications/platform/8/platform-spec-8.html#java-ee-8-and-jakarta-ee-8-specification-comparisons),
JavaEE 8 still uses JTA 1.2
* https://github.com/eclipse-ee4j/jca-api/issues/120 is an issue where I want
to make jakarta.resource/jakarta.resource-api/1.7.x import
{{javax.transaction}} package with wider range - {{[1.2,2.0)}} instead of
{{[1.3,2.0)}} because JCA 1.7 being part of both JakartaEE 8 and JavaEE 8
should work in both worlds.
cc: [~jbonofre], [~gnodet], [~ffang] - please have a look.
was (Author: gzres):
h3. Assumptions
* {{javax.transaction.xa}} package should always, unconditionally be exported
from JDK itself, as it's part of every JDK (javax.sql.XAConnection uses
javax.transaction.xa.XAResource)
* {{javax.transaction}} package is not part of JDK9+ (actually JDK11+) due to
Corba removal
* {{javax.transaction}} package is not complete in JDK8 - it contains only 3
exception classes required for Corba exception mapping
h3. Changes
* {{javax.transaction}} package should be exported by system bundle only with
{{partial=true;mandatory:=partial}} attribute/directive (_partial_ itself is an
arbitrary name) to prevent system bundle to be the wire candidate for bundles
with plain {{Import-Package: javax.transaction}}
* {{javax.transaction.xa}} package can (and I added it) be exported from system
bundle with any version and I chose 1.1, 1.2 and 1.3 to satisfy any possible
import version range - interfaces from this package should never, ever be
loaded by any non-system bundle, because they have to be loaded from the same
CL that loaded {{javax.sql.XAConnection}} interface.
* one special export from system bundle (in etc/jre.properties) is
{{Export-Package:
javax.transaction.xa;version="1.1";partial=true;mandatory:=partial}} which is
_only_ to satisfy strange and unexplained (see DBCP-571) import header in DBCP2
h3. Additional information
* https://github.com/eclipse-ee4j/jta-api/issues/186 is an issue where I want
to ensure that jakarta.transaction/jakarta.transaction-api/1.3.x exports
{{javax.transaction}} package with version 1.2 AND 1.3, because even if
JakartaEE 8 version explicitly mentions JTA 1.3 specification (see
https://jakarta.ee/specifications/platform/8/platform-spec-8.html#java-ee-8-and-jakarta-ee-8-specification-comparisons),
JavaEE 8 still uses JTA 1.2
* https://github.com/eclipse-ee4j/jca-api/issues/120 is an issue where I want
to make jakarta.resource/jakarta.resource-api/1.7.x import
{{javax.transaction}} package with wider range - {{[1.2,2.0)}} instead of
{{[1.3,2.0)}} because JCA 1.7 being part of both JakartaEE 8 and JavaEE 8
should work in both worlds.
> JTA specification/package versions exports are still not perfect
> ----------------------------------------------------------------
>
> Key: KARAF-7032
> URL: https://issues.apache.org/jira/browse/KARAF-7032
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.3.0, 4.2.10
> Reporter: Grzegorz Grzybek
> Assignee: Grzegorz Grzybek
> Priority: Major
>
> Following KARAF-6715, I want to explain and fix the JTA situation.
> I described some findings in:
> * DBCP-571
> * https://github.com/ops4j/org.ops4j.pax.transx/issues/33
> * https://github.com/eclipse-ee4j/jca-api/issues/120
> * https://github.com/eclipse-ee4j/jta-api/issues/186
--
This message was sent by Atlassian Jira
(v8.3.4#803005)