10 Replies Latest reply on Mar 13, 2006 5:53 AM by tylerdurden001

    spring deployment

    tylerdurden001

      Hello,

      i've a problem with the jboss-spring integration. The Jboss-Spring deployer runs befor the Persistence-Deployer and then the spring mbean can't find the JNDI bound Entitymanager. I think the Persistence should be deployed first. Any Idea how this could be done?

      Thanx

        • 1. Re: spring deployment
          alesj

          Look at the <JBOSS_HOME>\server\default\conf\xmdesc in org.jboss.deployment.MainDeployer-xmbean.xml.





          Add '.spring' with correct value and it should work.
          >> 550:.spring (for example)

          Rgds, Ales

          • 2. Re: spring deployment
            alesj

            Missing before:

             <descriptors>
             <value value="250:.rar,300:-ds.xml,400:.jar,500:.war,650:.ear,800:.bsh,900:.last"/>
             </descriptors>
            


            • 3. Re: spring deployment
              tylerdurden001

              Hello,

              i've changed my MainDeployer like that:




              Still the .spring deployes before the .ejb3. Why isn't the .ejb3 listet in this file?

              Regards

              • 4. Re: spring deployment
                tylerdurden001

                Sorry my MainDeployer:
                value="250:.rar,300:-ds.xml,400:.jar,450:.ejb3,500:.war,550:.spring,650:.ear,800:.bsh"

                • 5. Re: spring deployment
                  alesj

                  Even if you fix this in MainDeployer-xmbean.xml, your .spring archive gets deployed before other stuff?

                  Look at the server log if that is really the case.

                  Rgds, Ales

                  • 6. Re: spring deployment
                    tylerdurden001

                    It dosen't matter where i put the .spring in the MainDeployer. I get allways the same Error. Isn't there another Way? What if i have 2 .jars which depends on each other?

                    • 7. Re: spring deployment
                      alesj

                      Did you check in the log if .spring archive really is deployed before other stuff?

                      I think that changing of the MainDeployer-xmbean.xml should definitely work. I had the sam issue with different archive and it worked for me.

                      Maybe you can have you bean that's accessing EM lazy initialized.

                      What if i have 2 .jars which depends on each other?

                      That's more of a Spring issue - how do you deal with cycle dependency.
                      Maybe again lazy initialization?

                      Rgds, Ales

                      • 8. Re: spring deployment
                        tylerdurden001

                        yes. I checked the Log-File. I'm using Jboss4.0.4RC1 and i can't deploy the ejb3's before the .spring Archive. Maybe i can use the dependency tags?
                        If i have 2 .ejb3 files which depend on each other then there must be a way how tu solve this deploying dependency too, or not?

                        • 9. Re: spring deployment
                          alesj

                           


                          I'm using Jboss4.0.4RC1 and i can't deploy the ejb3's before the .spring Archive. Maybe i can use the dependency tags?


                          Uf, funny. Can you post this at some other forum - 'Installation, Configuration & Deployment', 'Management, JMX/JBoss' or 'Performance Tuning'.
                          Since, like I said, it worked for me. No idea why it doesn't work for you.


                          If i have 2 .ejb3 files which depend on each other then there must be a way how tu solve this deploying dependency too, or not?


                          This is a EJB3 forum issue.

                          • 10. Re: spring deployment
                            tylerdurden001

                            Hi,

                            i did look at the source of Jboss and i'm wondering why the deployment is not the same as in the application.xml

                            I have 1 .ear file with the applikation.xml:

                            a.ejb3
                            b.spring
                            c.ejb3
                            d.war

                            I thought the deployment should be in exakt that order. Any ideas?
                            thank you