[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3579) AS5 deploys PUs from /WEB-INF/classes/META-INF/persistence.xml

Dan Allen (JIRA) jira-events at lists.jboss.org
Mon Nov 24 23:56:36 EST 2008

    [ https://jira.jboss.org/jira/browse/JBSEAM-3579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12439596#action_12439596 ] 

Dan Allen commented on JBSEAM-3579:

The problem was present in any examples that deployed as a WAR archive and used JPA. It turns out the hibernate example was not a problem.

JBoss AS 5 is going to load any persistence units it finds in the classpath. Thus, we don't need to have Seam load the persistence unit. It's possible to add the jboss.entity.manager.factory.jndi.name property to the JPA configuration so that the EntityManagerFactory binds when the application deploys to JBoss AS 5. Then, in compoennts.xml, we use an Ant replacement token to toggle the installation of the <persistence:entity-manager-factory> compoent. If that component is absent, Seam will look to JNDI. This is controlled through the loadPersistenceUnits token.

> AS5 deploys PUs from /WEB-INF/classes/META-INF/persistence.xml
> --------------------------------------------------------------
>                 Key: JBSEAM-3579
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3579
>             Project: Seam
>          Issue Type: Bug
>          Components: Examples
>    Affects Versions: 2.0.3.CR1, 2.1.0.CR1
>         Environment: JDK 6
> Fedora 8
> AS 5 CR2
>            Reporter: Jay Balunas
>            Assignee: Dan Allen
>            Priority: Critical
>             Fix For: 2.1.1.CR2
> Therefore the <persistence:entity-manager-factory /> in components.xml isn't needed. Either we say the example doesn't work with JBoss 5 AND JBoss 4.2, or we introduce a second components.xml and do a jboss5 target.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list