2 Replies Latest reply on Mar 12, 2012 11:06 AM by haifen_bi

    Deployment order for ear and data source

    haifen_bi

      We have an issue related to the order of data source binding and ear deployment.

       

      In our particular application, Our data source is an ear  deployment module containing a JCA and some ejbs. This data source is specified in standalone.xml, so one of the clinet (a teiid application) can access. The problem we encounted is that data source binding in standalone.xml heppened before the ear got deployed, resulting in error of  missing/unsatisfied dependencies:

       

      Here's the scenario:

       

      The application server has:

       

      (1) a ear deployment module containing a JCA and some ejbs(for remote/local access)

      (2) data source definition in standalone.xml specifying how to access this JCA (a jdbc compliant application).

       

      With above configuration, JBOSS will always try to binding the data source (not avalibale yet) before the the deployemnt of ear file.

       

      We have a requirement to deploy both ear and its Teiid client at some JBOSS container. What can we do in this scenario to ensure the ear is deployed before data source binding ?

       

      We are using JBoss 7.1 final.

       

      Any help is highly appreciated.

        • 1. Re: Deployment order for ear and data source
          wdfink

          One possibility is to pack the JCA in a separate module and copy it to modules/.../.../main, see wiki how to do it.

          In this case the DS force module load.

           

          And, if I remember correct it will be possible to pack the DS in you ear also, but I'm not sure ATM.

          • 2. Re: Deployment order for ear and data source
            haifen_bi

            Thanks!

             

            I forgot to mention that data source access is through a remote ejb with connection properties define in data source like:

             

            <connection-url>

                 jdbc:scwapi:client_id=dsds

            </connection-url>

            <connection-property name="server_path">

                 //jee:phdh-build-rmi.lgc.com:4447/jee_powerhub

            </connection-property>

             

            This remote ejb calls JCA interfaces to start server, etc.

             

            So not only does the JCA but also EJB modules have to be loaded, before data source can been binded.

            Any suggestion as how to make it work?