I am trying to investigate why locating the JTA TransactionManager suddenly
stopped working. This is part of the Hibernate OSGi integration testing, so
I do not have an "app" per-se. I also unfortunately do not have a ton of
OSGi experience and/or knowledge. Now that all the disclaimers are out of
the way ;)
Ultimately the new failure boils down to a call to this code:
public <T> T getServiceImpl(Class<T> contract) {
final ServiceTracker serviceTracker = getServiceTracker(
contract.getName() );
try {
return (T) serviceTracker.waitForService( 1000 );
}
catch (Exception e) {
LOG.unableToDiscoverOsgiService( contract.getName(), e
);
return null;
}
}
passing in javax.transaction.TransactionManager. The Hibernate bundles
define javax.transaction as an import:
Import-Package: ..., javax.transaction;version="[1.1,2)", ...
and the feature I am using defines JTA as a bundle:
<bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
This code used to work. It is failing on someone's topic branch, for
reasons we cannot explain. As far as I know, defining the import of
`javax.transaction;version="[1.1,2)"` in the OSGi headers ought to be enough
for JTA to be there. What am I missing?
--
View this message in context:
http://karaf.922171.n3.nabble.com/JTA-TransactionManager-not-found-tp4040381.html
Sent from the Karaf - User mailing list archive at Nabble.com.