How to get started with Mobicents
Author : Equizz
From TechnologicalWiki
Contents |
[edit] Introduction
"JSLEE is a low latency and high throughput application server for event processing designed for stringent requirements of core network signaling applications providing a distributed component model and a standardized framework."
JAIN SLEE is the Java standard for SLEE (Service Logic Execution Environment). It's an industry standard aimed at portable communications applications, and the point of integration for multiple network resources and protocols. Applications can use many different external network resources from within the JAIN SLEE environment. This specification allows developers to write robust components as integrates the well known ACID properties of transactions into the programming model. Components can be composed to solve more complex problems.
Mobicents is an open source JSLEE server. As it is an open source product, you are able to modify (under they conditions) and check any piece of code you get. Even with the effort the developers have put in it, there’s no too much information about how everything works or why is this or that developed in this way so I encourage visiting java.net forums for more information on any doubt developing or deploying.
[edit] How to build and run Mobicents 1.2.x from the sources.
You can download the binary distribution of Mobicents or the sources. This document’s scope is an installation via sources. You can use both cvs or svn to download the sources, or look for the project in sourceforge.
Once you have the sources in your machine, set up the MOBICENTS_HOME environment variable, in order to make it accessible for JBoss application Server.
Mobicents 1.2.X works with JBoss 4.2.X application server so you need to download it and you also have to set up JBOSS_HOME environment variable.
Now, mobicents can be built using ant (version 1.7 recommended) doing this:
- Execute
#MOBICENTS_HOME/antin order to build the sources.
- Once the built is successful go to
JBOSS_HOME/binand execute run.bat –mc (which is equivalent to run.bat –c all –b 127.0.0.1) in order to start Mobicents server.
- Now the server is running, but for any later deployment it is needed to have compiled specific ant tasks and mobicents cli. These tasks are inside
mobicents/toolsfolder and its deployment is also through an ant deployment descriptor, so execute:
#MOBICENTS_HOME/tools/ant-tasks/ant #MOBICENTS_HOME/tools/mobicents-cli/ant
You are now ready to deploy jslee services, events, sbbs or resource adaptors in your server.
[edit] Deploying a Resource Adaptor
The Resource Adaptor (RA) in JSLEE is the joint between the external events and the application. The language and environment of the events can be anything, the RA translate it into java events, allowing our applications to use them. We should deploy them into our JSLEE server to use them.
Let's see how to deploy an already built resource adaptor (bundled into deployable units) in a mobicents server. In the same way as any ant deployment descriptor, the resource adaptor is deployed using its ant file build.xml. This file contains targets for every action to be made with the code. Normally, resource adaptors bundle compile and deploy actions in a ra-deploy target. So:
Using ant:
Once mobicents server was deployed, execute #ant ra-deploy in RA_HOME directory, and the resource adaptor will be deployed.
[edit] Events and SBBs
JSLEE can handle external events. The resource adaptor (RA) listens external events, and it may generate jslee events than can be listened by the SBBs (Service Building Block). SBB is a service object that sends and receives internal jslee events, and manage the logic. SBBs can communicate themselves using jslee events.


