[jboss-jira] [JBoss JIRA] (WFLY-1463) PersistenceUnitService depends on not-yet-available BeanManager
Jozef Hartinger (JIRA)
jira-events at lists.jboss.org
Fri Jun 7 11:36:55 EDT 2013
[ https://issues.jboss.org/browse/WFLY-1463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780268#comment-12780268 ]
Jozef Hartinger edited comment on WFLY-1463 at 6/7/13 11:35 AM:
----------------------------------------------------------------
Possible solutions:
1) The persistence provider would need to initialize entity listeners lazily. In that case a proxy could be passed in during EMF creation (the proxy would not be functional at that time yet and would start working after weld initialization).
Downsides: all the persistence providers would need to support this plus if there were a deployment/definition error in an entity listener it would not be discovered until runtime which is concerning
2) Not to support entity listener injection by default. The user would need to decide whether to have class transformers working or CDI injection into listeners working but not both. This would be configured by a property in persistence.xml
Concerns: Limiting to users plus I am not sure if we can pass the TCK with this.
was (Author: jharting):
Possible solutions:
# The persistence provider would need to initialize entity listeners lazily. In that case a proxy could be passed in during EMF creation (the proxy would not be functional at that time yet and would start working after weld initialization).
Downsides: all the persistence providers would need to support this plus if there were a deployment/definition error in an entity listener it would not be discovered until runtime which is concerning
# Not to support entity listener injection by default. The user would need to decide whether to have class transformers working or CDI injection into listeners working but not both. This would be configured by a property in persistence.xml
Concerns: Limiting to users plus I am not sure if we can pass the TCK with this.
> PersistenceUnitService depends on not-yet-available BeanManager
> ---------------------------------------------------------------
>
> Key: WFLY-1463
> URL: https://issues.jboss.org/browse/WFLY-1463
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 8.0.0.Alpha1
> Reporter: Jozef Hartinger
> Assignee: Scott Marlow
> Fix For: 8.0.0.Alpha2
>
>
> I am getting
> {noformat}
> 17:12:25,453 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 2) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "jpa_txTimeoutTestWithMockProvider.ear")]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"jpa_txTimeoutTestWithMockProvider.ear/ejbjar.jar#mypc\" is missing [jboss.deployment.subunit.\"jpa_txTimeoutTestWithMockProvider.ear\".\"ejbjar.jar\".beanmanager]"]}
> 17:12:25,459 ERROR [org.jboss.as.server] (management-handler-thread - 2) JBAS015870: Deploy of deployment "jpa_txTimeoutTestWithMockProvider.ear" was rolled back with the following failure message: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"jpa_txTimeoutTestWithMockProvider.ear/ejbjar.jar#mypc\" is missing [jboss.deployment.subunit.\"jpa_txTimeoutTestWithMockProvider.ear\".\"ejbjar.jar\".beanmanager]"]}
> {noformat}
> The problem is caused by PersistenceUnitServiceHandler.deployPersistenceUnit() which, if the PU is deployed in a CDI-enabled archive, adds a dependency on the BeanManager service. This happens in PersistenceBeginInstallProcessor which executes in the FIRST_MODULE_USE phase.
> However, the BeanManager service is not installed by the Weld subsystem until the INSTALL phase.
> This can be reproduced easily. Take for example the org.jboss.as.test.integration.jpa.mockprovider.txtimeout.TxTimeoutTestCase and add an empty beans.xml file to the ejb jar (ejbjar.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml"))
> This issue blocks proper Weld integration (implicit bean archives).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list