7 Replies Latest reply on Mar 9, 2005 11:03 PM by citystory

    Service (SAR file) that relies on an EJB...

    daorriss

      I have someone developing a service for me (in a SAR) file that requires access to an EJB. On the surface this isn't a problem, except that SAR files deploy *before* EJBs do. How does he write the service to avoid using the EJB until it's deployed??? Seems like it's not possible to make it part of an EAR file (but I could be wrong).

      Thanks..!!

      P.S. And if there's a better forum here to post this question to please let me know.. Thanks..!

        • 1. Re: Service (SAR file) that relies on an EJB...
          starksm64

          The ejb container has a jmx name of the form

          "jboss.j2ee:service=EJB" + ",jndiName=" + jndiName
          


          where jndiName is the name of the home interface, or the local home if the ejb does not provide a remote home.

          You can also embed the ejb jar in the sar and use the Russian doll depth first deployment order to ensure the ejb is deployed before the containing sar.


          • 2. Re: Service (SAR file) that relies on an EJB...
            daorriss

             

            "scott.stark@jboss.org" wrote:
            The ejb container has a jmx name of the form

            "jboss.j2ee:service=EJB" + ",jndiName=" + jndiName
            


            where jndiName is the name of the home interface, or the local home if the ejb does not provide a remote home.

            You can also embed the ejb jar in the sar and use the Russian doll depth first deployment order to ensure the ejb is deployed before the containing sar.


            Scott,

            Thanks for writing back. You live in Snoqualmie Pass, eh? I didn't even know they had internet access out there now.. ;)

            OK.. the second option you mentioned - I understood. And that might be doable. But the first one - that threw me off. You explained the JMX name, but I don't see how I would *access* that or why I would use it..

            Thanks for your time.

            DaveO

            • 3. Re: Service (SAR file) that relies on an EJB...
              daorriss

              Steve,

              Still having a hard time getting your suggestion to work.. any example you can point out?

              • 4. Re: Service (SAR file) that relies on an EJB...
                pique


                jboss.j2ee:service=EJB,jndiName=BEANNAME

                • 5. Re: Service (SAR file) that relies on an EJB...
                  pique

                   

                  <mbean code="com.some.body.class.name"
                   name="ISS:service=UUU">
                   <depends>jboss.j2ee:service=XXX,jndiName=YYY</depends>
                   </mbean>


                  • 6. Re: Service (SAR file) that relies on an EJB...
                    daorriss

                     

                    "pique" wrote:
                    <mbean code="com.some.body.class.name"
                     name="ISS:service=UUU">
                     <depends>jboss.j2ee:service=XXX,jndiName=YYY</depends>
                     </mbean>


                    THAT was was I needed.

                    THANK you.

                    • 7. Re: Service (SAR file) that relies on an EJB...
                      citystory

                      What if the bean is on another JBoss server?


                      "scott.stark@jboss.org" wrote:
                      The ejb container has a jmx name of the form

                      "jboss.j2ee:service=EJB" + ",jndiName=" + jndiName
                      


                      where jndiName is the name of the home interface, or the local home if the ejb does not provide a remote home.

                      You can also embed the ejb jar in the sar and use the Russian doll depth first deployment order to ensure the ejb is deployed before the containing sar.