[jboss-jira] [JBoss JIRA] (AS7-2505) Deployment order for MDBs and RAs is not working for a packaged EAR

jaikiran pai (Commented) (JIRA) jira-events at lists.jboss.org
Thu Dec 29 22:03:09 EST 2011


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

jaikiran pai commented on AS7-2505:
-----------------------------------

The reason why your deployment is failing is because you are deploying 2 different MDBs (and not one). The ejb-jar.xml has a MDB named:
{code}
<ejb-name>message-driven-bean</ejb-name>
{code}
which I think you meant to be used as an override for the annotated MDB:
{code}
@ResourceAdapter("connector.rar")

@Depends("jboss.jca:name='connector.rar',service=RARDeployment")

public class AMessageDrivenBean implements MessageListener {
{code}

However, the names of these MDBs don't match. Hence the deployment descriptor MDB is considered as a separate MDB and since it doesn't have a custom resource adapter, it uses the default hornetq-ra resource adapter. You'll have to fix the deployment. One way to do it is change the ejb-jar.xml to:
{code}
<ejb-name>AMessageDrivenBean</ejb-name>
{code}

                
> Deployment order for MDBs and RAs is not working for a packaged EAR
> -------------------------------------------------------------------
>
>                 Key: AS7-2505
>                 URL: https://issues.jboss.org/browse/AS7-2505
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: EJB, JCA, JSR88
>    Affects Versions: 7.0.2.Final, 7.1.0.Alpha1
>         Environment: Windows 7 64-bit
>            Reporter: Abhi S
>            Assignee: jaikiran pai
>            Priority: Critical
>              Labels: deployment, ear, mdb, ra
>             Fix For: 7.1.0.CR1
>
>         Attachments: jee-app.ear, jee-app.ear
>
>
> If an application is packaged with MDBs and RAs (resource adapters) such that the order of deployment of these modules needs to be deterministic, the application fails to load.  In other words, there is no way to define the order in which MDBs and RAs must be loaded in an application.  This is a strict requirement by JEE 6, and without this support, JBoss 7 cannot be fully JEE 6 compliant.
> Theoretically, following are 3 different ways to accomplish the above objective:
> # Set <initialize-in-order> to true; see http://java.sun.com/xml/ns/javaee/application_6.xsd. This seems to be fixed in AS7-325, but I tested it using a sample application, and this definitely does not work for MDBs and RAs.
> # Add jboss-ejb3.xml in the MDB jar's MATA-INF to define the MDB's dependency on an RA.  Adding this configuration MUST ensure that the application loader loads the RA before trying to load the MDB. Development of this feature is still in progress (AS7-1211).
> # Add org.jboss.ejb3.annotation.Depends annotation on the MDB implementation, to do the same as #2.
> None of the above work in the nightly build of AS7.1.

--
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