-
1. JBoss 6 + Snowdrop 2: order of JPA & Spring deployers
marius.bogoevici Apr 8, 2011 5:28 PM (in response to milgner)1 of 1 people found this helpfulHi Marcus,
The file you are asking for is $JBOSS_HOME/server/$PROFILE/deployers/spring.deployer/META-INF/spring-deployers-jboss-beans.xml .
(or spring.deployer/META-INF/spring-deployers-jboss-beans.xml in the distribution).
You can set the relativeOrder property on the ApplicationContextDeployer bean - lower values have higher precedence.
Marius
-
2. JBoss 6 + Snowdrop 2: order of JPA & Spring deployers
milgner Apr 11, 2011 5:12 AM (in response to marius.bogoevici)Hi Marius,
thank you very much for the tip. But even if I modify the file to read
[code]
<bean name="ApplicationContextDeployer" class="org.jboss.spring.deployers.ApplicationContextDeployer">
<property name="relativeOrder">2147483647</property>
</bean>
[/code]
It still starts before the PersistenceUnit deployment. If I comment this bean, JPA starts as expected. I'm not sure if BeanFactoryDeployer could help me but uncommenting it doesn't seem to do anything.
Are there any other dependency mechanisms that could block PU deployment from running?
Best regards
Marcus
-
3. Re: JBoss 6 + Snowdrop 2: order of JPA & Spring deployers
james_f Jul 26, 2011 3:00 PM (in response to milgner)Hello,
I am encountering the same problem now -- an application that uses JPA and Spring works in JBoss 5.1, but fails to load under JBoss 6.0.0. Under 5.1, the first thing that happens when the app deploys is the loading of the Perssitence unit from persistence.xml
In JBoss 6.0, on the other hand, the application context loads first, and this fails because it depends on the persistence unit.
I tried the "relativeOrder" modification, as illustrated by Marcus in this thread, but that didn't seem to make any difference.
Is there any more information on this issue?
Thanks,
Jim
-
4. Re: JBoss 6 + Snowdrop 2: order of JPA & Spring deployers
milgner Jul 27, 2011 2:58 AM (in response to james_f)Well, I haven't spend time on application server integration lately, as my application is neither a web-app nor so complex that it doesn't work with a standalone application context...
And while I couldn't get it to work on JBoss AS 6, I'm wondering if maybe JBoss AS 7 would be an option for you? Marius' latest blog post suggests that Spring applications work very well on it.
http://community.jboss.org/blogs/mariusb/2011/07/13/spring-and-jboss-as7-part-1-getting-started
All the best
Marcus