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
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 ?
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
Actually this command doesn't seem to work as it raises the following error:
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 ?
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.