9 Replies Latest reply on Jan 15, 2004 9:40 PM by jamy_blue

    deployment API?

    jamy_blue Newbie

      Does JBoss have deployment API that developers can use it to deploy an application programmatically?
      And how to use the API to deploy?
      Could someone give me some examples?
      Thanks.

        • 1. Re: deployment API?
          John Emerson Newbie

          JBoss is hot deployable. Is there some reason why you don't want to just write code that copies/moves your jar into the deploy directory? If so, you'll have to create your own Deployment info and call MainDeployer.create.

          • 2. Re: deployment API?
            jamy_blue Newbie

            Yes. I do have some reason to do that.
            Could you give me an example about using MainDeployer?
            I'm very thankful.

            • 3. Re: deployment API?
              John Emerson Newbie

              Check out the test suite:

              jboss-3.2.3-src/testsuite/src/main/org/jboss/test/jmx/test
              jboss-3.2.3-src/testsuite/src/main/org/jboss/test/JBossTestCase.java

              • 4. Re: deployment API?
                jamy_blue Newbie

                Thanks, I read the source code of JBoss, but I still confused about how to deploy and config on JBoss....:(

                Could you show me a clear example?
                Thank you again!

                • 5. Re: deployment API?
                  John Emerson Newbie

                  Sorry,
                  I don't have anything other than what I already suggested.
                  jj

                  • 6. Re: deployment API?
                    jamy_blue Newbie

                    I use RMIAdapter to invoke the EJB, but after I restart the JBOSS AS, I can not find the EJB any more.

                    What's the problem? How to make the EJB persistent?
                    May I manage it by MBean? How to do it ?
                    Could someone help me?

                    • 7. Re: deployment API?
                      Darran Lofthouse Master

                      Ok lets just check that I understand your post correctly :-

                      I use RMIAdapter to invoke the EJB, but after I restart the JBOSS AS, I can not find the EJB any more.

                      Is interpreted as :-

                      I use RMIAdapter to deploy the EJB, but after I restart the JBOSS AS, I can not find the EJB any more.


                      What's the problem? How to make the EJB persistent?

                      Should be interpreted as :-

                      What's the problem? How can I make sure that the EJB is deployed next time JBoss is started?


                      If I have interpreted your post correctly, when JBoss starts up it does not use a list of previously deployed components it just searches the deploy folder for items to deploy.

                      You have two options :-

                      1) - Place the component being deployed in the deploy folder so that it will be picked up in the future. (You haven't explained why you can't do this).

                      2) - Implement a component to cache the components being deployed and when JBoss starts up you can ask the MainDeployer to deploy them again.

                      • 8. Re: deployment API?
                        Raja Master

                         

                        "raja05" wrote:
                        Or add the external directory containing ur deployment unit to the list of directories scanned for deployment.



                        • 9. Re: deployment API?
                          jamy_blue Newbie

                          Thank you, raja05 and darranl!

                          You're right. When JBoss restarts, it just loads the deployment under it's own deploy directory. It's a problem.
                          I do all that because I supposed I can't access the JBOSS directories.

                          I'm very interesting in what raja05 said:

                          add the external directory containing ur deployment unit to the list of directories scanned for deployment.
                          Can you tell me how to do it?

                          Thanks a lot!