<!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">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;">
    Deployment and classloader issues
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/mimtiaz">null null</a> in <i>Beginner's Corner</i> - <a href="http://community.jboss.org/message/546711#546711">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>We have around 7 EAR's which needs to be deployed into JBoss, of which all the EAR's depend upon one EAR which contains an application that is required to be started before any other applicatons gets deployed and started. Also, we want to have all the EAR's to be loaded with their own(seperate) classloaders. To achieve this, we set the <strong>isolated</strong> property value to <strong>true</strong> in the <strong>ear-deployer-jboss-beans.xml</strong> file. Of these EAR's 4 (publish, rdesk, blueplanet, website) are having the WAR and the EJB submodules having MDBs in the EJB modules. The rest are having only WAR modules inside and they are starting perfectly fine without any issues. Every WAR module of an EAR contains a startup servlet, which determines whether the application has got started successfully or not. The problem here is with the EARs having the MDBs in them. It looks like JBoss is sharing the same classloader for all the EARs having MDBs in them. The state variable maintained to indentify the status of the application indicating if its started or not is getting always true once an EAR having MDB gets deployed into JBoss. Hence, the rest of the EARs followed by during the deployment fails to start the applications. Please be noted that we were able to start at least one EAR having MDBs in it along with the other EARs having only WARs. If we try to deploy another EAR having a WAR and MDBs it wont start the application with the above explained issue. Following are the details of the steps that we followed to achive this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li>We have pointed all the EAR locations in the <strong>profile.xml</strong> as given below:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </li></ul><p style="padding-left: 60px;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&lt;value&gt;${jboss.server.home.url}deploy&lt;/value&gt;<br/>&lt;value&gt;file:///D:/BM/Dev_Env/Commerce_10_0_Dev/modules/eac/appserver/jboss&lt;/value&gt;<br/>&lt;value&gt;file:///D:/BM/Dev_Env/Commerce_10_0_Dev/modules/edesk/appserver/jboss&lt;/value&gt;<br/>&lt;value&gt;file:///D:/BM/Dev_Env/Commerce_10_0_Dev/modules/jms/appserver/jboss&lt;/value&gt;<br/>&lt;value&gt;file:///D:/BM/Dev_Env/Commerce_10_0_Dev/modules/rdesk/appserver/jboss&lt;/value&gt;<br/>&lt;value&gt;file:///D:/BM/Dev_Env/Commerce_10_0_Dev/modules/publish/appserver/jboss&lt;/value&gt;<br/>&lt;value&gt;file:///D:/BM/Dev_Env/Commerce_10_0_Dev/modules/blueplanet/appserver/jboss&lt;/value&gt;<br/>&lt;value&gt;file:///D:/BM/Dev_Env/Commerce_10_0_Dev/modules/website/appserver/jboss&lt;/value&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="padding-left: 30px;">eac.ear located under "file:///D:/BM/Dev_Env/Commerce_10_0_Dev/modules/eac/appserver/jboss" is the one that is required by all other applications. Hence, we have placed the rest of the EARs inside a directory named "deploy.last" under thier respective deployment locations as specified above.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li>We set the <strong>isolated</strong> property value to <strong>true</strong> in the <strong>ear-deployer-jboss-beans.xml</strong> file as given below:</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="padding-left: 60px;">&lt;property name="isolated"&gt;true&lt;/property&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li>We have also specified the <strong>jboss-app.xm</strong>l in each EAR as given below:</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="padding-left: 60px;">&lt;jboss-app&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;loader-repository&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; blueplanet:archive=blueplanet.ear<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;loader-repository-config&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; java2ParentDelegation=true<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/loader-repository-config&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;/loader-repository&gt;<br/>&lt;/jboss-app&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li>Also, specified the <strong>jboss-classloading.xml</strong> in each WAR as given below:</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="padding-left: 60px;">&lt;classloading xmlns="urn:jboss:classloading:1.0"<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; name="blueplanet.war"<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; domain="bpa_domain"<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; top-level-classloader="true"<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; export-all="NON_EMPTY"<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; import-all="true"&gt;<br/>&lt;/classloading&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Nothing helped us to get rid of this issue.&#160; Where are we going wrong ? Kindly help us with your valuable inputs. Your earliest inputs are highly appreciated.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>PS: Plese find the attached server log of JBoss related to this issue.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks,</p><p>IM.</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/546711#546711">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Beginner's Corner at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>