6 Replies Latest reply on Mar 20, 2009 8:03 AM by ubhole

    jbi:projectUndeploy ? How to undeploy a project ?

    seymour-glass

      Greetings,

       

      Is there any way (maven goal, etc.) to undeploy projects, besides jconsole which does strange things ?

       

      Kind regards,

       

      Seymour

        • 1. Re: jbi:projectUndeploy ? How to undeploy a project ?
          ubhole

          you can use ant tasks to undeploy service assembly. the ant script is located in <servicemix-install>/ant directory.

          you can do something like this:

          ant -f servicemix-ant-task.xml -Dsm.host="hostname" -Dsm.port="1099" -Dsm.username="smx" -Dsm.password="smx" -Dsm.service.assembly.name=test-sa undeploy-service-assembly 

           

          Regards,

           

          Ulhas

          • 2. Re: jbi:projectUndeploy ? How to undeploy a project ?
            seymour-glass

            Thaks for that. I'm using maven by the way. I don't mind to use ant also ... What the sm.username and the sm.password parameters stand for as there is no any notion of user authentication ?

             

            Kind reagrds,

             

            Seymour

            • 3. Re: jbi:projectUndeploy ? How to undeploy a project ?
              ubhole
              seymour-glass wrote:

              What the sm.username and the sm.password parameters stand for as there is no any notion of user authentication ?

               

              Unfortunately, there is no jbi:undeployProject goal in jbi-maven-plugin. the ant task I mentioned are for JBI compliant ant tasks. It uses JMX Administration to do the deploy/undeploy/list and other JBI standard tasks.

               

              sm.username and sm.password are the username/password that JMX uses to authenticate with Servicemix container's JMX connector. By default, the username/password is set to smx/smx. you can change it by modifying conf/users-credentials.properties and conf/users-passwords.properties

               

              Regards,

               

              Ulhas

              • 4. Re: jbi:projectUndeploy ? How to undeploy a project ?
                ubhole

                I think FUSE ESB Deploy Guide may be of help to you to clarify the answer.

                 

                Ulhas

                • 5. Re: jbi:projectUndeploy ? How to undeploy a project ?
                  seymour-glass

                  Actually this command doesn't seem to work as it raises the following error:

                   

                  Buildfile: servicemix-ant-task.xml

                   

                  undeploy-service-assembly:

                         undeploy-service-assembly

                         undeploys a previously deployed service assembly in Sericemix.

                            host=localhost

                            port=2099

                            name=jms-consumer-sa

                  Error accessing ServiceMix administration: Failed to retrieve RMIServer stub: javax.naming.CommunicationException Root exception is java.rmi.ConnectIOException: non-JRMP server at remote endpoint

                   

                  I had to change servicemix's tcp port number to be 2099 because something eles used it. In order to do it, I changed the servicemix.properties file. Is that anything else to do ? The doc states that the jmx.xml file has also to be changed but this must be an error as this files uses the value set in servicemix.properties.

                   

                  So, how could i work around that ?

                   

                  Kind tregards,

                   

                  Seymour

                  • 6. Re: jbi:projectUndeploy ? How to undeploy a project ?
                    ubhole

                    I will take a look at it with non-default port and will let you know. AFAIK, you should not need to do anything else other than specifying the port.

                     

                    As regards to documentation, I will get the issue resolved and document updated by our Docs. team.

                     

                    Ulhas