10 Replies Latest reply on Apr 20, 2011 10:41 AM by oli83

    Prevent EJB deployment

    oli83

      Hi,

       

      For our project, we developed an application that we deploy in JBOSS 5.1.0.GA.

       

      For a new software integration, we have to add some librairies in our EAR. Some of these have annotated classes (EJB).

       

      We dont want to deploy those EJBs as we just want to use some pojos in the new jars.

       

      The problem is that JBOSS try to deploy them.

       

      Ma question is, how to prevent EJBs deployment in JBOSS ?

       

      Thanks in advance

        • 1. Prevent EJB deployment
          wdfink

          I did not understand your requirement exactly.

          How is the internal structure of the EAR file?

          Do you mean that you don't want to redeploy the classes if you change the EAR only for addig libs?

          • 2. Prevent EJB deployment
            oli83

            I guess my english was not so good. Sorry

             

            Our EAR looks like this :

             

            application.ear /

                 lib/

                      jar1.jar

                      jar2.jar

                      ...

                      jarn.jar

                      external_application_lib.jar ==> Contains EJB annotations

                 META-INF/

                 war1.war

                 war2.war

                

            As you can see, the external_application_lib.jar in the lib directory contains some classes with EJB annotations. So JBOSS try to deploy them as EJB. But I don't want those EJB to be deployed, I just want to use some classes in external_application_lib.jar.

             

            Ask me if you have more questions

             

            Thanks

            • 3. Re: Prevent EJB deployment
              wolfc

              I'm curious, what if you add the following to the EJB jar:

              <?xml version="1.0" encoding="UTF-8"?>
              <ejb-jar
                      xmlns="http://java.sun.com/xml/ns/javaee"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                                          http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
                      version="3.0"
                      metadata-complete="true">
              </ejb-jar>
              • 4. Prevent EJB deployment
                oli83

                Hi,

                 

                Doesn't work with the ejb-jar file

                • 5. Prevent EJB deployment
                  jaikiran

                  Any chance you can upgrade to JBoss AS 6.0.0.Final and try it there?

                  • 6. Prevent EJB deployment
                    oli83

                    Hi,

                     

                    I have to use 5.1.0.GA, it is a client requirement

                    • 7. Prevent EJB deployment
                      wdfink

                      What about if you place the 'external_application_lib.jar' in server/.../lib, I suppose there is no check for EJB annotations.

                      I think your external jar is provided by a third party and you do not want to change it, right?

                      • 8. Prevent EJB deployment
                        oli83

                        Wolf-Dieter Fink a écrit:

                         

                        What about if you place the 'external_application_lib.jar' in server/.../lib, I suppose there is no check for EJB annotations.

                        I think your external jar is provided by a third party and you do not want to change it, right?

                        You're right, I can't change the external jar because is provided by a third party.

                         

                        I tried to put le jar in the lib of the server, jboss is still trying to deploy it...

                        • 9. Prevent EJB deployment
                          wdfink

                          to be sure ...

                          do you remove the jar from your application.ear ?

                          • 10. Prevent EJB deployment
                            oli83

                            Wolf-Dieter Fink a écrit:

                             

                            to be sure ...

                            do you remove the jar from your application.ear ?

                            Yes I did