Hi,

I have a question about the package wirings concerning to the JDK packages.
I use aries-transaction-manager that is basically the
geronimo-transaction-manager. Due to the reason that the JDK
javax.transaction package does not contain enough classes the geronimo-jta
also contains the JTA API packages.

I got the following problem. Randomly after the starting equinox I get the
message that the javax.transaction.XAResource class in the signature of
javax.sql.XAConnection.getResource() is not the same as the one who wants
to call it...

I think you may know the answer if I can find anything about this situation
in the specification. If I want to be more abstract the problem is the
following:
- There is a package A that is available in JDK (but a bad version) and a
in a bundle as well
- There is a package B that is available only in JDK.
- A class from package B uses a class from package A.

It seems to me that Equinox and geronimo-tm will work only if the
javax.transaction bundle is defined in the config.ini of Equinox
(felix-flieinstall is not good)...


Well, I downloaded OpenJDK and moved out the javax.sql sources and .class
files into separate jars and created a bundle. After that I did not have
this problem. After I modified all my bundles that had javax.sql at
Import-Package section to contain version 4.0.0 (JDBC version that I gave
for the packages) it seemed to work.

When I finished that I started to write a new goal for our
maven-osgi-plugin (called everit-osgi-plugin, you can find it as it is OSS)
that checks if:
- Checks the project artifact and every dependencies if they are bundle
- If they are bundle it checks
  - if every Import-Package has version and it is greater than 0.0.0
  - if every Export-Package has version defined
- Writes WARN messages if something has the issues above

After running the goal the first time I got a four pages list for my
project. Well this was very interesting. I think there could be a tool like
checkstyle for OSGI manifests. While people can do many things in Java
there are many things that are not recommended. In my company we spend
really a lot of time on issues like this so I would have a rule that only
bundles can be used that passed the validation. As I am writing this goal
for our plugin this can be a good experience.

My questions are:
- How OSGi should handle the javax.transaction (from bundle) and javax.sql
(only in JDK and uses javax.transaction) relationship by default? Which is
the chapter I should read in the spec?
- What checks would you recommend if there was a tool like checkstyle for
MANIFEST header checks?


Balazs Zsoldos

Everit OpenSource
http://everit.org
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to