[
https://issues.apache.org/jira/browse/DBCP-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17276917#comment-17276917
]
Grzegorz Grzybek commented on DBCP-571:
---------------------------------------
I've reviewed the comments under DBCP-445 and DBCP-454, for example [this
reference to Geronimo mailing
list|http://apache-geronimo.328035.n3.nabble.com/Understanding-the-quot-partial-true-mandatory-partial-quot-trick-td396729.html].
There's a quote from [[email protected]]:
{quote}
In Geronimo we marked the javax.transaction.xa package with that
partial attribute because the JVM only provides a subset of the
classes in that package.
{quote}
I'm not sure which Geronimo version it is being referred to. 2.x is not an OSGi
server and 3.0 is based on Karaf and uses {{geronimo-jta_1.1_spec-1.1.1.jar}}
and simply has:
{noformat}
Export-Package: javax.transaction.xa;version="1.1",\
javax.transaction;uses:="javax.transaction.xa";version="1.1"
{noformat}
I'm afraid the {{mandatory:=partial;partial=true}} used by DBCP2 is some legacy
trick which no one remembers what it was used for. Same for Karaf exporting
*both* {{javax.transaction}} and {{javax.transaction.xa}} packages with this
attribute.
> Back to OSGi import of `javax.transaction.xa` package
> -----------------------------------------------------
>
> Key: DBCP-571
> URL: https://issues.apache.org/jira/browse/DBCP-571
> Project: Commons DBCP
> Issue Type: Bug
> Reporter: Grzegorz Grzybek
> Priority: Major
>
> I'd like to refer to DBCP-445 and DBCP-454 issues, which left commons-dbcp2
> OSGi bundle with these headers:
> {noformat}
> Import-Package =
> ...
> javax.transaction;version=1.1.0,
> javax.transaction.xa;mandatory:=partial;partial=true;version=1.1.0,
> {noformat}
> I've described some findings in
> https://github.com/ops4j/org.ops4j.pax.transx/issues/33 and I'd like to know
> what's the rationale behind this "partial" attribute?
> First, {{javax.transaction.xa}} package is _complete_ in both JDK 8 and 9+
> ([JPMS|https://openjdk.java.net/projects/jigsaw/spec/]) and it's not missing
> any class in JDK itself.
> {{javax.transaction}} on the other hand do miss important classes and if
> anything, this package should be _special_, not {{javax.transaction.xa}}.
> I'll do some resolution test with Karaf and will add more comments later. But
> if you (DBCP2 devs) know more about the mentioned issues, I'd be happy to
> learn more ;)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)