[jboss-jira] [JBoss JIRA] (WFLY-1322) CDI BeanManager (WeldBeanManagerServiceProcessor) needs to be created during Phase.FIRST_MODULE_USE for applications that have JPA classes that are rewritten/enhanced during deployment
Scott Marlow (JIRA)
jira-events at lists.jboss.org
Wed May 15 14:37:06 EDT 2013
[ https://issues.jboss.org/browse/WFLY-1322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774560#comment-12774560 ]
Scott Marlow commented on WFLY-1322:
------------------------------------
Thanks, I'll avoid the optional dependency.
I would like to add a JPA (PU service) dependency on BeanManagerService (service name building) and WeldDeploymentMarker (detecting presence of beans.xml).
JPA can't depend directly on the Weld subsystem (would be a cycle). I probably could have the JPA subsystem depend on org.jboss.as.server.deployment.Attachments instead of WeldDeploymentMarker (could move WeldDeploymentMarker.MARKER there). For BeanManagerService, I could probably either inline a copy of BeanManagerService.serviceName(du).
Do you care which way I handle this? I could also move the JPA subsystem things that Weld depends on, to a different JPA module to avoid the cycle between Weld/JPA.
> CDI BeanManager (WeldBeanManagerServiceProcessor) needs to be created during Phase.FIRST_MODULE_USE for applications that have JPA classes that are rewritten/enhanced during deployment
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-1322
> URL: https://issues.jboss.org/browse/WFLY-1322
> Project: WildFly
> Issue Type: Feature Request
> Components: CDI / Weld
> Affects Versions: 8.0.0.Alpha2
> Reporter: Scott Marlow
>
> The JPA deployment subsystem, needs to pass a (deployment) CDI bean manager instance into the persistence provider, when creating the (container) entity manager factory.
> If JPA detects that classfile enhancing might be needed for the persistence units classes, the entity manager factory is created during the Phase.FIRST_MODULE_USE phase (so that JPA transformers can be registered before any deployer accesses the deployment classloader).
> If JPA classfile rewriting is not needed, the entity manager factory is created during the Phase.INSTALL phase.
--
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