Servicemix 5.4 ожидает неудовлетворенные зависимости [[&actionManager, &userTransaction]

Я хочу обновить servicemix 4.5.2 до servicemix 5.4. Я уже решаю проблемы с зависимостями, но сталкиваюсь с проблемой применительно к сервису. Когда мой спящий пакет запускается, он не может получить доступ к службам TransactionsManager и userTransaction. Я протестировал обе формы конфигурации (весна и план) https://access.redhat.com/documentation/en-US/Fuse_ESB_Enterprise/7.0/html/EIP_Transactions_Guide/XaTM-Access.html но я не могу получить эти услуги.

В osgi: список вижу:

[102] [Active     ] [            ] [       ] [   50] Apache Aries Transaction Manager (1.0.0)

В моем файле feature.xml в конфигурации пакета Hibernate у меня есть <feature>transaction</feature>

В лог-файл я вижу:

2015-06-16 15:03:58,868 | INFO  | ExtenderThread-2 | OsgiBundleXmlApplicationContext  | ?                                   ? | 80 - org.apache.servicemix.bundles.spring-context - 3.2.11.RELEASE_1 | Application Context service already unpublished
2015-06-16 15:03:58,871 | INFO  | ExtenderThread-2 | XmlBeanDefinitionReader          | ?                                   ? | 78 - org.apache.servicemix.bundles.spring-beans - 3.2.11.RELEASE_1 | Loading XML bean definitions from URL [bundle://230.0:0/META-INF/spring/beans.xml]
2015-06-16 15:03:58,905 | INFO  | ExtenderThread-2 | DependencyServiceManager         | ?                                   ? | 123 - org.springframework.osgi.extender - 1.2.1 | Adding OSGi service dependency for importer [&transactionManager] matching OSGi filter [(objectClass=javax.transaction.TransactionManager)]
2015-06-16 15:03:58,905 | INFO  | ExtenderThread-2 | DependencyServiceManager         | ?                                   ? | 123 - org.springframework.osgi.extender - 1.2.1 | Adding OSGi service dependency for importer [&userTransaction] matching OSGi filter [(objectClass=javax.transaction.UserTransaction)]
2015-06-16 15:03:58,905 | INFO  | ExtenderThread-2 | DependencyServiceManager         | ?                                   ? | 123 - org.springframework.osgi.extender - 1.2.1 | OsgiBundleXmlApplicationContext(bundle=*****, config=osgibundle:/META-INF/spring/*.xml) is waiting for unsatisfied dependencies [[&transactionManager, &userTransaction]]

После тайм-аута я получаю:

2015-06-16 15:08:58,911 | ERROR | Timer-1          | WaiterApplicationContextExecutor | ?                                   ? | 123 - org.springframework.osgi.extender - 1.2.1 | Unable to create application context for [******], unsatisfied dependencies: Dependency on [(objectClass=javax.transaction.TransactionManager)] (from bean [&transactionManager]), Dependency on F[(objectClass=javax.transaction.UserTransaction)] (from bean [&userTransaction])
org.springframework.context.ApplicationContextException: Application context initialization for '*******' has timed out
    at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.timeout(DependencyWaiterApplicationContextExecutor.java:454)[123:org.springframework.osgi.extender:1.2.1]
    at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.access$000(DependencyWaiterApplicationContextExecutor.java:50)[123:org.springframework.osgi.extender:1.2.1]
    at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$WatchDogTask.run(DependencyWaiterApplicationContextExecutor.java:105)[123:org.springframework.osgi.extender:1.2.1]
    at java.util.TimerThread.mainLoop(Timer.java:555)[:1.7.0_21]
    at java.util.TimerThread.run(Timer.java:505)[:1.7.0_21]
2015-06-16 15:08:58,914 | ERROR | Timer-1          | ContextLoaderListener            | ?                                   ? | 123 - org.springframework.osgi.extender - 1.2.1 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=******, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.context.ApplicationContextException: Application context initialization for '*******' has timed out
    at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.timeout(DependencyWaiterApplicationContextExecutor.java:454)[123:org.springframework.osgi.extender:1.2.1]
    at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.access$000(DependencyWaiterApplicationContextExecutor.java:50)[123:org.springframework.osgi.extender:1.2.1]
    at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$WatchDogTask.run(DependencyWaiterApplicationContextExecutor.java:105)[123:org.springframework.osgi.extender:1.2.1]
    at java.util.TimerThread.mainLoop(Timer.java:555)[:1.7.0_21]
    at java.util.TimerThread.run(Timer.java:505)[:1.7.0_21]

А также:

karaf@root>  bundle-services 102
You are about to access system bundle 102.  Do you wish to continue (yes/no): yes

org.apache.aries.transaction.manager 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]

1 ответ

Решение

Решено путем изменения файла future.xml в моем спящем пакете, и я добавил 'dependency="true"'. Но все же это очень странное поведение...

Другие вопросы по тегам