[Design of POJO Server] - Re: EJB/War deployer ordering problem
by scott.stark@jboss.org
"alesj" wrote :
| We can order - and that's what I did - top deployments that are picked by a current scan cycle of our HDScanner.
| But if the two deployments from above are picked in two different cycles of HDScanner, -ds.xml being in the 2nd one, it will fail again.
|
This will always fail, even with dependencies. With dependencies it will be redeployed when the missing ds does show up.
"alesj" wrote :
| Some one is not putting the ejbs into JBossWebMetaData.
| Since I can see that a WebModule has dependencies from JBWMD in the AbstractWarDeployer.deployWebModule method.
|
Only a war which explicitly states its dependencies, or the war deployer scanning other contexts for ejbs can add these. The getDepends() value is explicit dependencies declared in a jboss-web.xml descriptor. There is no magic here.
"alesj" wrote :
| Your 'seam annotation deployer' is Seam Scanner, which is triggered from ServletContextListener and by that has no knowledge about MC and JBWMD what so ever.
which is too late to be adding dependencies on other deployments. There could be an integration deployer that uses the seam scanner to identify dependencies.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125809#4125809
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125809
16 years, 11 months
[Design of POJO Server] - Re: EJB/War deployer ordering problem
by alesj
"scott.stark(a)jboss.org" wrote : What we talked about was to order war deployment contexts after all others in the deployment using the relative order as an implicit dependency.
|
Sure, if both -ds.xml and .war are in the same deployment.
But usually they are in two separate deployments.
We can order - and that's what I did - top deployments that are picked by a current scan cycle of our HDScanner.
But if the two deployments from above are picked in two different cycles of HDScanner, -ds.xml being in the 2nd one, it will fail again.
"scott.stark(a)jboss.org" wrote : If a war starts after an ejb deployment which depends on a ds, the war is also started after the ds.
|
That's not the case here.
Probably since there are no ejbs dependencies on the .war.
Some one is not putting the ejbs into JBossWebMetaData.
Since I can see that a WebModule has dependencies from JBWMD in the AbstractWarDeployer.deployWebModule method.
Basically that's the whole problem, we need to see why those dependencies are not in place.
The relative order from above has no meaning if this is done as it should be.
"scott.stark(a)jboss.org" wrote :
| Seems like a seam annotation deployer is needed to pull these dependencies into the JBossWebMetaData.
|
Your 'seam annotation deployer' is Seam Scanner, which is triggered from ServletContextListener and by that has no knowledge about MC and JBWMD what so ever.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125805#4125805
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125805
16 years, 11 months
[Design of POJO Server] - Re: EJB/War deployer ordering problem
by alesj
"scott.stark(a)jboss.org" wrote : If the war deployer depends on the ejbs which depend on the ds, then war should be ok.
|
How do you define that a war depends on ejbs?
Putting that horrible unnecessary xml in war.xml?
Most of, if not all, Seam apps don't contain any classes in the war.
It's only jsp, xhtmls, css, ...
Seam initialization starts when the .war starts.
The Scanner scans for components inside .ear classloader.
This means it also finds components that are EJBs.
If the EJB has, besides @(ejb markup annotation), also a Seam @Startup annotation, Seam will at that point try to start that component, which in this case means first looking it up in the JNDI.
What about if Seam at that point added a JNDI EventListener?
http://java.sun.com/products/jndi/1.2/javadoc/javax/naming/event/NamingEv...
Do support that?
And got notified later on that an EJB was registered and only then continued with startup?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125803#4125803
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125803
16 years, 11 months