Hi, I do remember having a similar issue years back and I feel your pain but I 
cannot remember what I did to cure the issue.
What do your custom features look like so I can compare them.

-----Oorspronkelijk bericht-----
Van: Ephemeris Lappis <[email protected]>
Verzonden: dinsdag 11 april 2023 13:06
Aan: [email protected]
Onderwerp: Karaf 4.4.3 / Unstable transaction features/services installation

 CAUTION: This email originated from outside of Gaston Schul. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.


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.
Al onze verrichtingen geschieden op basis van de Algemene voorwaarden der 
Expediteurs van België, gepubliceerd in de bijlage tot het Belgisch Staatsblad 
dd. 24 juni 2005 onder nr. 0090237. De tekst van deze voorwaarden wordt op uw 
verzoek gratis toegezonden.
All our transactions are subject to the General Conditions of the Belgian 
Forwarders Association which have been published under nr. 0090237 in the 
"Bijlage tot het Belgisch Staatsblad" dated June 24th, 2005, and is available 
free of charge upon request.
Toutes nos opérations se font sur base des Conditions Générales des Expéditeurs 
de Belgique. Le texte en a été publié dans l' Annexe au Moniteur Belge du 24 
juin 2005 sous le n° 0090237. Ce texte sera vous envoyé gratuitment sur demande.
Email confidentiality notice:
This email and any files transmitted with it are confidential and intended only 
for the use of the recipient. If you have received this email in error please 
notify its sender.

Reply via email to