Hello.

I've already posted some similar questions some weeks ago about some
issues we had with our features deployment, but I didn't get any
explanation or solution. I will try again before creating a ticket for
an issue that perhaps is not a bug...

Our "low level" karaf features install commons services like :
- pax-jms (with ActiveMQ client and a configuration file)
- pax-jdbc (with PostgreSQL driver and a configuration file)
- transaction

Then we install common Camel features and our applications features.

If I'm not wrong, the feature transaction has the following dependencies :
    -> feature transaction-manager-geronimo
        -> feature pax-transx-tm-geronimo
            -> starts bundle
mvn:org.ops4j.pax.transx/pax-transx-tm-geronimo/0.5.3

This bundle exposes the service "PlatformTransactionmanager" that we
need to create transaction policies in some of our application's
bundles.

When we install all the features on a clean Karaf, all the services
are started, and the dependency on the PlatformTransactionManager
(PTM) is resolved as expected.

in list of services we have :

pax-transx-tm-geronimo (126) provides:
--------------------------------------
[org.osgi.service.cm.ManagedService]
[javax.transaction.TransactionManager,
javax.transaction.TransactionSynchronizationRegistry,
javax.transaction.UserTransaction,
org.apache.geronimo.transaction.manager.RecoverableTransactionManager,
org.springframework.transaction.PlatformTransactionManager]
[org.ops4j.pax.transx.tm.TransactionManager]

But if we stop the Karaf, and start it again, the PTM doesn't start,
and the dependent bundles fail. The services list doesn't include the
PTM anymore :

pax-transx-tm-geronimo (126) provides:

--------------------------------------

  [org.osgi.service.cm.ManagedService]

[javax.transaction.TransactionManager,
javax.transaction.TransactionSynchronizationRegistry,
javax.transaction.UserTransaction,
org.apache.geronimo.transaction.manager.RecoverableTransactionManager]
[org.ops4j.pax.transx.tm.TransactionManager]

I discovered that using "feature:refresh" does something that restarts
the missing service. Then stopping and starting Karaf seems to have no
impact.

I don't understand why the Karaf feature installation works the first
time, but doesn't let the system in a stable state, and what the
refresh does to get it working again, since no change has been
applied...

Thanks in advance for any ideas.

Regards.

Reply via email to