[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1195) enforce startup dependency of EntityManagerFactory on Ejb

Matt Drees (JIRA) jira-events at lists.jboss.org
Wed Apr 25 17:33:40 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBSEAM-1195?page=comments#action_12360507 ] 
            
Matt Drees commented on JBSEAM-1195:
------------------------------------

The docs say that the @Startup depends attribute "specifies that the named components must be started first, if they are installed."  The code in Lifecycle.startup(Component component) looks like it implements this.  So, on an AS, org.jboss.seam.core.ejb wouldn't be installed, and so I'd guess EntityManagerFactory should start up just fine.  I haven't tested it, though.  

> enforce startup dependency of EntityManagerFactory on Ejb
> ---------------------------------------------------------
>
>                 Key: JBSEAM-1195
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1195
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.1.GA
>            Reporter: Matt Drees
>         Attachments: ConfigTest.java, MockServletContextReplacement.java, SeamTestReplacement.java
>
>
> A war project created by seam gen uses an EntityManagerFactory component.  Integration tests using the Embedded EJB container work because the Ejb component starts before the EMF component, but this is by chance only.  If the EMF component starts before the Ejb component, it fails.  This has been experienced when trying to run a war project on Tomcat.
> I'll attach a test that shows this.
> I believe the solution would be to add "org.jboss.seam.core.ejb" to the depends list of EntityManagerFactory's @Startup annotation.

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

        



More information about the seam-issues mailing list