[jboss-jira] [JBoss JIRA] (AS7-3148) Allow dependency configuration for deployment scanner

Brent Douglas (JIRA) jira-events at lists.jboss.org
Tue Jan 31 17:58:48 EST 2012


    [ https://issues.jboss.org/browse/AS7-3148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663193#comment-12663193 ] 

Brent Douglas commented on AS7-3148:
------------------------------------

At the time of writing I was receiving the error in the description when A and D were picked up in the same scan. I hadn't tried this in a while as my deployment script currently waits on the creation of E.ear.deployed. I just tried it again and now get a different error that looks more like a race condition. This might not be the right JIRA for it though if what I am requesting is already the expected behaviour.

In my case B.jar that contains entities and my persistence unit which provides an EntityManagerFactory via JNDI. D.war contains various seam2 components and its ManagedPersistenceContext tries to look up the EMF when the seam application starts. If both A and D are deployed in the same run the EMF is not available when D is starting. Is this intended or a bug?

I will attach a log showing a deployment run where both are picked up at the same time and fail and then when they are deployed sequentially and succeed. The error when they are deployed concurrently is below:

Caused by: java.lang.IllegalArgumentException: EntityManagerFactory not found in JNDI : java:/PlutoMainEntityManagerFactory
	at com.britensw.pluto.web.seam.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:188) [classes:]
	at com.britensw.pluto.web.seam.ManagedPersistenceContext.createContext(ManagedPersistenceContext.java:91) [classes:]
	at com.britensw.pluto.web.seam.ManagedPersistenceContext.create(ManagedPersistenceContext.java:84) [classes:]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_30]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_30]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_30]
	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_30]
	at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
	at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
	at org.jboss.seam.Component.callComponentMethod(Component.java:2283) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
	at org.jboss.seam.Component.callCreateMethod(Component.java:2198) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
	at org.jboss.seam.Component.newInstance(Component.java:2158) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
	... 37 more
Caused by: javax.naming.NameNotFoundException: Error looking up PlutoMainEntityManagerFactory, service service jboss.naming.context.java.PlutoMainEntityManagerFactory is not started
	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:126)
	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:74)
	at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:177)
	at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:113)
	at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:213)
	at javax.naming.InitialContext.lookup(InitialContext.java:392) [:1.6.0_30]
	at com.britensw.pluto.web.seam.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:186) [classes:]
	... 48 more
                
> Allow dependency configuration for deployment scanner
> -----------------------------------------------------
>
>                 Key: AS7-3148
>                 URL: https://issues.jboss.org/browse/AS7-3148
>             Project: Application Server 7
>          Issue Type: Feature Request
>    Affects Versions: 7.1.0.CR1
>         Environment: AS7.1.0.Final-SNAPSHOT in standalone using standalone-ha.xml
>            Reporter: Brent Douglas
>
> It would be really handy to be able to specify dependencies for the deployment scanner to abide by. E.g. I have an application with the following structure:
> {code}
> A.ear
> |-B.jar
> \-C.war
> D.war
> {code}
> If D has a dependency on B and they are deployed at the same time I'll get:
> JBAS014775:    New missing/unsatisfied dependencies:
>       service jboss.module.spec.service."deployment.A.ear".main (missing) dependants: [service jboss.module.service."deployment.D.war".main, service jboss.deployment.unit."D.war".POST_MODULE]
>       service jboss.module.spec.service."deployment.A.ear.B.jar".main (missing) dependants: [service jboss.module.service."deployment.D.war".main, service jboss.deployment.unit."D.war".POST_MODULE]
> It would be great though if I could specify that I don't want to deploy D until A is deployed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list