Monday, December 24, 2007

Deploying mobicents services on startup


I had spent about 20 minutes to search in the mobicents documentation to find out the way to make the mobicents deployments permanent. But unfortunately I could not find in the documents which I thought should be a important documentation for any such servers. It might be my mistake to look out the wrong documents or I am afraid, it might have missed in their documents.

But fortunately I didn't spend too much of time to find the way. It is of course an easy and straightforward task. but I wonder how this good procedure made unnoticed and not documented properly. My apologizes to mobicents community if I didn't really look into the correct documentations.

You just have to use a template BSH script to make it working .. thats it.

For example I need my http-servlet-ra to be deployed on server startup and make it permanent.

Here are the steps I followed.

  1. Copy the /resources/http-servlet-ra/*.jars into server/server/all/deploy-mobicents/
  2. Copy the /resources/http-servlet-ra/deploy-http-servlet-ra.bsh into server/server/all/deploy-mobicents/scripts/

Thats it. Your resource adapter will be installed on server startup. You don't have to do ant ra-deploy from ra folder anymore !

Now how about installing and activating our own sbb jars on startup? Simple .. I have a http connector sbb to be deployed and activated upon startup. These are the steps I followed to do so.

  1. Copy the httpconnectorsbb-DU.jar into server/server/all/deploy-mobicents/

  2. Now you have to write a httpconnectorsbb-DU.bsh file and copy in to server/server/all/deploy-mobicents/scripts/

Use the following sample bsh file and modify it for your service. Make sure you have the same name as your DU jar file name.

You may just have to modify these two variables. Add your sbb name, sbb vendor and the version mentioned in your sbb jar xml.

String thirdPCCTriggerURL = "${jboss.server.home.url}deploy-mobicents/ThirdPCCTrigger-DU.jar";
ServiceIDImpl serviceId = new ServiceIDImpl("se.jayway.sip.slee.service.ThirdPCCTrigger-service", "Jayway", "0.1");

Now start your mobicnets server and you will see your RAs and SBBs installed and activated there.

Coool !!!