<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
AS6 & Snowdrop2 multiple queries
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/dlmiles">Darryl Miles</a> in <i>Snowdrop</i> - <a href="http://community.jboss.org/message/593962#593962">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>I am using JBoss AS6 with Snowdrop 2.0.0-MP1-SP1, I have updated the spring implementation with 3.0.5.RELEASE (although I wish either that all JARs were named with the version "spring-core-3.0.5.RELEASE.jar", yes you can get them like that from Maven, or you at least put them in a directory of their version "3.0.5.RELEASE/spring-core.jar", which might lend itself to OSGi based version selection for AS7).</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I have a number of queries.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>My project layout is a straight forward EAR with a JPA jar, with a EJB jar, with a WAR.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>EAR has META-INF/earApplicationContext-spring.xml</p><p>JPA has META-INF/jpaApplicationContext-spring.xml</p><p>EJB has META-INF/ejbApplicationContext-spring.xml</p><p>WAR has WEB-INF/classes/spring-context/warApplicationContext-spring.xml and WEB-INF/classes/spring-servlet/servlet-spring.xml</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span>Each of these has a </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" target="_blank">http://www.springframework.org/schema/beans/spring-beans-3.0.xsd</a><span> and a <description> element with the BeanFactory=(label) and ParentBeanFactory=(label).  I have verified in JNDI the name of the bindings for the (label) parts.  these are the files names without -spring.xml suffix like "earApplicationContext".</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Problem 1) </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>However I have not been able to verify the parent/child relationships are being correctly setup by spring.deployer.  I can see in org.jboss.spring.factory.NamedXmlBeanDefinitionParser the new BeanFactory get #setParentBeanFactory() called.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>There is also a <description> element variable Instantiation(true) which by default is set to false (which I think should be true) but I can't see how or where it is used by the spring.deployer.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Problem 2)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>How is the WAR handled, should both the outside ApplicationContext and the child servlet's be setup in the traditional (WAR only) way and using the <listener> and <servlet> settings in web.xml.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Since the JBoss VFS can see inside of the EAR and all the classpaths, is the WAR packaged correctly or should a certain naming convention not be used.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Problem 3)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>If my EAR was a little more complex.  How is it possible to control the order in which both JBoss AS brings up each JAR  (so we're talking JPA, EJB and regular JARs) all inside EAR.  Does this order also affect how and when SNOWDROP creates the parent/child relationships ?  To me it would seem that SNOPDROP should scan for all possible ApplicationContext's to instate just the skeleton factory itself (no beans inside yet), it should create them all and name each.  Then once all are created another pass to fixup the parent/child relationship.  Then on another pass walking the BeanFactory top-down it would then process the non-lazy beans within.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Problem 4)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Does BeanFactoryLocator work within an EAR context like (I think) it should.  When I query it, I find it empty.   I believe this mechanism could be used to allow 2 sibling BeanFactorys in a hierarchy to find each other.  There is some overlap with JNDI in this function but which this is Spring's own method.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Problem 5)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I'm sure older version of SNOPWDROP allowed arbitrary naming and bindings to JNDI, such as "spring/myenterprise-mymodule-ear" (note the use of the "spring/" path prefix), this does not seem to be allowed anymore.  What/why is the change of policy on this ?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Last question)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Is there any suitably complex example of multiple ApplicationContexts inside different JEE deployables all wrapped in an EAR to demonstrate/test such functionality ?</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/593962#593962">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Snowdrop at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2082">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>