Wednesday, September 30, 2009
How to run multiple WSO2 WSAS instances in a single host
I have published a simple three step tutorial on running multiple WSO2 WSAS instances in a single host in WSO2 Oxygen Tank. Have a look!
Wednesday, September 16, 2009
How to enable JMS in WSO2 WSAS-3.*
WSO2 WSAS provides with a simple and easily configurable UI to enable transports. In this post, we are going to look at how JMS is enabled in WSAS-3.* versions.
Pre-requisites:
----------------
You can use any JMS provider as you preferred. I'm going to use Apache ActiveMQ-5.2.0 for this example.
Download the latest version of WSO2 WSAS from here
Step 1
-------
Suppose you have downloaded WSO2 WSAS-3.* and extracted in to a directory in your file system. Let it be WSAS_HOME
First, we need to start ActiveMQ message broker. Go to ActiveMQ_Install_dir/bin and run activemq.bat
Also, the following ActiveMQ libraries must be copied to WSAS_HOME/repository/components/lib directory
Step 2
-------
Log in to WSAS management console (username=admin, password=admin) and click on Manage --> Transports at the left navigation menu.
You will be directed to the Transport Management page as follows.

Step 3
-------
Locate JMS transport in the above Transport Management page and click on enable next to transportListener
Following page will be shown where you can configure JMS listener according to your JMS provider.

similarly, you can enable JMSSender.
If JMS is configured correctly as in the above steps, you will see the JMS endpoints of your service will be shown in the WSDLs or service dashboard as follows.
Pre-requisites:
----------------
You can use any JMS provider as you preferred. I'm going to use Apache ActiveMQ-5.2.0 for this example.
Download the latest version of WSO2 WSAS from here
Step 1
-------
Suppose you have downloaded WSO2 WSAS-3.* and extracted in to a directory in your file system. Let it be WSAS_HOME
First, we need to start ActiveMQ message broker. Go to ActiveMQ_Install_dir/bin and run activemq.bat
Also, the following ActiveMQ libraries must be copied to WSAS_HOME/repository/components/lib directory
- activeio-core-3.1-SNAPSHOT.jar (ActiveMQ_Install_dir\lib\optional)
- activemq-core-5.0.0.jar (ActiveMQ_Install_dir\lib\)
- geronimo-j2ee-management_1.0_spec-1.0.jar (ActiveMQ_Install_dir\lib\)
- geronimo-jms_1.1_spec-1.0.jar (ActiveMQ_Install_dir\lib\)
Step 2
-------
Log in to WSAS management console (username=admin, password=admin) and click on Manage --> Transports at the left navigation menu.
You will be directed to the Transport Management page as follows.
Step 3
-------
Locate JMS transport in the above Transport Management page and click on enable next to transportListener
Following page will be shown where you can configure JMS listener according to your JMS provider.
similarly, you can enable JMSSender.
If JMS is configured correctly as in the above steps, you will see the JMS endpoints of your service will be shown in the WSDLs or service dashboard as follows.
Monday, September 7, 2009
WSO2 Carbon is among InfoWorlds best open source software
WSO2 has been named an InfoWorld 2009 Best of Open Source Software (Bossie) Award winner.
http://www.infoworld.com/d/open-source/best-open-source-platforms-and-middleware-758?current=9&last=8?r=76
Proud to be a member of the award winning team :)
http://www.infoworld.com/d/open-source/best-open-source-platforms-and-middleware-758?current=9&last=8?r=76
Proud to be a member of the award winning team :)
Friday, August 28, 2009
Where to put third party jars in WSO2 WSAS?
In the pre-carbon versions of WSO2 WSAS (2.* and older), you may have used WSAS_HOME/lib/extensions directory to put third party jars such as jdbc drivers.
After WSO2 WSAS became a part of WSO2 Carbon platform, a.k.a WSAS-3.* versions, all third party jars should be placed inside WSAS_HOME/repostiroy/components/lib directory of your WSAS distribution.
**This is applicable to all WSO2 Carbon products (WSAS, ESB, G-reg, IS, BPS)
After WSO2 WSAS became a part of WSO2 Carbon platform, a.k.a WSAS-3.* versions, all third party jars should be placed inside WSAS_HOME/repostiroy/components/lib directory of your WSAS distribution.
**This is applicable to all WSO2 Carbon products (WSAS, ESB, G-reg, IS, BPS)
Remotely starting OSGI console when WSO2 Carbon runs on an application server
When WSO2 Carbon based product (WSAS, ESB, G-reg, BPS, IS) runs in standalone mode, you can start server with equinox OSGI console just by issuing -DosgiConsole system property.
wso2server.bat -DosgiConsole
How do you connect to OSGI console when you are running Carbon on an application server such as WebSphere or WebLogic (or tomcat, JBoss etc..)?
1. Open WEB-INF/web.xml file of the carbon web application
2. Uncomment the following element
<init-param>
<param-name>osgiConsole</param-name>
<param-value>-console 19444</param-value>
</init-param>
3. Now restart carbon with these settings.
4. Open a new command window/shell and connect to osgiConsole using telnet as follows
telnet localhost 19444
wso2server.bat -DosgiConsole
How do you connect to OSGI console when you are running Carbon on an application server such as WebSphere or WebLogic (or tomcat, JBoss etc..)?
1. Open WEB-INF/web.xml file of the carbon web application
2. Uncomment the following element
<init-param>
<param-name>osgiConsole</param-name>
<param-value>-console 19444</param-value>
</init-param>
3. Now restart carbon with these settings.
4. Open a new command window/shell and connect to osgiConsole using telnet as follows
telnet localhost 19444
Saturday, August 15, 2009
How to deploy WSAS-3.X on Oracle WebLogic 10.3
Once Azeez has written a 10 minute guide to installing WSO2 WSAS on Weblogic server. That guide explains the steps to deploy 2.X family of WSAS on weblogic. With the introduction of WSO2 Carbon platform in December 2008, WSO2 WSAS is no longer distributed as a separate war distribution. Hence, the instructions given in that document is not applicable when deploying WSO2 WSAS-3.X series on Oracle WebLogic server.
Since all WSO2 java products are built on Carbon platform, users can configure running WSO2 products on any application server using a set of components included in binary distributions. I have already explained the steps to deploy WSO2 BPS on tomcat and WSO2 WSAS-3.X on Jboss.
This post describes the steps to deploy WSO2 WSAS-3.X on WebLogic 10.3
Step1
Create a new weblogic domain by running config.sh {bat} located at WebLogic_HOME/wlserver_10.3/common/bin directory.
Lets assume the new domain is wsas.
Access your weblogic domain direcrtory and start weblogic (Go to WebLogic_HOME/user_projects/domains/wsas/bin and run startWebLogic.cmd)
Step 2
Download the latest version of WSO2 WSAS-3.X from here. Extract the downloaded zip into a directory. Copy conf, database, repository and resources directories in to a new folder. Here after, we will refer it is wsas-repo (i.e:- C:\wsas\wsas-repo)
Also, create a new directory, wso2wsas and copy the WEB-INF directory located at the webapps/ROOT directory of the downloaded WSO2 WSAS-3.X to wso2wsas directory. Now, your wsas-repo should have five sub directories - conf, database, repository, resources and wso2wsas.
wso2wsas will be used as the webapp root directory.
Step 3
We need to enable SSL in weblogic server. Log in to weblogic administration console (You should have configured username and password for admin console when creating your WebLogic domain) and go to Environment --> servers. Select AdminServer.
Click on KeyStores tab. Configure keystores as shown below.
Keystore = Custom Identity & Custom Trust
Custom Identity Keystore = C:\wsas\wsas-repo\resources\security\wso2carbon.jks
Custom Identity Keystore Type = JKS
Custom Identity Keystore Passphrase = wso2carbon
Confirm Custom Identity Keystore Passphrase = wso2carbon
Custom Trust Keystore = C:\wsas\wsas-repo\resources\security\wso2carbon.jks
Custom Trust Keystore Type = JKS
Custom Trust Keystore Passphrase = wso2carbon
Confirm Custom Trust Keystore Passphrase = wso2carbon
Now, select SSL tab and enter the following values.
Identity and trust locations = keystores
Private Key Alias = wso2carbon
Private Key Passphrase = wso2carbon
Confirm Private Key Passphrase = wso2carbon
Save the configuration and go to the General tab. Select the check box next to "SSL listen port enabled".
Now we have configured the necessary changes to enable SSL on weblogic. Lets continue with deploying WSO2 WSAS on weblogic.
Step 4
Now, we should update the set of config files shipped with WSO2 WSAS. We will update carbon.xml, axis2.xml, registry.xml and user-mgt.xml which can be found at the above wsas-repo\conf directory.
First, open carbon.xml and update the ServerURL element as follows.
Note that we have configured weblogic to run on 7002 port.
Update WebContextRoot element as follows.
<WebContextRoot>/wso2wsas</WebContextRoot>
Save and close carbon.xml.
Open registry.xml and update DB URL as follows.
Now, open user-mgt.xml and update database URL as follows.
<url>
Make sure to specify the absolute path of the WSO2CARBON_DB in both of the above elements.
We must change the http and https ports in In Transports section of axis2.xml as follows.
<transportReceiver name="http"
class="org.wso2.carbon.core.transports.http.HttpTransportListener">
<parameter name="port">7001</parameter>
</transportReceiver>
<transportReceiver name="https"
class="org.wso2.carbon.core.transports.http.HttpsTransportListener">
<parameter name="port">7002</parameter>
</transportReceiver>
Step 5
We have completed the required configurations and we can deploy WSO2 WSAS on weblogic now.
First, shutdown the weblogic server instance if it is still running.
open a new command window and change the directory to WebLogic_HOME/user_projects/domains/wsas/bin.
Define an environment variable called CARBON_HOME and set the path to your wsas-repo directory.
In windows; set CARBON_HOME=C:\wsas\wsas-repo
In linux; export CARBON_HOME=\home\user\wsas\wsas-repo
Run startWebLogic.cmd
Once the server is started successfully, log in to weblogic administration console using https://localhost:7002/console
Then, go to the Summary of Deployments page and select Install.
Locate the deployment root by selecting C:\wsas\wsas-repo\wso2wsas directory. (web app root directory will be shown with a radio button option as follows.
Click on next to proceed through the wizard and continue with the default settings.
Once the deployment is successful, save the configuration and select start --> servicing all requests
Now, we are done with the deployment. You could access the management console using https:\\localhost:7002\wso2wsas\carbon
Note:-
1. In order to set the log4j logs, you may copy log4j.properties file in the extracted WSO2WSAS-3.X directory to wsas-repo\wso2wsas\WEB-INF\classes
2. If you want to deploy JaxWS services in WSAS/WebLogic platform, you should do the following configuration to avoid a class casting issue (https://wso2.org/jira/browse/CARBON-4835)
- Remove weblogic.jar/META-INF/services/com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExtension & restart Carbon
3. Also, Make sure to copy xalan-*.jar, xercesImpl-*.jar and xml-apis-*.jar from the lib/endorsed directory of the extracted WSAS binary distribution to weblogic endorsed directory before you start WSAS.
Thursday, July 9, 2009
Build your own server using WSO2 Carbon components
Building a customized server with a set of components downloading from a public repository...
It is no longer a hard and complex task. Now you can build your own version of WSO2 carbon platform using its Equinox P2 based provisioning capabilities.
This post guide you through the steps to build your own server platform using WSO2 carbon-2.0.0.
Pre-requisites:
Download the latest version of WSO2 Carbon server. WSO2 Carbon is the base platform on which we build our customized server.
Step 1
Start carbon server with osgiConsole so that we can issue commands to manage OSGI framework.
cd CARBON_HOME/bin (CARBON_HOME is the location where you unzipped wso2carbon-2.0.0.zip)
wso2server.bat -DosgiConsole
Step 2
Next, we need to specify artifact and metadata repositories from which we download several features and their metadata.
In the osgi console, issue the following commands.
osgi>provaddrepo http://dist.wso2.org/p2/carbon/releases/2.0
osgi>provaddartifactrepo http://dist.wso2.org/p2/carbon/releases/2.0

Step 3
Lets check the installable features included in the above artifact repository.
osgi>provlg
This will list down all the features available in the specified artifact repository as follows.

Step 4
Now we have connected to the artifcat and metadata repositories and looked at the installable features. Suppose we need to build our customized server with the following components out of the features included in the artifact repo.
osgi>provinstall org.wso2.carbon.dataservices.feature.group 2.0.0
If the installation is successful, you will get "installation complete" message.
Similarly, you can install service management and tools features.
osgi>provinstall org.wso2.carbon.tools.feature.group 2.0.0
osgi>provinstall org.wso2.carbon.tools.feature.group 2.0.0

Step 5
Now you must restart carbon server to apply the changes you have done to the server.
Issue the following command to shutdown the server.
osgi>shutdownCarbon
Start the server again using wso2server.bat{sh}
After server is started, access management console using http://localhost:9443/carbon
Log in to management console using the default admin credentials (admin/admin)

You should notice that the data services, service management and tools features are added to the carbon core platform. In other words, we have built our own server on top of carbon-core server.
Simple.. isn't it?
It is no longer a hard and complex task. Now you can build your own version of WSO2 carbon platform using its Equinox P2 based provisioning capabilities.
This post guide you through the steps to build your own server platform using WSO2 carbon-2.0.0.
Pre-requisites:
Download the latest version of WSO2 Carbon server. WSO2 Carbon is the base platform on which we build our customized server.
Step 1
Start carbon server with osgiConsole so that we can issue commands to manage OSGI framework.
cd CARBON_HOME/bin (CARBON_HOME is the location where you unzipped wso2carbon-2.0.0.zip)
wso2server.bat -DosgiConsole
Step 2
Next, we need to specify artifact and metadata repositories from which we download several features and their metadata.
In the osgi console, issue the following commands.
osgi>provaddrepo http://dist.wso2.org/p2/carbon/releases/2.0
osgi>provaddartifactrepo http://dist.wso2.org/p2/carbon/releases/2.0
Step 3
Lets check the installable features included in the above artifact repository.
osgi>provlg
This will list down all the features available in the specified artifact repository as follows.
Step 4
Now we have connected to the artifcat and metadata repositories and looked at the installable features. Suppose we need to build our customized server with the following components out of the features included in the artifact repo.
- data services
- service management
- tools
osgi>provinstall org.wso2.carbon.dataservices.feature.group 2.0.0
If the installation is successful, you will get "installation complete" message.
Similarly, you can install service management and tools features.
osgi>provinstall org.wso2.carbon.tools.feature.group 2.0.0
osgi>provinstall org.wso2.carbon.tools.feature.group 2.0.0
Step 5
Now you must restart carbon server to apply the changes you have done to the server.
Issue the following command to shutdown the server.
osgi>shutdownCarbon
Start the server again using wso2server.bat{sh}
After server is started, access management console using http://localhost:9443/carbon
Log in to management console using the default admin credentials (admin/admin)
You should notice that the data services, service management and tools features are added to the carbon core platform. In other words, we have built our own server on top of carbon-core server.
Simple.. isn't it?
Subscribe to:
Posts (Atom)