-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
None
The OSGi transaction extension uses this code to define dependencies on some Tx services
builder.addDependency(DependencyType.OPTIONAL, TransactionManagerService.SERVICE_NAME, TransactionManager.class, injectedTransactionManager); builder.addDependency(DependencyType.OPTIONAL, UserTransactionService.SERVICE_NAME, UserTransaction.class, injectedUserTransaction);
and later registers OSGi services from it
TransactionManager transactionManager = injectedTransactionManager.getOptionalValue(); if (transactionManager != null) { systemContext.registerService(TransactionManager.class.getName(), transactionManager, null); } UserTransaction userTransaction = injectedUserTransaction.getOptionalValue(); if (userTransaction != null) { systemContext.registerService(UserTransaction.class.getName(), userTransaction, null); }
The intension is that the OSGi services only get registered when the Tx subsystem is configured.
I see intermittent failures because the Tx services are not injected and suspect that this is due to a race condition in subsystem startup.
- relates to
-
WFLY-1558 OSGi tests that rely on optional service dependencies fail intermittently
- Closed