Monday, July 13, 2009

A Simple Savan Enabled Publish-Subscribe Environment


This is a guide to create a simple publisher subscriber service environment using Apache Savan.

Step 1 : Setting up the environment
Before being able to run this example you need to do some steps to configure the environment. They are...
  • Setup Java
  • Install Apache Axis 2
  • Install Maven
  • Install Apache Ant
Please check here to get more information about these steps.

Step 2 : Build the sources
Download the source code from here.
Extract it.
Go to the \Savan\Savan Source folder using the command prompt.
Execute the following command. (mvn clean install)
Wait until all the sources are built successfully.
Go to the \Savan\Savan Source\modules\samples\eventing folder using the command prompt.
Execute the following command. (ant deploy)
Go to your AXIS2_HOME\lib folder.
Copy all the files in the AXIS2_HOME\lib folder to the \Savan\SavanTester\lib folder.

Step 3 : Configure the example
Open the \Savan\SavanTester\configuration.xml file.
Do the following changes.
Enter the IP adress of the Axis2 server, at the "serverIP" entry. (for localhost enter 127.0.0.1)
Enter the port number of the Axis2 server, at the "port" entry. (most of the time this is 8080)
Enter the path to the axis2.xml file in the AXIS2_HOME\conf folder, at the "conf" entry. (e.g. C:\axis2-1.4\conf\axis2.xml)
Enter the path to the repository folder in the AXIS2_HOME directory, at the "repo" entry. (e.g. C:\axis2-1.4\repository)

Step 4 : Run the example
Start the Axis2 server. For this go to the \AXIS2_HOME\axis2-1.4\bin folder using the command prompt and execute the following command. (axis2server.bat)
Run the SavanTester.jar file in the \Savan\SavanTester folder.
You will see the following screen.

Step 5 : Using the application
Start playing with it.
There are three publishers and three subscribers.
Use the buttons in the middle to subscribe or unsubscribe from any service.
After you have subscribed to some services you can fire a publishing event using the buttons on the top.
Keep your eye on the Axis2 console for information regarding subscriptions.
Enjoy.

1 comments:

Anonymous said...

I'm Serenity Autumn, currently living in Texas city, USA. I am a widow at the moment with Four kids and I was stuck in a financial situation in May 2019 and I needed to refinance and pay my bills. I tried seeking loans from various loan firms both private and corporate but never with success, and most banks declined my credit. But as God would have it, I was introduced to a woman of God a private loan lender who gave me a loan of 850,000.00 USD and today am a business owner and my kids are doing well at the moment, if you must contact any firm with reference to securing a loan without collateral , no credit check, no co signer with just 2% interest rate and better repayment plans and schedule, please contact  Mr Pedro On Email   pedroloanss@gmail.com    He doesn't know that I am doing this but I am so happy now and I decided to let people know more about him and also I want God to bless him more.

Post a Comment