<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-59077094557892</id><updated>2012-01-17T00:31:42.006-08:00</updated><title type='text'>Evanthika Amarasiri's Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>28</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-59077094557892.post-8785300460612855783</id><published>2011-11-07T21:32:00.000-08:00</published><updated>2011-11-07T21:37:50.914-08:00</updated><title type='text'>How to resolve 'ORA-01882: timezone region not found' when starting WSO2 product servers with Oracle</title><content type='html'>&lt;pre  style="font-family:verdana;"&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;Have you ever come across the below issue when starting any of the WSO2&lt;br /&gt;Carbon servers,pointing to an Oracle database?&lt;/span&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); display: block; padding: 5px;font-family:courier new;font-size:85%;"  &gt;Caused by: org.wso2.carbon.user.core.UserStoreException:&lt;br /&gt;Database Error - Cannot create PoolableConnectionFactory&lt;br /&gt;(ORA-00604: error occurred at recursive SQL level 1ORA-01882: timezone region&lt;br /&gt;not found) at org.wso2.carbon.user.core.claim.dao.ClaimDAO.getDialectCount&lt;br /&gt;(ClaimDAO.java:168) at org.wso2.carbon.user.core.common.DefaultRealm.&lt;br /&gt;populateProfileAndClaimMaps(DefaultRealm.java:278) at&lt;br /&gt;org.wso2.carbon.user.core.common.DefaultRealm.init(DefaultRealm.java:109)&lt;br /&gt;at org.wso2.carbon.user.core.common.DefaultRealmService.initializeRealm&lt;br /&gt;(DefaultRealmService.java:240) ... 17 moreCaused by:&lt;br /&gt;org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory&lt;br /&gt;(ORA-00604: error occurred at recursive SQL level 1ORA-01882:&lt;br /&gt;timezone region  not found) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory&lt;br /&gt;(BasicDataSource.java:1549) at org.apache.commons.dbcp.BasicDataSource.createDataSource&lt;br /&gt;(BasicDataSource.java:1388) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)&lt;br /&gt;at org.wso2.carbon.user.core.claim.dao.ClaimDAO.getDialectCount(ClaimDAO.java:158)&lt;br /&gt;... 20 more&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;Well, if you have, all you have to do is, set the below JAVA property&lt;br /&gt;in the terminal that you are running the server on, before starting the&lt;br /&gt;server (+05:30 if you are in Sri Lanka. May vary from the location that&lt;br /&gt;you are in).&lt;/span&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); display: block; padding: 5px;font-family:courier new;font-size:85%;"  &gt;&lt;b&gt;export JAVA_OPTS="-Duser.timezone=='+05:30'&lt;/b&gt;"&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-8785300460612855783?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/8785300460612855783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=8785300460612855783' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/8785300460612855783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/8785300460612855783'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2011/11/how-to-resolve-ora-01882-timezone.html' title='How to resolve &apos;ORA-01882: timezone region not found&apos; when starting WSO2 product servers with Oracle'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-7242823632373831501</id><published>2011-03-23T00:21:00.000-07:00</published><updated>2011-03-23T00:22:59.622-07:00</updated><title type='text'>How to make Java Bench work for HTTPS</title><content type='html'>Inorder to make Javabench work with HTTPS, you need to follow the below given steps&lt;br /&gt;&lt;br /&gt;First extract the cert from the client-truststore of ESB&lt;br /&gt;=========================================================&lt;br /&gt;keytool -export -alias wso2carbon -file wso2carbon.crt -keystore client-truststore.jks &lt;br /&gt;&lt;br /&gt;Then import the wso2esb.crt to java's cacert&lt;br /&gt;=============================================&lt;br /&gt;keytool -import -alias wso2carbon -file "/home/ESB/3.0.1/wso2esb-3.0.1/resources/security/wso2carbon.crt" -keystore /opt/software/java/SUN_JDK-1.6/jdk1.6.0_21/jre/lib/security/cacerts&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-7242823632373831501?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/7242823632373831501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=7242823632373831501' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/7242823632373831501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/7242823632373831501'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2011/03/how-to-make-java-bench-work-for-https.html' title='How to make Java Bench work for HTTPS'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-360891030589566110</id><published>2010-12-02T20:38:00.000-08:00</published><updated>2010-12-02T20:44:20.161-08:00</updated><title type='text'>Resolution for 'java.lang.OutOfMemoryError: PermGen space'</title><content type='html'>&lt;pre style="font-family:verdana;"&gt;&lt;span style=";font-family:courier new;font-size:85%;"&gt;When running my application on Tomcat, &lt;br /&gt;I came across 'java.lang.OutOfMemoryError: PermGen space' and in-order &lt;br /&gt;to resolve it, all I had to do was set the following parameter as a &lt;br /&gt;JAVA_OPTS param on the command window which I was running Tomcat on.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;$ export JAVA_OPTS="-XX:MaxPermSize=256m"&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-360891030589566110?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/360891030589566110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=360891030589566110' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/360891030589566110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/360891030589566110'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2010/12/resolution-for-javalangoutofmemoryerror.html' title='Resolution for &apos;java.lang.OutOfMemoryError: PermGen space&apos;'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-399951344000846259</id><published>2010-07-29T20:32:00.000-07:00</published><updated>2010-07-29T20:42:37.884-07:00</updated><title type='text'>How to run JConsole with JTop</title><content type='html'>&lt;pre  style="font-family:verdana;"&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;If you need to run JConsole with JTop, all you have to use&lt;br /&gt;is the following command and it will appear as a new tab on&lt;br /&gt;JConsole.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-family:courier new;font-size:85%;"  &gt;$ jconsole -pluginpath &lt;i&gt;JDK_HOME&lt;/i&gt;/demo/management/JTop/JTop.jar&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-399951344000846259?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/399951344000846259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=399951344000846259' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/399951344000846259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/399951344000846259'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2010/07/how-to-run-jconsole-with-jtop.html' title='How to run JConsole with JTop'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-1224060505970098648</id><published>2010-07-20T22:22:00.000-07:00</published><updated>2010-08-09T03:05:02.139-07:00</updated><title type='text'>How to resolve error referring to the text "ap_cache_cacheable_hdrs_out" when starting Apache HTTP Server</title><content type='html'>I came across a need to enable the following links for the Apache HTTP Server, in order to enable response caching. Go to /etc/apache2 folder and give the following commands.&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt; ln -s ../mods-available/file_cache.load file_cache.load&lt;br /&gt;ln -s ../mods-available/mem_cache.conf mem_cache.conf&lt;br /&gt;ln -s ../mods-available/mem_cache.load mem_cache.load&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Once the above links were created, I tried to restart the server and it threw the following error&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;* Starting web server apache2&lt;br /&gt;apache2: Syntax error on line 204 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apache2/mods-enabled/mem_cache.load: Cannot load /usr/lib/apache2/modules/mod_mem_cache.so into server: /usr/lib/apache2/modules/mod_mem_cache.so: undefined symbol: ap_cache_cacheable_hdrs_out                                                                                                                                                            [fail]&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;To resolve this all I had to do was, add the following line to the apach2.conf file before # Include module configuration: section&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt; LoadModule cache_module /usr/lib/apache2/modules/mod_cache.so&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-1224060505970098648?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/1224060505970098648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=1224060505970098648' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/1224060505970098648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/1224060505970098648'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2010/07/how-to-resolve-error-referring-to-text.html' title='How to resolve error referring to the text &quot;ap_cache_cacheable_hdrs_out&quot; when starting Apache HTTP Server'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-4878583678106577990</id><published>2010-07-16T20:51:00.000-07:00</published><updated>2010-07-16T21:03:38.482-07:00</updated><title type='text'>How to generate HTTP 1.0 requests</title><content type='html'>While verifying some scenarios with WSO2 ESB I had the need to send HTTP 1.0 POST messages. Then came cURL to the rescue. I just had to use the option -0 or --http1.0 when sending the request like shown below.&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt; $ curl -s "http://localhost:8280/services/Axis2Service" -d @soap11_echoString.xml -H "Content-Type:text/xml; charset=UTF-8" -H "SOAPAction: urn:echoString" -0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt; $ curl -s "http://localhost:8280/services/Axis2Service" -d @soap11_echoString.xml -H "Content-Type:text/xml; charset=UTF-8" -H "SOAPAction: urn:echoString" --http1.0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When viewed through TCPMon, you will see how it sends a HTTP 1.0 message&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt; POST /services/Axis2Service HTTP/1.0&lt;br /&gt;User-Agent: curl/7.18.2 (x86_64-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.10&lt;br /&gt;Host: 127.0.0.1:7001&lt;br /&gt;Accept: */*&lt;br /&gt;Content-Type:text/xml; charset=UTF-8&lt;br /&gt;SOAPAction: urn:echoString&lt;br /&gt;Content-Length: 273&lt;br /&gt;&lt;br /&gt;&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&lt;br /&gt;   &amp;lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&amp;gt;   &lt;br /&gt;      &amp;lt;soap:Body&amp;gt;      &lt;br /&gt;         &amp;lt;ser:echoString xmlns:ser="http://service.carbon.wso2.org"&amp;gt;         &lt;br /&gt;            &amp;lt;ser:s&amp;gt;Hello!!!&amp;lt;/ser:s&amp;gt;      &lt;br /&gt;         &amp;lt;/ser:echoString&amp;gt;   &lt;br /&gt;      &amp;lt;/soap:Body&amp;gt;&lt;br /&gt;   &amp;lt;/soap:Envelope&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-4878583678106577990?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/4878583678106577990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=4878583678106577990' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/4878583678106577990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/4878583678106577990'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2010/07/how-to-generate-http-10-requests.html' title='How to generate HTTP 1.0 requests'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-2444652837937447470</id><published>2010-07-06T07:35:00.000-07:00</published><updated>2010-08-09T02:58:53.463-07:00</updated><title type='text'>Making the resources of a WSO2 ESB READ-WRITE node available in the READ-ONLY node of a cluster</title><content type='html'>If you have a cluster of WSO2 ESB nodes and if you need to make the resources of the READ_WRITE node available on the READ-ONLY nodes all you have to do is set up a property in the carbon.xml. For the WSO2 ESB instances to be in a cluster, you need to have a WSO2 Governance Registry instance as well since in 3.0.x family, the resource that are created in WSO2 ESB are saved to a configuration/governance registry. In order to witness this, following steps should be followed.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1 - Setting up the governance and configuration registry instances&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;a) Download the latest WSO2 Governance Registry distribution from here.&lt;br /&gt;&lt;br /&gt;b) Extract the downloaded WSO2 Governance Registry distribution to two separate directories.&lt;br /&gt;E.g.: - Extract the distribution to a folder named config-reg and gov-reg&lt;br /&gt;&lt;br /&gt;c) Change the http/https ports (of the mgt-transports.xml) of these two instances so that it is possible for you to start the two registry instances on the same machine.&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;E.g. :- Assume that the ports were configured as below&lt;br /&gt;Governance registry&lt;br /&gt;- HTTP port - 9763&lt;br /&gt;- HTTPS port - 9443&lt;br /&gt;Configuration registry&lt;br /&gt;- HTTP port - 9764&lt;br /&gt;- HTTPS port - 9444&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;d) Change the registry.xml files of the governance and configuration registries as follows to connect to an external database (Let us assume that the two registry instances will be connected to two separate MySQL databases)&lt;br /&gt;&lt;br /&gt;i) Add the following dbConfig to the registry.xml of the governance registry instance (gov-reg)&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;&amp;lt;dbconfig name="gov_registry"&amp;gt;&lt;br /&gt;  &amp;lt;url&amp;gt;jdbc:mysql://localhost:3306/reg_gov_db&amp;lt;/url&amp;gt;&lt;br /&gt;  &amp;lt;username&amp;gt;wso2&amp;lt;/username&amp;gt;&lt;br /&gt;  &amp;lt;password&amp;gt;wso2&amp;lt;/password&amp;gt;&lt;br /&gt;  &amp;lt;drivername&amp;gt;com.mysql.jdbc.Driver&amp;lt;/drivername&amp;gt;&lt;br /&gt;  &amp;lt;maxactive&amp;gt;50&amp;lt;/maxactive&amp;gt;&lt;br /&gt;  &amp;lt;maxwait&amp;gt;60000&amp;lt;/maxwait&amp;gt;&lt;br /&gt;  &amp;lt;minidle&amp;gt;5&amp;lt;/minidle&amp;gt;&lt;br /&gt;&amp;lt;/dbconfig&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;ii) Add the following two dbConfig configurations to the registry.xml of the configuration registry instance (config-reg)&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;&amp;lt;dbconfig name="config_registry"&amp;gt;&lt;br /&gt;  &amp;lt;url&amp;gt;jdbc:mysql://10.100.1.153:3306/reg_config_db&amp;lt;/url&amp;gt;&lt;br /&gt;  &amp;lt;username&amp;gt;wso2&amp;lt;/username&amp;gt;&lt;br /&gt;  &amp;lt;password&amp;gt;wso2&amp;lt;/password&amp;gt;&lt;br /&gt;  &amp;lt;drivername&amp;gt;com.mysql.jdbc.Driver&amp;lt;/drivername&amp;gt;&lt;br /&gt;  &amp;lt;maxactive&amp;gt;50&amp;lt;/maxactive&amp;gt;&lt;br /&gt;  &amp;lt;maxwait&amp;gt;60000&amp;lt;/maxwait&amp;gt;&lt;br /&gt;  &amp;lt;minidle&amp;gt;5&amp;lt;/minidle&amp;gt;&lt;br /&gt;&amp;lt;/dbconfig&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;dbconfig name="gov_registry"&amp;gt;&lt;br /&gt;  &amp;lt;url&amp;gt;jdbc:mysql://localhost:3306/reg_gov_db&amp;lt;/url&amp;gt;&lt;br /&gt;  &amp;lt;username&amp;gt;wso2&amp;lt;/username&amp;gt;&lt;br /&gt;  &amp;lt;password&amp;gt;wso2&amp;lt;/password&amp;gt;&lt;br /&gt;  &amp;lt;drivername&amp;gt;com.mysql.jdbc.Driver&amp;lt;/drivername&amp;gt;&lt;br /&gt;  &amp;lt;maxactive&amp;gt;50&amp;lt;/maxactive&amp;gt;&lt;br /&gt;  &amp;lt;maxwait&amp;gt;60000&amp;lt;/maxwait&amp;gt;&lt;br /&gt;  &amp;lt;minidle&amp;gt;5&amp;lt;/minidle&amp;gt;&lt;br /&gt;&amp;lt;/dbconfig&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;iii) In addition to the above add the following configuration to the registry.xml of the configuration registry (config-reg). This configuration will be used to mount the governance registry instance to this particular configuration registry instance.&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;&amp;lt;remoteinstance url=""&amp;gt;:9443/gov/registry"&amp;gt;&lt;br /&gt;  &amp;lt;id&amp;gt;gov_reg&amp;lt;/id&amp;gt;&lt;br /&gt;  &amp;lt;dbconfig&amp;gt;gov_registry&amp;lt;/dbconfig&amp;gt;&lt;br /&gt;  &amp;lt;readonly&amp;gt;false&amp;lt;/readonly&amp;gt;&lt;br /&gt;  &amp;lt;registryroot&amp;gt;/&amp;lt;/registryroot&amp;gt;&lt;br /&gt;&amp;lt;/remoteinstance&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;mount path="/_system/governance" overwrite="true"&amp;gt;&lt;br /&gt;  &amp;lt;instanceid&amp;gt;gov_reg&amp;lt;/instanceid&amp;gt;&lt;br /&gt;  &amp;lt;targetpath&amp;gt;/_system/governance&amp;lt;/targetpath&amp;gt;&lt;br /&gt;&amp;lt;/mount&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;e) Once the above configration are done, start the governance registry instance and the configuration registry instances&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2 - Setting up the WSO2 ESB READ-WRITE instance&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;a) Download the latest WSO2 ESB instance from here and extract it to a folder of your choice.&lt;br /&gt;E.g. - Extract the distribution to a folder named esb-rw&lt;br /&gt;&lt;br /&gt;b) Change the ports of the WSO2 ESB instance&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;E.g. :- Assume that the ports were configured as below&lt;br /&gt;- HTTP port - 9761&lt;br /&gt;- HTTPS port - 9441&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;c) Leave the default dbConfig section as it is and add the following to the registry.xml file.&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;&amp;lt;dbconfig name="config_registry"&amp;gt;&lt;br /&gt;  &amp;lt;url&amp;gt;jdbc:mysql://localhost:3306/reg_config_db&amp;lt;/url&amp;gt;&lt;br /&gt;  &amp;lt;username&amp;gt;wso2&amp;lt;/username&amp;gt;&lt;br /&gt;  &amp;lt;password&amp;gt;wso2&amp;lt;/password&amp;gt;&lt;br /&gt;  &amp;lt;drivername&amp;gt;com.mysql.jdbc.Driver&amp;lt;/drivername&amp;gt;&lt;br /&gt;  &amp;lt;maxactive&amp;gt;50&amp;lt;/maxactive&amp;gt;&lt;br /&gt;  &amp;lt;maxwait&amp;gt;60000&amp;lt;/maxwait&amp;gt;&lt;br /&gt;  &amp;lt;minidle&amp;gt;5&amp;lt;/minidle&amp;gt;&lt;br /&gt;&amp;lt;/dbconfig&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;dbconfig name="gov_registry"&amp;gt;&lt;br /&gt;  &amp;lt;url&amp;gt;jdbc:mysql://localhost:3306/reg_gov_db&amp;lt;/url&amp;gt;&lt;br /&gt;  &amp;lt;username&amp;gt;wso2&amp;lt;/username&amp;gt;&lt;br /&gt;  &amp;lt;password&amp;gt;wso2&amp;lt;/password&amp;gt;&lt;br /&gt;  &amp;lt;drivername&amp;gt;com.mysql.jdbc.Driver&amp;lt;/drivername&amp;gt;&lt;br /&gt;  &amp;lt;maxactive&amp;gt;50&amp;lt;/maxactive&amp;gt;&lt;br /&gt;  &amp;lt;maxwait&amp;gt;60000&amp;lt;/maxwait&amp;gt;&lt;br /&gt;  &amp;lt;minidle&amp;gt;5&amp;lt;/minidle&amp;gt;&lt;br /&gt;&amp;lt;/dbconfig&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;d) Additionally, add the following configuration to the registry.xml inorder to mount the governance and configuration registries to the WSO2 ESB READ-WRITE instance&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;&amp;lt;remoteinstance url="https://localhost:9444/config/registry"&amp;gt;&lt;br /&gt;  &amp;lt;id&amp;gt;config_reg&amp;lt;/id&amp;gt;&lt;br /&gt;  &amp;lt;dbconfig&amp;gt;config_registry&amp;lt;/dbconfig&amp;gt;&lt;br /&gt;  &amp;lt;readonly&amp;gt;false&amp;lt;/readonly&amp;gt;&lt;br /&gt;  &amp;lt;registryroot&amp;gt;/&amp;lt;/registryroot&amp;gt;&lt;br /&gt;&amp;lt;/remoteinstance&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;mount path="/_system/governance" overwrite="true"&amp;gt;&lt;br /&gt;  &amp;lt;instanceid&amp;gt;gov_reg&amp;lt;/instanceid&amp;gt;&lt;br /&gt;  &amp;lt;targetpath&amp;gt;/_system/governance&amp;lt;/targetpath&amp;gt;&lt;br /&gt;&amp;lt;/mount&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;mount path="/_system/config" overwrite="true"&amp;gt;&lt;br /&gt;  &amp;lt;instanceid&amp;gt;config_reg&amp;lt;/instanceid&amp;gt;&lt;br /&gt;  &amp;lt;targetpath&amp;gt;/_system/nodes&amp;lt;/targetpath&amp;gt;&lt;br /&gt;&amp;lt;/mount&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;remoteinstance url="https://localhost:9443/gov/registry"&amp;gt;&lt;br /&gt;  &amp;lt;id&amp;gt;gov_reg&amp;lt;/id&amp;gt;&lt;br /&gt;  &amp;lt;dbconfig&amp;gt;gov_registry&amp;lt;/dbconfig&amp;gt;&lt;br /&gt;  &amp;lt;readonly&amp;gt;false&amp;lt;/readonly&amp;gt;&lt;br /&gt;  &amp;lt;registryroot&amp;gt;/&amp;lt;/registryroot&amp;gt;&lt;br /&gt;&amp;lt;/remoteinstance&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;e) Next, enable clustering by uncommenting the following section of the axis2.xml&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;&amp;lt;clustering class="org.apache.axis2.clustering.tribes.TribesClusteringAgent" enable="true"&amp;gt;&lt;br /&gt;:&lt;br /&gt;:&lt;br /&gt;&amp;lt;/clustering&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3 - Setting up the WSO2 ESB READ-ONLY instance&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;a) Extract the downloaded WSO2 ESB instance to another folder of your choice.&lt;br /&gt;E.g. - Extract the distribution to a folder named esb-ro&lt;br /&gt;&lt;br /&gt;b) Change the ports of the WSO2 ESB instance&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;E.g. :- Assume that the ports were configured as below&lt;br /&gt;- HTTP port - 9762&lt;br /&gt;- HTTPS port - 9443&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;c) Leave the default dbConfig section as it is and add the following to the registry.xml file.&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;&amp;lt;dbconfig name="config_registry"&amp;gt;&lt;br /&gt;  &amp;lt;url&amp;gt;jdbc:mysql://localhost:3306/reg_config_db&amp;lt;/url&amp;gt;&lt;br /&gt;  &amp;lt;username&amp;gt;wso2&amp;lt;/username&amp;gt;&lt;br /&gt;  &amp;lt;password&amp;gt;wso2&amp;lt;/password&amp;gt;&lt;br /&gt;  &amp;lt;drivername&amp;gt;com.mysql.jdbc.Driver&amp;lt;/drivername&amp;gt;&lt;br /&gt;  &amp;lt;maxactive&amp;gt;50&amp;lt;/maxactive&amp;gt;&lt;br /&gt;  &amp;lt;maxwait&amp;gt;60000&amp;lt;/maxwait&amp;gt;&lt;br /&gt;  &amp;lt;minidle&amp;gt;5&amp;lt;/minidle&amp;gt;&lt;br /&gt;&amp;lt;/dbconfig&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;dbconfig name="gov_registry"&amp;gt;&lt;br /&gt;  &amp;lt;url&amp;gt;jdbc:mysql://localhost:3306/reg_gov_db&amp;lt;/url&amp;gt;&lt;br /&gt;  &amp;lt;username&amp;gt;wso2&amp;lt;/username&amp;gt;&lt;br /&gt;  &amp;lt;password&amp;gt;wso2&amp;lt;/password&amp;gt;&lt;br /&gt;  &amp;lt;drivername&amp;gt;com.mysql.jdbc.Driver&amp;lt;/drivername&amp;gt;&lt;br /&gt;  &amp;lt;maxactive&amp;gt;50&amp;lt;/maxactive&amp;gt;&lt;br /&gt;  &amp;lt;maxwait&amp;gt;60000&amp;lt;/maxwait&amp;gt;&lt;br /&gt;  &amp;lt;minidle&amp;gt;5&amp;lt;/minidle&amp;gt;&lt;br /&gt;&amp;lt;/dbconfig&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;d) Additionally, add the following configuration to the registry.xml inorder to mount the governance and configuration registries to the WSO2 ESB READ-WRITE instance&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;&amp;lt;remoteinstance url="https://localhost:9444/config/registry"&amp;gt;&lt;br /&gt;  &amp;lt;id&amp;gt;config_reg&amp;lt;/id&amp;gt;&lt;br /&gt;  &amp;lt;dbconfig&amp;gt;config_registry&amp;lt;/dbconfig&amp;gt;&lt;br /&gt;  &amp;lt;readonly&amp;gt;true&amp;lt;/readonly&amp;gt;&lt;br /&gt;  &amp;lt;registryroot&amp;gt;/&amp;lt;/registryroot&amp;gt;&lt;br /&gt;&amp;lt;/remoteinstance&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;mount path="/_system/governance" overwrite="true"&amp;gt;&lt;br /&gt;  &amp;lt;instanceid&amp;gt;gov_reg&amp;lt;/instanceid&amp;gt;&lt;br /&gt;  &amp;lt;targetpath&amp;gt;/_system/governance&amp;lt;/targetpath&amp;gt;&lt;br /&gt;&amp;lt;/mount&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;mount path="/_system/config" overwrite="true"&amp;gt;&lt;br /&gt;  &amp;lt;instanceid&amp;gt;config_reg&amp;lt;/instanceid&amp;gt;&lt;br /&gt;  &amp;lt;targetpath&amp;gt;/_system/nodes&amp;lt;/targetpath&amp;gt;&lt;br /&gt;&amp;lt;/mount&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;remoteinstance url="https://localhost:9443/gov/registry"&amp;gt;&lt;br /&gt;  &amp;lt;id&amp;gt;gov_reg&amp;lt;/id&amp;gt;&lt;br /&gt;  &amp;lt;dbconfig&amp;gt;gov_registry&amp;lt;/dbconfig&amp;gt;&lt;br /&gt;  &amp;lt;readonly&amp;gt;true&amp;lt;/readonly&amp;gt;&lt;br /&gt;  &amp;lt;registryroot&amp;gt;/&amp;lt;/registryroot&amp;gt;&lt;br /&gt;&amp;lt;/remoteinstance&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;e) Next, enable clustering by uncommenting the following section of the axis2.xml (This is required ONLY in a state-full setup)&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;&amp;lt;clustering class="org.apache.axis2.clustering.tribes.TribesClusteringAgent" enable="true"&amp;gt;&lt;br /&gt;:&lt;br /&gt;:&lt;br /&gt;&amp;lt;/clustering&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;f) Inorder for the resources that are in the READ-WRITE instance to be available in the READ-ONLY node, the following configuration should be added to the carbon.xml&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;&amp;lt;mediationconfig&amp;gt;&lt;br /&gt;&amp;lt;loadfromregistry&amp;gt;true&amp;lt;/loadfromregistry&amp;gt;&lt;br /&gt;&amp;lt;/mediationconfig&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 4 - Creating resources in the READ-WRITE instance&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once the configuration are properly done, start the READ-WRITE WSO2 ESB instance.&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;user@user-laptop:~/opt/esbrw/wso2esb-3.0.0/bin $ sh ./wso2server.sh&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now create some resources (Sequences, Endpoints, Proxy Services,etc) by logging into the Management Console&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 5 - Witnessing the resources of the READ-WRITE instance in the READ-ONLY node&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Finally, start the READ-ONLY instance and you will see the resources that were created through the READ-WRITE available through the READ-ONLY node&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;user@user-laptop:~/opt/esbr0/wso2esb-3.0.0/bin $ sh ./wso2server.sh&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-2444652837937447470?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/2444652837937447470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=2444652837937447470' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/2444652837937447470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/2444652837937447470'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2010/07/making-resources-of-wso2-esb-read-write.html' title='Making the resources of a WSO2 ESB READ-WRITE node available in the READ-ONLY node of a cluster'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-2894079580734821380</id><published>2010-06-02T21:10:00.000-07:00</published><updated>2010-06-03T04:44:02.461-07:00</updated><title type='text'>How to specify system-properties when WSO2 ESB started if deployed on top of an application server</title><content type='html'>When starting the WSO2 ESB server, we can specify different system-properties such as &lt;span style="font-style: italic;"&gt;-DuseSynapseXML, -Dsetup, -Dcarbon.registry.root&lt;/span&gt;. But if you have deployed your WSO2 ESB instance on top of an Application server like JBoss or Tomcat, you will wonder how you can specify such options. To make this possible, all you have to do is follow the below steps.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1&lt;/span&gt; - Open a terminal window&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2&lt;/span&gt; - Set the system-property which you want to set as a JAVA_OPTS variable&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;E.g.:- For linux - export JAVA_OPTS="-DuseSynapseXML"&lt;br /&gt;For Windows - set JAVA_OPTS="-DuseSynapseXML"&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3&lt;/span&gt; - Now start the Application server the usual way and you will notice that WSO2 ESB is started with the option which you set.&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;E.g.:- If you specified the system-property -DuseSynapseXML, notice that the server loads the synapse.xml located at the file system and not from the registry&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-2894079580734821380?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/2894079580734821380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=2894079580734821380' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/2894079580734821380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/2894079580734821380'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2010/06/how-to-specify-system-properties-when.html' title='How to specify system-properties when WSO2 ESB started if deployed on top of an application server'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-5874216872899421414</id><published>2010-06-01T21:49:00.000-07:00</published><updated>2010-06-01T22:03:46.068-07:00</updated><title type='text'>Signing in to WSO2 ESB 3.0.x using users in an LDap User Store</title><content type='html'>Assume that you have a list of users in an LDap server and you need to access WSO2 ESB using one of the users in the LDap user store and not with the default admin username and password. All you have to do is do a simple change in a configuration file of your ESB instance. I have listed the steps which one needs to follow.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Pre-Requisites&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;An LDAP server should be up and running with users.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Download the latest WSO2 ESB version from &lt;a href="http://wso2.org/downloads/esb"&gt;here&lt;/a&gt;  and extract to a location of your choice.&lt;br /&gt;(E.g.:- /opt/products/wso2esb-3.0.0). From this point onwards I will refer to this location as ESB_HOME.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next go to ESB_HOME/repository/conf and open up the user-mgt.xml.&lt;br /&gt;&lt;br /&gt;a) First notice that the section with the tag &amp;lt;userstoremanager&amp;gt; is uncommented where the class is &lt;span style="font-style: italic;"&gt;org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager&lt;/span&gt;. Comment out this section.&lt;br /&gt;Then locate the section with the tag &amp;lt;userstoremanager&amp;gt; where the class is specified as &lt;span style="font-style: italic; font-weight: bold;"&gt;org.wso2.carbon.user.core.ldap.LDAPUserStoreManager&lt;/span&gt; and uncomment it. This section will contain the configuration which is used to our LDap user store.&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;&lt;br /&gt;&amp;lt;UserStoreManager class="org.wso2.carbon.user.core.ldap.LDAPUserStoreManager"&amp;gt;&lt;br /&gt;            &amp;lt;property name="ConnectionURL"&amp;gt;ldap://localhost:10389&amp;lt;/property&amp;gt;&lt;br /&gt;            &amp;lt;property name="ConnectionName"&amp;gt;uid=admin,ou=system&amp;lt;/property&amp;gt;&lt;br /&gt;            &amp;lt;property name="ConnectionPassword"&amp;gt;secret&amp;lt;/property&amp;gt;&lt;br /&gt;            &amp;lt;property name="UserSearchBase"&amp;gt;ou=system&amp;lt;/property&amp;gt;&lt;br /&gt;            &amp;lt;property name="UserNameListFilter"&amp;gt;(objectClass=person)&amp;lt;/property&amp;gt;&lt;br /&gt;            &amp;lt;property name="UserNameAttribute"&amp;gt;uid&amp;lt;/property&amp;gt;&lt;br /&gt;            &amp;lt;property name="ReadLDAPGroups"&amp;gt;false&amp;lt;/property&amp;gt;&lt;br /&gt;            &amp;lt;property name="GroupSearchBase"&amp;gt;ou=system&amp;lt;/property&amp;gt;&lt;br /&gt;            &amp;lt;property name="GroupSearchFilter"&amp;gt;(objectClass=groupOfNames)&amp;lt;/property&amp;gt;&lt;br /&gt;            &amp;lt;property name="GroupNameAttribute"&amp;gt;cn&amp;lt;/property&amp;gt;&lt;br /&gt;            &amp;lt;property name="MembershipAttribute"&amp;gt;member&amp;lt;/property&amp;gt;&lt;br /&gt;    &amp;lt;/userstoremanager&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note that you have to remember the &lt;span style="font-style: italic;"&gt;ConnectionURL, ConnectionName&lt;/span&gt; and the &lt;span style="font-style: italic;"&gt;ConnectionPassword&lt;/span&gt; values of your LDAP user store while setting it up.&lt;br /&gt;&lt;br /&gt;b) Next go to the top of the user-mgt.xml and change the &amp;lt;username&amp;gt; and &amp;lt;password&amp;gt; tag values to a user which you already have in you LDAP user store.&lt;br /&gt;&lt;br /&gt;c) Also change the &amp;lt;readonly&amp;gt; property value to true as shown below&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:85%;" &gt;&amp;lt;usermanager&amp;gt;&lt;br /&gt;&amp;lt;realm&amp;gt;&lt;br /&gt;    &amp;lt;configuration&amp;gt;&lt;br /&gt;            &amp;lt;adminrole&amp;gt;admin&amp;lt;/adminrole&amp;gt;&lt;br /&gt;            &amp;lt;adminuser&amp;gt;&lt;br /&gt;                 &amp;lt;username&amp;gt;evanthika&amp;lt;/username&amp;gt;&lt;br /&gt;                 &amp;lt;password&amp;gt;evanthika&amp;lt;/password&amp;gt;&lt;br /&gt;            &amp;lt;/adminuser&amp;gt;       &lt;br /&gt;    &amp;lt;everyonerolename&amp;gt;everyone&amp;lt;/everyonerolename&amp;gt;&lt;br /&gt;    &amp;lt;readonly&amp;gt;true&amp;lt;/readonly&amp;gt;&lt;br /&gt;:&lt;br /&gt;:&lt;br /&gt;:&lt;br /&gt;&amp;lt;/realm&amp;gt;&lt;br /&gt;&amp;lt;/usermanager&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now you are all set to go. Go to the ESB_HOME/bin folder and start the WSO2 ESB server by giving the command&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;$ sh ./wso2server.sh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once the server is started access the Management Console through the URL https://localhost:9443/carbon and you should be able to login using the username/password which you specified in the user-mgt.xml file (evanthika/evanthika).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-5874216872899421414?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/5874216872899421414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=5874216872899421414' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/5874216872899421414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/5874216872899421414'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2010/06/signing-in-to-wso2-esb-30x-using-users.html' title='Signing in to WSO2 ESB 3.0.x using users in an LDap User Store'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-4300855200243354844</id><published>2010-01-26T07:32:00.000-08:00</published><updated>2010-04-22T01:39:25.732-07:00</updated><title type='text'>Quick guide to installing WSO2 ESB 2.1.x on IBM Websphere</title><content type='html'>This is a quick guide on how to install Carbon based WSO2 ESB on IBM WebsphereV6.1&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1 - Adding the keystore&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Create a new profile through the 'Profile Management Tool' and then start the IBM Websphere server. Follow the steps given under 'Adding the keystore' of http://wso2.org/library/2735 and add the wso2carbon.jks keystore&lt;br /&gt;&lt;br /&gt;Next, go to &lt;span style="font-style: italic;"&gt;SSL certificate and key management &gt; SSL configurations&lt;/span&gt; and click on  &lt;span style="font-style: italic;"&gt;'NodeDefaultSSLSettings'&lt;/span&gt;. Select created keystore (E.g.:- wso2carbon) from the combo boxes '&lt;span style="font-style: italic;"&gt;Trust store name&lt;/span&gt;' and '&lt;span style="font-style: italic;"&gt;Keystore Name&lt;/span&gt;' and then click on the button '&lt;span style="font-style: italic;"&gt;Get certificate aliases&lt;/span&gt;'.&lt;br /&gt;Click on 'Apply' and then save the changes done.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2 - Preparing WSO2 ESB&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Download the WSO2 ESB distribution and extract to a specific location. (E.g.:- C:\esb\wso2esb-2.1.2).&lt;br /&gt;From this folder copy the folders,&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;- conf&lt;br /&gt;- database&lt;br /&gt;- resources&lt;br /&gt;- repository&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to a separate folder. (E.g.:- C:\esb\esb_repo). We will refer to this as the CARBON_HOME from this point onwards.&lt;br /&gt;&lt;br /&gt;For Carbon 3.0.x family, you need to copy only the two folders resources and repository.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3 - Changing necessary files of the WSO2 ESB distribution&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;a) Open the carbon.xml file which is in the CARBON_HOME\conf folder and specify the correct WebContentRoot&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;E.g.:- &lt;webcontextroot&gt;/esb&lt;/webcontextroot&gt;&lt;/span&gt;&lt;br /&gt;Also change the ServerURL value in the same file as below.&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;&lt;serverurl&gt;https://localhost:9444/esb/services/&lt;/serverurl&gt;&lt;/span&gt;&lt;br /&gt;b) Next open the axis2.xml which is located inside the CARBON_HOME\conf and specify the correct paths for the two .jks files wso2carbon.jks and client-truststore.jks specified in the axis2.xml&lt;br /&gt;&lt;br /&gt;c) Then you need to specify the absolute paths of the WSO2CARBON_DB of the two files registry.xml and user-mgt.xml&lt;br /&gt;&lt;br /&gt;E.g.:- &lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;Change&lt;br /&gt;jdbc:derby:database/WSO2CARBON_DB;create=true&lt;br /&gt;to&lt;br /&gt;jdbc:derby:C:\esb\esb_repo\WSO2CARBON_DB;create=true&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;f) Next you will have to specify the absolute path of the synapse.xml which is in the axis2.xml file located at CARBON_HOME/conf&lt;br /&gt;&lt;br /&gt;E.g.:-&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;Change&lt;br /&gt;conf/synapse.xml&lt;br /&gt;to&lt;br /&gt;C:\esb\esb_repo\conf\synapse.xml&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 4 - Deploying the esb.war&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;a) Go to the webapps\ROOT folder of the WSO2 ESB which you extracted and create a war file using the command&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;jar -cvf esb.war *&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;b) Then as specified under 'Adding WSO2 WSAS to IBM WebSphere Application Server' of http://wso2.org/library/2735, install the war file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 5 - Starting the IBM Websphere server&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now stop the startServer.bat and set the CARBON_HOME to the folder which you copied the folders conf, database, resources etc.&lt;br /&gt;&lt;br /&gt;Next start the server and access the management console using&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;https://localhost:&lt;port&gt;9444/esb/carbon&lt;/port&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-4300855200243354844?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/4300855200243354844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=4300855200243354844' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/4300855200243354844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/4300855200243354844'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2010/01/quick-guide-to-installing-wso2-esb-21x.html' title='Quick guide to installing WSO2 ESB 2.1.x on IBM Websphere'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-4092558449790333153</id><published>2009-02-18T01:01:00.000-08:00</published><updated>2009-09-27T22:15:52.153-07:00</updated><title type='text'>Deploying WSO2 ESB 2.0 on Apache Tomcat</title><content type='html'>As you all know &lt;a href="http://wso2.org/projects/esb/java"&gt;WSO2 ESB&lt;/a&gt; can be deployed on different application servers such as &lt;a href="http://www-306.ibm.com/software/webservers/appserv/was/"&gt;IBM WebSphere&lt;/a&gt;, &lt;a href="http://www.bea.com/framework.jsp?CNT=index.htm&amp;amp;FP=/content/products/server"&gt;BEA WebLogic Server&lt;/a&gt;, &lt;a href="http://www.jboss.com/products/platforms/application"&gt;JBoss&lt;/a&gt; and  &lt;a href="http://tomcat.apache.org/"&gt;Apache Tomcat&lt;/a&gt;. I have written a blog previously on how one can deploy WSO2 ESB on Apache Tomcat. Unfortunately this does not work with the new Carbon based WSO2 ESB. Therefore for anyone who is interested on deploying WSO2 ESB on Apache Tomcat the following guide will be useful.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Step 1 - Downloading and installing Apache Tomcat&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can download the latest version of Apache Tomcat from &lt;a href="http://tomcat.apache.org/download-55.cgi"&gt;here &lt;/a&gt;(I will be using Apache Tomcat 5.5.20 to demonstrate this scenario).&lt;br /&gt;Extract the downloaded distribution to a specific location and define the environment variables properly. (Assume you extracted the downloaded Tomcat into the folder C:\apache-tomcat-5.5.20)&lt;br /&gt;&lt;br /&gt;E.g.: - &lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;CATALINA_HOME=C:\apache-tomcat-5.5.20&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next you will need to enable HTTPS on Apache Tomcat since WSO2 ESB runs over HTTPS. To do this, access the server.xml file located at %CATALINA_HOME%/conf and uncomment the following.&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;&lt;br /&gt;&amp;lt;Connector port="8443" maxHttpHeaderSize="8192"&lt;br /&gt; maxThreads="150" minSpareThreads="25" maxSpareThreads="75"&lt;br /&gt; enableLookups="false" disableUploadTimeout="true"&lt;br /&gt; acceptCount="100" scheme="https" secure="true"&lt;br /&gt; clientAuth="false" sslProtocol="TLS"/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Then you will need to provide the keystore file location along with it's password as below.&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;&lt;br /&gt;&amp;lt;Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"&lt;br /&gt;maxThreads="150" scheme="https" secure="true"&lt;br /&gt;clientAuth="false" sslProtocol="TLS"&lt;br /&gt;keystoreFile="C:\Carbon\ESB\tomcat_repo\resources\security\wso2carbon.jks"&lt;br /&gt;keystorePass="wso2carbon"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Step 2 - Downloading and installing WSO2 ESB&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Download the latest WSO2 ESB distribution from &lt;a href="http://wso2.org/downloads/esb"&gt;here &lt;/a&gt;and extract to a specific location. (E.g.:- C:\Carbon\ESB\tomcat\wso2esb-SNAPSHOT). From this folder copy the folders,&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;&lt;br /&gt;- conf&lt;br /&gt;- database&lt;br /&gt;- resources&lt;br /&gt;- repository&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;to a separate folder. (E.g.:- C:\Carbon\ESB\tomcat\esb_home)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Step 3 - Setting environmental variables&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You will have to set an environment variable with the name CARBON_HOME pointing it to the directory which you copied the above files to.&lt;br /&gt;E.g.:- &lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;CARBON_HOME=C:\Carbon\ESB\tomcat\esb_home&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Step 4 - Copying required files to Apache Tomcat&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now create a folder inside the webapps folder of Tomcat.&lt;br /&gt;E.g.:- &lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;C:\apache-tomcat-5.5.20\webapps\esb&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next, you need to copy the WEB-INF folder, which is in the folder which you extracted the downloaded ESB distribution. Then copy it into the esb folder which you created above.&lt;br /&gt;E.g.:- &lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;&lt;span style="font-weight:bold;"&gt;Copy &lt;/span&gt;&lt;br/&gt;C:\Carbon\ESB\tomcat\wso2esb-SNAPSHOT\webapps\ROOT\WEB-INF&lt;br/&gt;&lt;span style="font-weight:bold;"&gt;to&lt;br/&gt;&lt;/span&gt;C:\WSO2\Installations\apache-tomcat-5.5.20\webapps\esb &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Step 5 - Changing necessary files of the WSO2 ESB distribution&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;a) Open the carbon.xml file which is in the CARBON_HOME\conf folder and specify the following URL as the ServerURL&lt;br /&gt;E.g.:-  &lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;&lt;serverurl&gt;https://localhost:8443/esb/services/&lt;/serverurl&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;b) Next open the axis2.xml which is located inside the CARBON_HOME\conf and change the http port from 8280 to 8080 (the default http port of Tomcat) and the https port from 8243 to 8443.&lt;br /&gt;Note that you do not have to do this in the Carbon based WSO2 ESB distribution. Just leave the ports as they are.&lt;br /&gt;&lt;br /&gt;c) In addition to the above, you need to specify the correct paths for the two .jks files wso2carbon.jks and client-truststore.jks specified in the axis2.xml and also the wso2carbon.jks file specified in the carbon.xml file.&lt;br /&gt;&lt;br /&gt;d) Then you also have to change the contextRoot parameter value to /esb of the axis2.xml file&lt;br /&gt;Instead of the above, in the Carbon based ESB you need to change the WebContextRoot parameter in the carbon.xml&lt;br /&gt;&lt;br /&gt;e) Then you need to specify the absolute paths of the WSO2CARBON_DB of the two files registry.xml and user-mgt.xml&lt;br /&gt;E.g.:- &lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;&lt;span style="font-weight:bold;"&gt;Change&lt;/span&gt;&lt;br/&gt;&lt;url&gt;jdbc:derby:database/WSO2CARBON_DB;create=true&lt;/url&gt;&lt;br/&gt;&lt;span style="font-weight:bold;"&gt;to&lt;/span&gt;&lt;br/&gt;&lt;url&gt;jdbc:derby:C:\Carbon\ESB\tomcat\esb_home\WSO2CARBON_DB;create=true&lt;/url&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;f) Next you will have to specify the absolute path of the synapse.xml which is in the axis2.xml file located at CARBON_HOME\conf&lt;br /&gt;&lt;br /&gt;E.g.:-  &lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;&lt;span style="font-weight:bold;"&gt;Change&lt;/span&gt;&lt;br/&gt;&lt;parameter name="SynapseConfig.ConfigurationFile" locked="false"&gt;conf/synapse.xml&lt;/parameter&gt;&lt;br/&gt;&lt;span style="font-weight:bold;"&gt;to&lt;/span&gt;&lt;br/&gt;&lt;parameter name="SynapseConfig.ConfigurationFile" locked="false"&gt;C:\Carbon\ESB\tomcat\esb_home\conf\synapse.xml&lt;/parameter&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Step 6 - Starting the Apache Tomcat Server&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now you can start the Apache Tomcat server by giving the following command.&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;catalina.bat run&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Step 7 - Login to the WSO2 ESB Administration Console&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now you should be able to login to the WSO2 ESB Administration Console as, https://localhost:8443/esb/carbon&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-4092558449790333153?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/4092558449790333153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=4092558449790333153' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/4092558449790333153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/4092558449790333153'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2009/02/deploying-wso2-esb-20-on-apache-tomcat.html' title='Deploying WSO2 ESB 2.0 on Apache Tomcat'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-6536584693112808672</id><published>2008-11-24T00:43:00.000-08:00</published><updated>2008-11-24T00:51:59.128-08:00</updated><title type='text'>How to relocate an SVN location</title><content type='html'>To switch the svn location which you were working, to a new location you can use  the following command&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&lt;code style="color: rgb(255, 255, 255);"&gt;svn switch --relocate [old_location] [new_location]&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-6536584693112808672?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/6536584693112808672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=6536584693112808672' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/6536584693112808672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/6536584693112808672'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2008/11/how-to-relocate-svn-location.html' title='How to relocate an SVN location'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-5533888770994359119</id><published>2008-11-10T20:05:00.001-08:00</published><updated>2008-11-10T21:29:10.903-08:00</updated><title type='text'>How to invoke a Proxy Service created on WSO2 ESB deployed on IBM Websphere</title><content type='html'>When you deploy WSO2 ESB on IBM Webphere you will not be able to invoke the created Proxy services or sequences the general way you do it. This requires a new parameter to be given and the ports too should be correctly specified.&lt;br /&gt;&lt;br /&gt;Assume that the web context root given when deploying WSO2 ESB is 'esb'. Also if the specified HTTP port of IBM Websphere is 9080, you can invoke a Proxy service which you have created on WSO2 ESB as follows.&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&lt;code style="color: rgb(255, 255, 255);"&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;ant stockquote -Dtrpurl=http://localhost:&amp;lt;HTTPS_port_of_WAS&gt;/&lt;br /&gt;&amp;lt;web_context_root&gt;/soap/&amp;lt;Proxy_name&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;E.g.:- ant stockquote -Dtrpurl=http://localhost:9080/esb/soap/SimpleProxy&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-5533888770994359119?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/5533888770994359119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=5533888770994359119' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/5533888770994359119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/5533888770994359119'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2008/11/how-to-invoke-proxy-service-created-on.html' title='How to invoke a Proxy Service created on WSO2 ESB deployed on IBM Websphere'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-5664705370687010441</id><published>2008-11-04T03:10:00.000-08:00</published><updated>2008-11-14T17:48:01.954-08:00</updated><title type='text'>Performance testing on a Derby database - JMeter to the rescue</title><content type='html'>One of my friends had a requirement of doing a performance test on a Derby database and she proposed that it would be easier if we do it through &lt;a href="http://jakarta.apache.org/jmeter/"&gt;Apache JMeter&lt;/a&gt;. This was quite new to me and had to do a lot of Google searches but at the end was able to get it working so thought of sharing it with you all. I assume that you all are familiar with Apache JMeter. I will simply explain the steps along with some screen shots.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Download and install Apache &lt;a href="http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi"&gt;JMeter&lt;/a&gt; on your local machine and start the jmeter.bat file which is located inside the bin folder. Once you start the bat file you it will open up Apache JMeter as shown on the Figure.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_aQARzXEhjqs/SR4ii6y6lyI/AAAAAAAAAAk/_rl5oqaKvls/s1600-h/Figure+1.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 222px;" src="http://2.bp.blogspot.com/_aQARzXEhjqs/SR4ii6y6lyI/AAAAAAAAAAk/_rl5oqaKvls/s320/Figure+1.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5268686597363767074" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now let us add the things which are required to do our task.&lt;br /&gt;First right click on the 'Test Plan' element and add a Thread Group. &lt;br /&gt;The next thing you need to add is a JDBC configuration element. To do this right click on the 'Thread Group' which you added a while ago and select 'Add -&gt; Config Element -&gt; JDBC Connection Configuration'.&lt;br /&gt;Now you need to fill up the information to depending on the database which you have selected. Let us see what values we need to enter to test a Derby database. The following screen shot will give you a clear idea on this. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_aQARzXEhjqs/SR4krwMJM4I/AAAAAAAAAAs/jDYGPE0YXpM/s1600-h/Figure+3.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 222px;" src="http://1.bp.blogspot.com/_aQARzXEhjqs/SR4krwMJM4I/AAAAAAAAAAs/jDYGPE0YXpM/s320/Figure+3.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5268688948158870402" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 3&lt;/span&gt;&lt;br /&gt;The next step is to add a 'JDBC Request' element to enter you database query. Assume that you have created a database on your Derby database and that you have a table called 'COMPANY'. Let us see how you can query this database. &lt;br /&gt;&lt;br /&gt;Right click on the 'Thread Group' and select 'Add -&gt; Sampler -&gt; JDBC Request'.&lt;br /&gt;Since we are going to do select some data from the database, select the the option 'Select Statement' from the combo box 'Query Type:'.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_aQARzXEhjqs/SR4mtZjSz1I/AAAAAAAAAA0/XuJ_--tiMPg/s1600-h/Figure+4.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 223px;" src="http://4.bp.blogspot.com/_aQARzXEhjqs/SR4mtZjSz1I/AAAAAAAAAA0/XuJ_--tiMPg/s320/Figure+4.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5268691175464947538" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 4&lt;/span&gt;&lt;br /&gt;Now you need to find a way to view the performance. In order to do this you can add a listener to view the results. Therefore right click on the 'Thread Group' and select 'Add -&gt; Listener -&gt; Graph Results'&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_aQARzXEhjqs/SR4nrF7a-oI/AAAAAAAAAA8/DMftJFmtk1c/s1600-h/Figure+5.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 223px;" src="http://3.bp.blogspot.com/_aQARzXEhjqs/SR4nrF7a-oI/AAAAAAAAAA8/DMftJFmtk1c/s320/Figure+5.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5268692235349326466" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 5&lt;/span&gt;&lt;br /&gt;Before running the test w need one more step to follow. That is to specify the number of threads. To do this click on the 'Thread Group' and specify 1000 as 'Number of Threads (users):' which is under 'Thread Properties'.&lt;br /&gt;&lt;br /&gt;Let us try this out now. From the main menu select 'Run -&gt; Start'. If you are executing the test for the first time it would ask you to save the test plan. Save the test plan at any location you prefer. Once the test has executed, you will see the output as shown in the following graph. You can do your test as you prefer by changing the number of threads.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_aQARzXEhjqs/SR4ptoeIF8I/AAAAAAAAABE/L5MLRR4r6GA/s1600-h/Figure+6.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 230px;" src="http://3.bp.blogspot.com/_aQARzXEhjqs/SR4ptoeIF8I/AAAAAAAAABE/L5MLRR4r6GA/s320/Figure+6.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5268694478004688834" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-5664705370687010441?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/5664705370687010441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=5664705370687010441' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/5664705370687010441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/5664705370687010441'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2008/11/performance-testing-on-derby-database.html' title='Performance testing on a Derby database - JMeter to the rescue'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_aQARzXEhjqs/SR4ii6y6lyI/AAAAAAAAAAk/_rl5oqaKvls/s72-c/Figure+1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-2687905797848953749</id><published>2008-10-26T05:49:00.001-07:00</published><updated>2008-11-14T17:49:36.550-08:00</updated><title type='text'>Developing a Research Thesis</title><content type='html'>The third semester is about to end of my MBA and it's time to spend some time on the MBA research. Selecting a research topic is difficult. Doing literature review and developing on the thesis is even harder. After a chat which I had with&lt;a href="http://sanjiva.weerawarana.org/"&gt; Dr. Sanjiva Weerawarana&lt;/a&gt; I decided that I should select a topic which would be useful for &lt;a href="http://wso2.com/"&gt;WSO2&lt;/a&gt;, my organization that I work for as well and therefore thought of touching the area of marketing &lt;a href="http://en.wikipedia.org/wiki/Open-source_software"&gt;open-source software&lt;/a&gt;. I have no clue on where to start and at the moment am browsing through the web and collecting related magazines, articles which I think might be useful for me. &lt;br /&gt;&lt;br /&gt;I wish my father was alive because I'm sure I would have had great support from him since he has done similar kinds of stuff and helped a lot of other people who have done their research projects. He did his PhD on &lt;a href="http://en.wikipedia.org/wiki/Radiochemistry"&gt;radiochemistry&lt;/a&gt; and his&lt;a href="http://www.iop.org/EJ/abstract/0022-3735/14/4/008"&gt; research paper&lt;/a&gt; is available on the web but unfortunately I cannot access is since I have to pay in order to download it. &lt;br /&gt;&lt;br /&gt;I could have got some help from my dear old sister who is a medical doctor at the University of Ragama but alas she too is doing her PhD these days and I don't think I will get any help from her either (She too has written some &lt;a href="https://www.ersnetsecure.org/public/prg_congres.abstract?ww_i_presentation=35638"&gt;articles &lt;/a&gt;on her research). &lt;br /&gt;&lt;br /&gt;So I guess I'm alone on this and will have to do it on my own. Well of course we are expected to do it on our own but it would have been great if I had someone who's close to me who would at least would understand my stress at a time like this. I know that there will be a lot of people at office to help me out but it won't be the same. We will see how it goes. My only hope is to be able to complete it by 2009 and graduate with the rest of the batch. :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-2687905797848953749?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/2687905797848953749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=2687905797848953749' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/2687905797848953749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/2687905797848953749'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2008/10/developing-research-thesis.html' title='Developing a Research Thesis'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-7530336258910635662</id><published>2008-10-24T04:44:00.000-07:00</published><updated>2008-10-24T09:30:56.401-07:00</updated><title type='text'>Creating your own Web Service with different session scopes</title><content type='html'>When creating a Web service you can create Web services of different session scopes. There are four session types in Axis2 such as,&lt;br /&gt;1. SOAP Session Scope &lt;br /&gt;2. Transport Session Scope&lt;br /&gt;3. Request Scope&lt;br /&gt;4. Application Session Scope&lt;br /&gt;&lt;br /&gt;I will briefly explain how one can create Web service with each of these different session scopes.&lt;br /&gt;&lt;br /&gt;Once you have created your Java class and complied it, you will need to write a services.xml before converting it into an archive file.&lt;br /&gt;&lt;br /&gt;In order to create a service with a SOAP session scope all you have to do is add the following to your services.xml&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;scope="soapsession"&lt;/span&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&lt;code style="color: rgb(255, 255, 255);"&gt;&lt;br /&gt;E.g.:- &amp;lt;service name="&amp;lt;service_name&amp;gt;" scope="soapsession"&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I will be providing a sample service.xml for your reference.&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&lt;code style="color: rgb(255, 255, 255);"&gt;&lt;br /&gt;&amp;lt;service name="Adding" scope="soapsession"&amp;gt;&lt;br /&gt;    &amp;lt;description&amp;gt;&lt;br /&gt;        This service is created to add two numbers.&lt;br /&gt;    &amp;lt;/description&amp;gt;&lt;br /&gt;    &amp;lt;parameter name="ServiceClass" locked="false"&amp;gt;com.math.add.Adding&amp;lt;/parameter&amp;gt;&lt;br /&gt;    &amp;lt;operation name="add"&amp;gt;&lt;br /&gt;     &amp;lt;messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/&amp;gt;&lt;br /&gt;    &amp;lt;/operation&amp;gt;&lt;br /&gt;&amp;lt;/service&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-7530336258910635662?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/7530336258910635662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=7530336258910635662' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/7530336258910635662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/7530336258910635662'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2008/10/creating-your-own-web-service-with.html' title='Creating your own Web Service with different session scopes'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-4473957869131652339</id><published>2008-10-21T23:44:00.000-07:00</published><updated>2008-10-22T03:00:43.532-07:00</updated><title type='text'>Creating your own 'Mediator'</title><content type='html'>Recently I was asked by &lt;a href="http://ruwansblog.blogspot.com/"&gt;Ruwan &lt;/a&gt;to verify an issue reported by some customer. In order to test the issue, I had to write a new mediator. Since I'm not much familiar with writing these sort of stuff, I was struggling hard to get it working and in the end Ruwan helped me out to write a simple mediator and also taught me how to test it with &lt;a href="http://wso2.org/projects/esb/java"&gt;WSO2 ESB&lt;/a&gt;. I will briefly describe how this can be done easily.&lt;br /&gt;&lt;br /&gt;Pre-requisites - You need to download and install the &lt;a href="http://wso2.org/downloads/esb/"&gt;latest version&lt;/a&gt; of WSO2 ESB on your local machine. (Assume that you have downloaded the WSO2 ESB instance to C:\wso2esb-1.7. I will be referring to this folder as ESB_HOME from this point onwards)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 1 - Create a mediator class&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As the initial step I wrote a small java class which extends the method AbstractMediator as below.&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&lt;code style="color: rgb(255, 255, 255);"&gt;&lt;br /&gt;package org.wso2.esb.client;&lt;br /&gt;&lt;br /&gt;import org.apache.axiom.soap.SOAPFault;&lt;br /&gt;import org.apache.synapse.MessageContext;&lt;br /&gt;import org.apache.synapse.mediators.AbstractMediator;&lt;br /&gt;&lt;br /&gt;public class TestMediator extends AbstractMediator{&lt;br /&gt;&lt;br /&gt; public boolean mediate(MessageContext synCtx) {&lt;br /&gt;  SOAPFault fault = synCtx.getEnvelope().getBody().getFault();&lt;br /&gt;  System.out.println(fault.getCode().getText());&lt;br /&gt;  System.out.println(fault.getReason().getText());&lt;br /&gt;  return false;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Assume that you have your compiled java class at C:\ESB\mediator\testMediator\org\wso2\esb\client\TestMediator.class&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 2 - Creating the JAR file&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After compiling the class, I created a JAR file using the compiled class.&lt;br /&gt;&lt;br /&gt;Open a new command prompt and go to the folder which you have the compiled package (E.g.:- C:\ESB\mediator\testMediator) and type the following command&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&lt;code style="color: rgb(255, 255, 255);"&gt;&lt;br /&gt;jar cf testMediator.jar org&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once you type this command it would create the JAR file testMediator.jar at the current location (E.g.:- C:\ESB\mediator\testMediator )&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 3 - Creating the synapse configuration&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In order to test the newly created mediator you can use a simple configuration as below. You can call the mediator which you created using a class mediator ( E.g.:- &amp;lt;class name="org.wso2.esb.client.TestMediator"/&amp;gt; ).&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&lt;code style="color: rgb(255, 255, 255);"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;definitions xmlns="http://ws.apache.org/ns/synapse"&amp;gt;&lt;br /&gt;    &amp;lt;registry provider="org.wso2.esb.registry.ESBRegistry"&amp;gt;&lt;br /&gt;        &amp;lt;parameter name="root"&amp;gt;file:registry/&amp;lt;/parameter&amp;gt;&lt;br /&gt;        &amp;lt;parameter name="cachableDuration"&amp;gt;15000&amp;lt;/parameter&amp;gt;&lt;br /&gt;    &amp;lt;/registry&amp;gt;&lt;br /&gt;    &amp;lt;sequence name="main"&amp;gt;&lt;br /&gt;        &amp;lt;sequence key="sampleSequence"/&amp;gt;&lt;br /&gt;    &amp;lt;/sequence&amp;gt;&lt;br /&gt;    &amp;lt;sequence name="fault"&amp;gt;&lt;br /&gt;        &amp;lt;log level="full"&amp;gt;&lt;br /&gt;            &amp;lt;property name="MESSAGE" value="Executing default &amp;quot;fault&amp;quot; sequence"/&amp;gt;&lt;br /&gt;            &amp;lt;property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/&amp;gt;&lt;br /&gt;            &amp;lt;property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/&amp;gt;&lt;br /&gt;        &amp;lt;/log&amp;gt;&lt;br /&gt;        &amp;lt;drop/&amp;gt;&lt;br /&gt;    &amp;lt;/sequence&amp;gt;&lt;br /&gt;    &amp;lt;sequence name="sampleSequence" onError="soap11_fault"&amp;gt;&lt;br /&gt;        &amp;lt;in&amp;gt;&lt;br /&gt;            &amp;lt;send&amp;gt;&lt;br /&gt;                &amp;lt;endpoint&amp;gt;&lt;br /&gt;                    &amp;lt;address format="soap11" uri="http://localhost:9000/soap/Adding1"/&amp;gt;&lt;br /&gt;                &amp;lt;/endpoint&amp;gt;&lt;br /&gt;            &amp;lt;/send&amp;gt;&lt;br /&gt;        &amp;lt;/in&amp;gt;&lt;br /&gt;        &amp;lt;out&amp;gt;&lt;br /&gt;        &amp;lt;class name="org.wso2.esb.client.TestMediator"/&amp;gt;&lt;br /&gt;        &amp;lt;log level="full"/&amp;gt;&lt;br /&gt;        &amp;lt;class name="org.wso2.esb.client.TestMediator"/&amp;gt;&lt;br /&gt;            &amp;lt;send/&amp;gt;&lt;br /&gt;        &amp;lt;/out&amp;gt;&lt;br /&gt;    &amp;lt;/sequence&amp;gt;&lt;br /&gt;    &amp;lt;sequence name="soap11_fault"&amp;gt;&lt;br /&gt;        &amp;lt;log level="full" separator=","/&amp;gt;&lt;br /&gt;       &amp;lt;makefault version="soap11"&amp;gt;&lt;br /&gt;            &amp;lt;code xmlns:sf11="http://schemas.xmlsoap.org/soap/encoding/" value="sf11:VersionMismatch"/&amp;gt;&lt;br /&gt;            &amp;lt;reason value="Exception occurred when transforming the request/response"/&amp;gt;&lt;br /&gt;        &amp;lt;/makefault&amp;gt;&lt;br /&gt; &amp;lt;log level="full"/&amp;gt;&lt;br /&gt;        &amp;lt;header name="To" action="remove"/&amp;gt;&lt;br /&gt;        &amp;lt;property name="RESPONSE" value="true"/&amp;gt;&lt;br /&gt;    &amp;lt;/sequence&amp;gt;&lt;br /&gt;&amp;lt;/definitions&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 4 - Starting the WSO2 ESB server with the created configuration&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Copy this configuration to the ESB_HOME\webapp\WEB-INF\classes\conf and start the WSO2 ESB server. To do this, go to ESB_HOME\bin and run the command wso2-esb.bat&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 5 - Creating the client to invoke the service&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Assume that you have created a service (For you reference I will be attaching the service &lt;a href="http://ww2.wso2.org/~evanthika/esb_services/Adding1.aar"&gt;Adding1.aar&lt;/a&gt; which I have created) and deploy it in ESB_HOME\samples\axis2Server\repository\services. Go to the folder ESB_HOME\samples\axis2Server and start the SimpleAxis2Server by executing the executable bat file 'axis2server.bat'.&lt;br /&gt;&lt;br /&gt;Now create a client as below and invoke the service deployed through WSO2 ESB.&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&lt;code style="color: rgb(255, 255, 255);"&gt;&lt;br /&gt;package org.wso2.esb.client;&lt;br /&gt;&lt;br /&gt;import org.apache.axiom.om.OMAbstractFactory;&lt;br /&gt;import org.apache.axiom.om.OMElement;&lt;br /&gt;import org.apache.axiom.om.OMFactory;&lt;br /&gt;import org.apache.axiom.om.OMNamespace;&lt;br /&gt;import org.apache.axis2.AxisFault;&lt;br /&gt;import org.apache.axis2.addressing.EndpointReference;&lt;br /&gt;import org.apache.axis2.client.Options;&lt;br /&gt;import org.apache.axis2.client.ServiceClient;&lt;br /&gt;&lt;br /&gt;public class AxiomClient {&lt;br /&gt; public static void main(String[] args)throws AxisFault{&lt;br /&gt; Options options = new Options();&lt;br /&gt;        options.setTo(new EndpointReference("http://localhost:8280/soap"));&lt;br /&gt;        options.setAction("urn:add");&lt;br /&gt;        ServiceClient sender = new ServiceClient();&lt;br /&gt;        sender.setOptions(options);&lt;br /&gt;        OMElement result = sender.sendReceive(getPayload());&lt;br /&gt;        System.out.println(result);&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; private static OMElement getPayload() {&lt;br /&gt;        OMFactory fac = OMAbstractFactory.getOMFactory();&lt;br /&gt;        OMNamespace omNs = fac.createOMNamespace("http://service.esb.wso2.org", "ns");&lt;br /&gt;        OMElement method = fac.createOMElement("add", omNs);&lt;br /&gt;        OMElement value1 = fac.createOMElement("x", omNs);&lt;br /&gt;        OMElement value2 = fac.createOMElement("y", omNs);&lt;br /&gt;        value1.addChild(fac.createOMText(value1, "10"));&lt;br /&gt;        value2.addChild(fac.createOMText(value2, "10"));&lt;br /&gt;        method.addChild(value1);&lt;br /&gt;        method.addChild(value2);&lt;br /&gt;        return method;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 6 - Verifying through viewing the logs&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once you invoke the client, the logs displayed on the WSO2 ESB console will show how the class mediator has been invoked&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&lt;code style="color: rgb(255, 255, 255);"&gt;&lt;br /&gt;[HttpClientWorker-1] DEBUG InMediator Start : In mediator&lt;br /&gt;[HttpClientWorker-1] DEBUG InMediator Current message is a response - skipping child mediators&lt;br /&gt;[HttpClientWorker-1] DEBUG InMediator End : In mediator&lt;br /&gt;[HttpClientWorker-1] DEBUG OutMediator Start : Out mediator&lt;br /&gt;[HttpClientWorker-1] DEBUG OutMediator Current message is outgoing - executing child mediators&lt;br /&gt;[HttpClientWorker-1] DEBUG OutMediator Sequence &amp;lt;OutMediator&amp;gt; :: mediate()&lt;br /&gt;[HttpClientWorker-1] DEBUG ClassMediator Start : Class mediator&lt;br /&gt;[HttpClientWorker-1] DEBUG ClassMediator invoking : class org.wso2.esb.client.TestMediator.mediate()&lt;br /&gt;axis2ns8:Client&lt;br /&gt;The service cannot be found for the endpoint reference (EPR) http://localhost:9000/soap/Adding1&lt;br /&gt;[HttpClientWorker-1] DEBUG ClassMediator End : Class mediator&lt;br /&gt;[HttpClientWorker-1] DEBUG OutMediator End : Out mediator&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As you can see only the Class mediator is invoked and non of the mediators specified after wards are not invoked. The reason for this is that when creating the mediator, you have set 'return' to false. Therefore when the Class mediator is invoked none of the mediators available after that Class mediator will not be invoked. If you need to invoke the other mediators that are available after the Class mediator, you have to set 'return' to true. Try this out by yourself. Once you execute the client, it should invoke the Class mediator first and the the Log mediator and after that the rest of the mediators specified.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-4473957869131652339?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/4473957869131652339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=4473957869131652339' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/4473957869131652339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/4473957869131652339'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2008/10/recently-i-was-asked-by-ruwan-to-verify.html' title='Creating your own &apos;Mediator&apos;'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-288530465634702493</id><published>2008-10-07T01:48:00.000-07:00</published><updated>2008-10-07T02:18:24.181-07:00</updated><title type='text'>Deploying WSO2 ESB on an IBM WebSphere Application Server</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;strong&gt;Applies To&lt;/strong&gt;&lt;br /&gt;1. WSO2 Enterprise Service Bus (ESB) Version 1.7&lt;br /&gt;2. WebSphere Application Server Version 6.1&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Downloading and Installing WebSphere Application Server&lt;/h2&gt;&lt;br /&gt;Download the &lt;a href="http://www.ibm.com/developerworks/websphere/downloads/"&gt;WebSphere Application Server&lt;/a&gt; Version 6.1 and execute the setup to install it on your local machine.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Creating a profile&lt;/h2&gt;&lt;br /&gt;Before deploying the &lt;a href="http://wso2.org/projects/esb/java"&gt;WSO2 ESB &lt;/a&gt; application we need to create a profile through the &lt;cite&gt;Profile Management Tool&lt;/cite&gt;. This is described in detail in the tutorial &lt;a href="http://wso2.org/library/2735"&gt;Running WSO2 WSAS on an IBM WebSphere Application Server&lt;/a&gt; under the heading &lt;a href="http://wso2.org/library/2735#pre_webs"&gt;Creating an IBM WebSphere Application Server Profile&lt;/a&gt; by &lt;a href="http://upulgodage.wordpress.com/"&gt;Upul Godage&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;NOTE: Make sure you set the HTTPS transport port to 9444.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Starting the Websphere Application server&lt;/h2&gt;&lt;br /&gt;Once you have created the profile start the application server through Start -&amp;gt; All Programs -&amp;gt; IBM WebSphere -&amp;gt; Application Server V6.1 -&amp;gt; Profiles -&amp;gt; [your_profile] -&amp;gt; Start the server.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Login into the Administrative Console&lt;/h2&gt;&lt;br /&gt;When the server is started successfully access the &lt;cite&gt;Administrative Console&lt;/cite&gt; through Start -&amp;gt; All Programs -&amp;gt; IBM WebSphere -&amp;gt; Application Server V6.1 -&amp;gt; Profiles -&amp;gt; [your_profile] -&amp;gt; Administrative Console.&lt;br /&gt;Once clicked it would open up a web browser. Enter the username and password that we gave in the &lt;cite&gt;Administrative Security&lt;/cite&gt; step when creating the profile and then click on the button &lt;cite&gt;Log in&lt;/cite&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&lt;code style="color: rgb(255, 255, 255);"&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;E.g.:-&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;User ID: admin&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;Password: admin&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Downloading WSO2 ESB and creating a war file&lt;/h2&gt;&lt;br /&gt;Download &lt;a href="http://wso2.org/downloads/esb/1.7"&gt;WSO2 ESB&lt;/a&gt; version 1.7 from the &lt;a href="http://www.wso2.org/"&gt;WSO2 site&lt;/a&gt; and extract it to a preferred location of yours. (E.g.:- C:\wso2esb-1.7.1). From this point onwards I will be referring to this folder as &lt;strong&gt;ESB_HOME&lt;/strong&gt;. Before creating the war file you need to change some of the configuration files. Let us look at these files one by one.&lt;br /&gt;&lt;br /&gt;&lt;cite&gt;1. axis2.xml&lt;/cite&gt;&lt;br /&gt;a) Open the &lt;cite&gt;axis2.xml&lt;/cite&gt; located at ESB_HOME/webapp/WEB-INF/classes/conf&lt;br /&gt;b) Search all the places where it specifies the jks file locations and replace them with the absolute paths.&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&lt;code style="color: rgb(255, 255, 255);"&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;E.g.:-&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;Change&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&amp;lt;Location&amp;gt;webapp/WEB-INF/classes/conf/identity.jks&amp;lt;/Location&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;to&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&amp;lt;Location&amp;gt;C:/wso2esb-1.7.1/webapp/WEB-INF/classes/conf/identity.jks&amp;lt;/Location&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;cite&gt;2. web.xml&lt;/cite&gt;&lt;br /&gt;a) Open the &lt;cite&gt;web.xml&lt;/cite&gt; file located at ESB_HOME/webapp/WEB-INF&lt;br /&gt;b) Specify the absolute location of the ESB_HOME&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&lt;code style="color: rgb(255, 255, 255);"&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;E.g.:-&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;Replace&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &amp;lt;init-param&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;            &amp;lt;param-name&gt;esb.home&amp;lt;/param-name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;            &amp;lt;param-value&gt;.&amp;lt;/param-value&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &amp;lt;/init-param&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;with&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &amp;lt;init-param&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;            &amp;lt;param-name&gt;esb.home&amp;lt;/param-name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;            &amp;lt;param-value&gt;C:/wso2esb-1.7.1&amp;lt;/param-value&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &amp;lt;/init-param&amp;gt;       &lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next we have to start up a &lt;a href="http://db.apache.org/derby/"&gt;Derby&lt;/a&gt; server for WSO2 ESB to connect to. Since we have an issue in getting the Derby server which resides in Websphere up and running, we will be starting an external Derby server.&lt;br /&gt;To do this, download the latest &lt;a href="http://db.apache.org/derby/derby_downloads.html"&gt;Derby binary&lt;/a&gt; and extract to a preferred location of yours. For testing purposes we will be using version 10.3.1.4. Then go to the folder DERBY_HOME/bin folder and type the following command.&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&lt;br /&gt;&lt;code style="color: rgb(255, 255, 255);"&gt;NetworkServerControl start -p 1528 &lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To direct the WSO2 ESB to connect to the external Derby server you need to set the &lt;cite&gt;StartEmbeddedDerby&lt;/cite&gt; property to 'false' of the ESB_HOME/webapp/WEB-INF/classes/conf/server.xml file&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&lt;code style="color: rgb(255, 255, 255);"&gt;&amp;lt;StartEmbeddedDerby&amp;gt;false&amp;lt;/StartEmbeddedDerby&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You are all set to create the war file. Now go to the folder 'webapp' of your ESB_HOME and open a command window.&lt;br /&gt;&lt;br /&gt;Type the following command and it will create esb.war file in ESB_HOME/webapp folder&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&lt;code style="color: rgb(255, 255, 255);"&gt;jar -cvf esb.war *&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Installing the WSO2 ESB appliacation on IBM Websphere&lt;/h2&gt;&lt;br /&gt;Follow the step described below to successfully install the WSO2 ESB application.&lt;br /&gt;&lt;br /&gt;1. Once logged in to the Administrative Console, click on &lt;cite&gt;Applications -&amp;gt; Install New Application&lt;/cite&gt;&lt;br /&gt;&lt;br /&gt;2. Under &lt;cite&gt;Preparing for the application installation&lt;/cite&gt; browse for the esb.war file that you created above. Specify the context root as &lt;cite&gt;esb&lt;/cite&gt;. If you need to see the steps when installing the WSO2 ESB Application, select the combo box option &lt;cite&gt;Show me all installation options and parameters&lt;/cite&gt; and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;3. From the page loaded to generate default bindings and mappings click on &lt;strong&gt;Next&lt;/strong&gt; without changing any options&lt;br /&gt;&lt;br /&gt;4. Click on &lt;cite&gt;Continue&lt;/cite&gt; given under &lt;cite&gt;Application Security Warnings&lt;/cite&gt; page&lt;br /&gt;&lt;br /&gt;5. When &lt;cite&gt;Install New Application -&amp;gt; Select installation options&lt;/cite&gt; is loaded specify a name that you prefer as the &lt;cite&gt;Application name&lt;/cite&gt;. Tick the check box &lt;cite&gt;Enable class reloading&lt;/cite&gt; and specify the &lt;cite&gt;Reload interval in seconds&lt;/cite&gt; as 60 seconds and then click on &lt;strong&gt;Next&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;6. Under &lt;cite&gt;Install New Application -&amp;gt; Map modules to servers&lt;/cite&gt; do not select any options and just click on the button &lt;strong&gt;Next&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;7. When the page &lt;cite&gt;Install New Application -&amp;gt; Provide JSP reloading options for Web modules&lt;/cite&gt; loads click on the button &lt;strong&gt;Next&lt;/strong&gt; without selecting anything&lt;br /&gt;&lt;br /&gt;8. Next do not select any options given under the page &lt;cite&gt;Install New Application -&amp;gt; Map shared libraries&lt;/cite&gt; and simply click on &lt;strong&gt;Next&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;9. When the page &lt;cite&gt;Install New Application -&amp;gt; Initialize parameters for servlets&lt;/cite&gt; is loaded check whether the specified parameters are correct and click on &lt;strong&gt;Next&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;10. Click on &lt;strong&gt;Next&lt;/strong&gt; without selecting any options when &lt;cite&gt;Install New Application -&amp;gt; Map virtual hosts for Web modules&lt;/cite&gt; page is loaded&lt;br /&gt;&lt;br /&gt;11. Verify whether the value given as the context root is correct in the page &lt;cite&gt;Install New Application -&amp;gt; Map context roots for Web modules&lt;/cite&gt; and click on &lt;strong&gt;Next&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;12. When the &lt;cite&gt;Install New Application -&amp;gt; Summary&lt;/cite&gt; page loads, go through the values which you have specified and if they are correct click on &lt;strong&gt;Finish&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Once you click on &lt;strong&gt;Continue&lt;/strong&gt; you will get a message as follows. Therefore click on &lt;strong&gt;Save&lt;/strong&gt; and the application will be installed successfully.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Configuring the WSO2 ESB Application&lt;/h2&gt;&lt;br /&gt;Go to Applications -&amp;gt; Enterprise Applications and click on the esb entry from the list of applications available.&lt;br /&gt;Then refer the section &lt;a href="http://wso2.org/library/2735#config_webs"&gt;Configuring IBM WebSphere Application Server&lt;/a&gt; in the tutorial &lt;a href="http://wso2.org/library/2735"&gt; Running WSO2 WSAS on an IBM WebSphere Application Server&lt;/a&gt; by &lt;a href="http://upulgodage.wordpress.com/"&gt;Upul Godage&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Follow the steps specified and once you are done with setting all the properties select the &lt;cite&gt;esb&lt;/cite&gt; application from the &lt;cite&gt;Enterprise Applications&lt;/cite&gt; list and click on &lt;strong&gt;Start&lt;/strong&gt;. This will start the WSO2 ESB server. If the server starts successfully you can try accessing the WSO2 ESB Administration Console through &lt;a href="https://localhost:9444/esb"&gt; https://localhost:9444/esb&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-288530465634702493?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/288530465634702493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=288530465634702493' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/288530465634702493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/288530465634702493'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2008/10/deploying-wso2-esb-on-ibm-websphere.html' title='Deploying WSO2 ESB on an IBM WebSphere Application Server'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-2435659228381611857</id><published>2008-10-06T00:25:00.000-07:00</published><updated>2008-10-07T02:30:40.982-07:00</updated><title type='text'>Starting the Derby Network Server on a new port</title><content type='html'>I was testing &lt;a href="http://wso2.org/projects/esb/java"&gt;WSO2 ESB&lt;/a&gt; on &lt;a href="http://www-01.ibm.com/software/webservers/appserv/was/"&gt;IBM Websphere&lt;/a&gt; and I could not get the &lt;a href="http://db.apache.org/derby/"&gt;Derby&lt;/a&gt; server inside Websphere running and therefore wanted to start a new Derby server outside Websphere. I was struggling to get this working till I came across a link which was specified by one of my colleges in one of the &lt;a href=" http://wso2.org/forum/thread/3712#comment-5976"&gt;WSO2 ESB forum posts&lt;/a&gt;. In that article it clearly specifies how you can start a new Derby server on a new port.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;NetworkServerControl start -p 1528&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Generally when you start up WSO2 ESB it would start a Derby database which is embedded inside WSO2 ESB&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;. &lt;/span&gt;&lt;/span&gt;Therefore if you want the ESB instance to listen to the new Derby server which you started on port 1528 then all you have to do is set the following property to false of the ESB_HOME/webapp/WEB-INF/classes/conf/server.xml file.&lt;br /&gt;&lt;br /&gt;&amp;lt;StartEmbeddedDerby&amp;gt;false&amp;lt;/StartEmbeddedDerby&amp;gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-2435659228381611857?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/2435659228381611857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=2435659228381611857' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/2435659228381611857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/2435659228381611857'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2008/10/starting-derby-network-server-on-new.html' title='Starting the Derby Network Server on a new port'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-717992121935000183</id><published>2008-10-03T01:12:00.000-07:00</published><updated>2008-10-06T21:39:10.998-07:00</updated><title type='text'>How to disable chunking/keep-alive when using Synapse</title><content type='html'>How do you disable chunking/keep-alive? Many users have asked this question through the Synapse/WSO2 ESB mailing lists several times.  This is possible through the &lt;span style="font-style: italic; color: rgb(255, 255, 255); font-weight: bold;"&gt;Property&lt;/span&gt; mediator.&lt;br /&gt;&lt;br /&gt;Generally chunking is enabled by default. If you need to disable chunking/keep-alive all you have to do is set the property "FORCE_HTTP_1.0" to "TRUE" in the scope axis2 using Property Mediator&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;property name="FORCE_HTTP_1.0" value="true" scope="axis2"&gt;&lt;/property&gt;&amp;lt;property name="&lt;/span&gt;FORCE_HTTP_1.0&lt;span style="font-style: italic;"&gt;" value="true"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-717992121935000183?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/717992121935000183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=717992121935000183' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/717992121935000183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/717992121935000183'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2008/10/how-to-enable-chunking-when-using.html' title='How to disable chunking/keep-alive when using Synapse'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-3598352424516016747</id><published>2008-10-02T06:40:00.000-07:00</published><updated>2008-10-02T06:56:42.708-07:00</updated><title type='text'>How to enable JMX monitoring support on Synapse</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: trebuchet ms;"&gt;How do you enable JMX monitoring support on Synapse? This is a question that may arise in someone who would try out Synapse. In order to do this you will have to add the following line to the synapse.sh file&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms; font-style: italic;"&gt;-Dcom.sun.management.jmxremote&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;Once this line is added you just need to start the Synapse server. When the Synapse server is started, open a new terminal window and type the command 'jconsole' and then you will be given the Monitoring &amp;amp; Management Console along with the available servers to connect&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="font-family: trebuchet ms;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_aQARzXEhjqs/SOTS3aP6JAI/AAAAAAAAAAM/YExpg13mzpw/s1600-h/Screenshot-JConsole:+Connect+to+Agent.png"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_aQARzXEhjqs/SOTS3aP6JAI/AAAAAAAAAAM/YExpg13mzpw/s320/Screenshot-JConsole:+Connect+to+Agent.png" alt="" id="BLOGGER_PHOTO_ID_5252554914801525762" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-3598352424516016747?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/3598352424516016747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=3598352424516016747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/3598352424516016747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/3598352424516016747'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2008/10/how-to-enable-jmx-monitoring-support-on.html' title='How to enable JMX monitoring support on Synapse'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_aQARzXEhjqs/SOTS3aP6JAI/AAAAAAAAAAM/YExpg13mzpw/s72-c/Screenshot-JConsole:+Connect+to+Agent.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-1900953736546027326</id><published>2008-09-26T03:59:00.000-07:00</published><updated>2008-09-26T04:04:40.511-07:00</updated><title type='text'>How to get a thread dump of WSO2 ESB</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;When WSO2 ESB server is running, find the process ID by using the following command&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:trebuchet ms;" &gt;ps -ef | grep wso2esb&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Once you find the process ID, use the following command and then you will get a thread dump on the WSO2 ESB console&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:trebuchet ms;" &gt;kill -3 &amp;lt;ProcessID_of_WSO2ESB&amp;gt; &lt;processid_of_wso2esb&gt;&lt;/processid_of_wso2esb&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-1900953736546027326?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/1900953736546027326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=1900953736546027326' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/1900953736546027326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/1900953736546027326'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2008/09/how-to-get-thread-dump-of-wso2-esb.html' title='How to get a thread dump of WSO2 ESB'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-8495519236340917092</id><published>2008-09-24T21:05:00.000-07:00</published><updated>2008-09-24T23:09:37.135-07:00</updated><title type='text'>Setting up WSO2 ESB in a clustered environment</title><content type='html'>I will briefly describe how one can easily set up WSO2 ESB in a clustered environment.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Prerequisites&lt;/span&gt;&lt;br /&gt;Download the latest version of &lt;a href="http://dist.wso2.org/products/esb/java/1.7.1/wso2-esb-java-1.7.1-bin.zip"&gt;WSO2 ESB&lt;/a&gt; and extract to a folder of your choice. (I will refer to the two WSO2 ESB instances as cluster1 and cluster2)&lt;br /&gt;NOTE: I will be having both the WSO2 ESB instances on my local machine.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1&lt;/span&gt;&lt;br /&gt;Out of the two WSO2 ESB instances, select one and edit the default ports. (cluster2)&lt;br /&gt;&lt;span style="font-style: italic;"&gt;a) axis2.xml ($ESB_HOME/webapp/WEB-INF/classes/conf)&lt;/span&gt;&lt;br /&gt;-  To enable clustering uncomment the following of both ESB instances&lt;br /&gt; &lt;cluster class="org.apache.axis2.clustering.tribes.TribesClusterManager"&gt;&lt;/cluster&gt;    &amp;lt;cluster class="org.apache.axis2.clustering.tribes.TribesClusterManager"&amp;gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;parameter name="AvoidInitiation"&amp;gt;false&amp;lt;/parameter&amp;gt;&lt;br /&gt;      &amp;lt;parameter name="domain"&amp;gt;wso2esb.domain&amp;lt;/parameter&amp;gt;&lt;br /&gt;  ...&lt;br /&gt;  ...&lt;br /&gt;  &amp;lt;/cluster&amp;gt;&lt;br /&gt;&lt;br /&gt;- Change the HTTP and HTTPS ports specified in the axis2.xml of cluster2 (E.g.:- HTTP - 8281 , HTTPS - 8244)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;b) tomcat.properties of cluster2 should also be changed as follows &lt;/span&gt;&lt;span style="font-style: italic;"&gt;($ESB_HOME/tomcat/config)&lt;/span&gt;&lt;br /&gt;Change the Admin console port given in the tomcat.properties file (E.g.:- 9443)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2&lt;/span&gt;&lt;br /&gt;Edit the ./wso2esb.sh file of both the instances (cluster1 and cluster2) and add the following&lt;br /&gt;&lt;span style="font-style: italic;"&gt;-Daxis2.local.ip.address=&amp;lt;Your_IP&amp;gt;&lt;ip_address&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/ip_address&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Step 3&lt;/span&gt;&lt;br /&gt;Now you are all ready to start the two WSO2 ESB instances in the clustered environment&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-8495519236340917092?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/8495519236340917092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=8495519236340917092' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/8495519236340917092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/8495519236340917092'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2008/09/setting-up-wso2-esb-in-clustered.html' title='Setting up WSO2 ESB in a clustered environment'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-6623943579269503871</id><published>2008-09-18T22:20:00.000-07:00</published><updated>2008-09-19T01:55:10.862-07:00</updated><title type='text'>Reliable message exchange with WSO2 ESB - Invoking WS-RM Service using nonWS-RM one-way client</title><content type='html'>&lt;span style="font-weight: bold;font-size:100%;" &gt;Invoking a WS-RM enabled service using a one-way client where WS-RM is not enabled&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Reliable messaging allows messages to be delivered reliably between applications in the presence of system, or network failures. I will breifly describe how reliable messaging is made possible with WSO2 ESB along with some samples. Step by step information will be provided on how to configure WSO2 ESB to handle the exchanging of messages between WS-Reliable Messaging (WS-RM) enabled services and clients.&lt;br /&gt;&lt;br /&gt;To start off with, you will need to download and install WSO2 ESB on your machine. (Refer https://wso2.org/project/esb/java/1.7.1/docs/installationguide.html on how to download and install WSO2 ESB). From this point onwards the location where WSO2 ESB is installed will be refered to as ESB_HOME.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Step 1 - Creating and deploying a WS-RM enabled service.&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;The implementation class should be created as follows.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;package  org.wso2.esb.services;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;public class RMService  {&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;   public void Ping(String x){&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;       System.out.println("Received Ping request");&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;   }&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;}&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;Then create a services.xml file as follows&lt;br /&gt;&lt;br /&gt;&amp;lt;service name="RMService"&amp;gt;&lt;br /&gt;&amp;lt;description&amp;gt;This service is created to add two numbers.&amp;lt;/description&amp;gt;&lt;br /&gt; &amp;lt;parameter name="ServiceClass" locked="false"&amp;gt;org.wso2.esb.services.RMService&amp;lt;/parameter&amp;gt;&lt;br /&gt;&amp;lt;messageReceivers&amp;gt;&lt;br /&gt;      &amp;lt;messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/&amp;gt;&lt;br /&gt;      &amp;lt;messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/&amp;gt;&lt;br /&gt;&amp;lt;/messageReceivers&amp;gt;&lt;br /&gt;&amp;lt;module ref="Mercury"/&amp;gt;&lt;br /&gt;&amp;lt;/service&amp;gt;&lt;br /&gt;&lt;br /&gt;Place the above services.xml file in a directory named META-INF. Compile the RMService class and get the compiled class, bundle it with the META-INF file and create an .aar file. For testing purposes we will be using the SimpleAxisServer which comes with the WSO2 ESB package so deploy the services. Therefore drop the created archive file in ESB_HOME/samples/axis2Server/repository/services. (To check if the service has been deployed successfully access http://localhost:9000/soap)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Step 2 - Creating the WSO2 ESB Configuration&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;Start the WSO2 ESB server located at ESB_HOME/bin and access the WSO2 ESB Admin console through https://localhost:9444/esb/&lt;br /&gt;&lt;br /&gt;Inorder for the non-WS-RM client to communicate with the WS-RM enabled service the folling configuration should be used. Log in to the WSO2 ESB admin console (username - admin, password - admin) and create the following configuration.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;definitions xmlns="http://ws.apache.org/ns/synapse"&amp;gt;&lt;br /&gt;&amp;lt;proxy name="RMProxy" transports="http" startOnLoad="true" statistics="enable"&amp;gt;&lt;br /&gt;  &amp;lt;target&amp;gt;&lt;br /&gt;      &amp;lt;inSequence&amp;gt;&lt;br /&gt;         &amp;lt;RMSequence single="true" version="1.0"/&amp;gt;&lt;br /&gt;         &amp;lt;send&amp;gt;&lt;br /&gt;              &amp;lt;endpoint&amp;gt;&lt;br /&gt;                  &amp;lt;address uri="http://localhost:9000/soap/RMService"&amp;gt;&lt;br /&gt;                      &amp;lt;enableAddressing/&amp;gt;&lt;br /&gt;                      &amp;lt;enableRM/&amp;gt;&lt;br /&gt;                  &amp;lt;/address&amp;gt;&lt;br /&gt;              &amp;lt;/endpoint&amp;gt;&lt;br /&gt;          &amp;lt;/send&amp;gt;&lt;br /&gt;      &amp;lt;/inSequence&amp;gt;&lt;br /&gt;      &amp;lt;outSequence&amp;gt;&lt;br /&gt;          &amp;lt;send/&amp;gt;&lt;br /&gt;      &amp;lt;/outSequence&amp;gt;&lt;br /&gt;  &amp;lt;/target&amp;gt;&lt;br /&gt;  &amp;lt;enableRM/&amp;gt;&lt;br /&gt;&amp;lt;/proxy&amp;gt;&lt;br /&gt;&amp;lt;/definitions&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Step 3 - Generating Stubs&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;Inorder for the client to successfully execute we need to generate stubs. This can easily be done through WSO2 WSAS. (Refer http://charithaka.blogspot.com/2008/02/securing-axis2wsas-web-services-with.html Step 3). For ease of use I will be providing a generated jar file which works with the below client code. You can download it from &lt;a href="https://ww2.wso2.org/%7Eevanthika/client_jar/Adding-test-client.jar"&gt;here&lt;/a&gt;&lt;br /&gt;Make sure to add jars in ESB_HOME/lib and the above downloaded client stub jar to your class path in order to compile the client.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Step 4 - Create a non-WS-RM Client&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;The next step would be create a client to invoke the WS-RM enabled service as follows. The below client supports only SOAP11 messages. For you to try out SOAP12 messages you can use the client &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://ww2.wso2.org/%7Eevanthika/non-WSRM-Clients/OnewayAnnonSOAP12Client.java"&gt;OneWayAnnonSOAP12Client&lt;/a&gt;.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;public class OneWayAnnonSOAP11Client { &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt; public static void main(String[] args)throws AxisFault {&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;  ConfigurationContext cc = ConfigurationContextFactory.createConfigurationContextFromFileSystem("/home/rmScenario/client_repo","/home/rmScenario/client-repo/axis2.xml");&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;  OMElement payload = createPayLoad();&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;  &lt;span style="font-style: italic;font-size:100%;" &gt;  ServiceClient serviceclient = new ServiceClient(cc, null);   &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;  &lt;span style="font-style: italic;font-size:100%;" &gt;  Options opts = new Options();&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;  opts.setTo(new EndpointReference("http://localhost:8280/soap/RMProxy"));&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;  opts.setAction("urn:Ping");&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;  &lt;span style="font-style: italic;font-size:100%;" &gt;  serviceclient.setOptions(opts);  &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;  &lt;span style="font-style: italic;font-size:100%;" &gt;  try {&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;   serviceclient.fireAndForget(payload);&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;  } catch (RemoteException e) {&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;   e.printStackTrace();&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;  }&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;  &lt;span style="font-style: italic;font-size:100%;" &gt;  try {&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;   Thread.sleep(1000);&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;  } catch (InterruptedException e) {&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;   e.printStackTrace();&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;  }&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt; }&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-style: italic;font-size:100%;" &gt; public static OMElement createPayLoad(){  &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;  OMFactory fac = OMAbstractFactory.getOMFactory();&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;  OMNamespace omNs = fac.createOMNamespace("http://service.esb.wso2.org", "ns");&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;  OMElement method = fac.createOMElement("Ping", omNs);&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;  OMElement value = fac.createOMElement("ping", omNs);&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;  value.addChild(fac.createOMText(method, "pong"));&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;  method.addChild(value);&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;  return method;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt; }&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;}&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;You can access the entire client code from &lt;a href="http://ww2.wso2.org/%7Eevanthika/non-WSRM-Clients/OnewayAnnonSOAP11Client.java"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Before you execute the client, make sure you have copied the &lt;a href="http://ww2.wso2.org/%7Eevanthika/client_repo/mercury-mar.mar"&gt;Mercury.mar&lt;/a&gt; (make sure that the mar file is inside a folder named 'module') and &lt;a href="http://ww2.wso2.org/%7Eevanthika/client_repo/axis2.xml"&gt;axis2.xml&lt;/a&gt; to the specified locations above.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 5 - Starting the  Simple Axis2 Server&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Go to the ESB_HOME/samples/axis2Server and start the simple axis2server&lt;br /&gt;E.g.:- sh ./axis2Server.sh&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Step 6 - Executing the client&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;Now you are all set to execute the client. To see whether the messages are being sent properly you can send them through TCPMon. &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-6623943579269503871?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/6623943579269503871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=6623943579269503871' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/6623943579269503871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/6623943579269503871'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2008/09/reliable-message-exchange-with-wso2-esb.html' title='Reliable message exchange with WSO2 ESB - Invoking WS-RM Service using nonWS-RM one-way client'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-4289914246597623877</id><published>2008-07-09T03:29:00.000-07:00</published><updated>2008-09-19T01:57:42.437-07:00</updated><title type='text'>How to deploy WSO2 ESB on Apache Tomcat</title><content type='html'>&lt;div  style="text-align: left;font-family:trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://wso2.org/projects/esb/java"&gt;WSO2 ESB&lt;/a&gt; can be deployed on differnt application servers such as &lt;a href="http://www-306.ibm.com/software/webservers/appserv/was/"&gt;IBM WebSphere&lt;/a&gt;, &lt;a href="http://www.bea.com/framework.jsp?CNT=index.htm&amp;amp;FP=/content/products/server"&gt;BEA WebLogic Server&lt;/a&gt;, &lt;a href="http://www.jboss.com/products/platforms/application"&gt;JBoss&lt;/a&gt; and &lt;a href="http://tomcat.apache.org/"&gt;Apache Tomcat&lt;/a&gt;. I will be describing how one can easily deploy WSO2 ESB on Apache Tomcat. A similar article has been written on how to deploy WSO2 ESB on WebLogic by Asankha Perera  - &lt;a href="http://wso2.org/library/3792"&gt;Running the WSO2 Enterprise Service Bus (ESB) on the WebLogic Application Server&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Step 1 - Downloading and installing Apache Tomcat&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;You can download the latest version of Apache Tomcat from &lt;a href="http://tomcat.apache.org/download-60.cgi"&gt;here&lt;/a&gt; (I will be using Apache Tomcat 5.5.26 to demonstrate this scenario).&lt;br /&gt;Extract the downloaded distribution to a specific location and define the environment variables properly.&lt;br /&gt;&lt;br /&gt;E.g.: -&lt;br /&gt;&lt;/span&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-size:100%;" &gt;export CATALINA_HOME=/opt/installations/tomcat/apache-&lt;br /&gt;tomcat-5.5.26&lt;br /&gt;export PATH=$PATH:$CATALINA_HOME/bin&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;Next you will need to enable  HTTPS on Apache Tomcat since WSO2 ESB runs over HTTPS. To do this, access the server.xml file located at $CATALINA_HOME/conf and uncomment the following.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;    &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-family:trebuchet ms;" &gt;&amp;lt;Connector port="8443" maxHttpHeaderSize="8192"&lt;br /&gt; maxThreads="150" minSpareThreads="25" maxSpareThreads="75"&lt;br /&gt; enableLookups="false" disableUploadTimeout="true"&lt;br /&gt; acceptCount="100" scheme="https" secure="true"&lt;br /&gt; clientAuth="false" sslProtocol="TLS"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then you will need to provide the keystore file location along with it's password as below.&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;font-family:trebuchet ms;" &gt;&amp;lt;Connector port="8443" maxHttpHeader&lt;br /&gt;maxThreads="150" minSpareThreads="25" maxSpareThreads="75"&lt;br /&gt;enableLookups="false" disableUploadTimeout="true"&lt;br /&gt;acceptCount="100" scheme="https" secure="true"&lt;br /&gt;clientAuth="false" sslProtocol="TLS"&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        keystore="/opt/wso2esb-1.7/webapp/WEB-INF/classes&lt;br /&gt;/conf/identity.jks"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        keypass="password"&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2 - Starting the Apache Tomcat Server&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now you can start the Apache Tomcat server by giving the following command.&lt;br /&gt;&lt;span&gt;sh ./catalina.sh run&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3 - Downloading and installing WSO2 ESB&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Download the latest WSO2 ESB distribution from &lt;a href="http://wso2.org/downloads/esb/"&gt;here&lt;/a&gt; and extract to a specific location. (E.g.:- /opt/wso2esb-1.7)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 4 - Changing necessary files of the WSO2 ESB distribution&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In order for the deployement to be successful you will need to change some files of the WSO2 ESB distribution.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;a) Editing the web.xml&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;To begin with you will need to change the init parameter of "ESBStartUpServlet" of the web.xml which is located at /opt/wso2esb-1.7/webapp/WEB-INF as below.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;    &amp;lt;servlet&amp;gt;&lt;br /&gt;&amp;lt;servlet-name&amp;gt;ESBStartUpServlet&amp;lt;/servlet-name&amp;gt;          &amp;lt;servlet-class&amp;gt;org.wso2.esb.transport.tomcat.&lt;br /&gt;StartUpServlet&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;&amp;lt;init-param&amp;gt;&lt;br /&gt;      &amp;lt;param-name&amp;gt;esb.home&amp;lt;/param-name&amp;gt;&lt;br /&gt;      &amp;lt;param-value&amp;gt;&lt;span style="color: rgb(255, 255, 255);"&gt;/opt/wso2esb-1.7&lt;/span&gt;&amp;lt;/param-value&amp;gt;&lt;br /&gt;&amp;lt;/init-param&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;b) Editing the axis2.xml&lt;/span&gt;&lt;br /&gt;Next you will need to change the paths of the keystore and truststore files specified in the axis2.xml as below specifying the absolute paths.&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&amp;lt;parameter name="keystore" locked="false"&amp;gt;&lt;br /&gt;&amp;lt;KeyStore&amp;gt;&lt;br /&gt; &amp;lt;Location&amp;gt;&lt;span style="color: rgb(255, 255, 255);"&gt;/opt/wso2esb-1.7/webapp/WEB-INF/&lt;br /&gt;classes/conf/identity.jks&lt;/span&gt;&amp;lt;/Location&amp;gt;&lt;br /&gt; &amp;lt;Type&amp;gt;JKS&amp;lt;/Type&amp;gt;&lt;br /&gt; &amp;lt;Password&amp;gt;password&amp;lt;/Password&amp;gt;&lt;br /&gt; &amp;lt;KeyPassword&amp;gt;password&amp;lt;/KeyPassword&amp;gt;&lt;br /&gt;&amp;lt;/KeyStore&amp;gt;&lt;br /&gt;&amp;lt;/parameter&amp;gt;&lt;br /&gt;&amp;lt;parameter name="truststore" locked="false"&amp;gt;&lt;br /&gt;&amp;lt;TrustStore&amp;gt;&lt;br /&gt; &amp;lt;Location&amp;gt;&lt;span style="color: rgb(255, 255, 255);"&gt;/opt/wso2esb-1.7/webapp/WEB-INF&lt;br /&gt;/classes/conf/trust.jks&lt;/span&gt;&amp;lt;/Location&amp;gt;&lt;br /&gt; &amp;lt;Type&amp;gt;JKS&amp;lt;/Type&amp;gt;&lt;br /&gt; &amp;lt;Password&amp;gt;password&amp;lt;/Password&amp;gt;&lt;br /&gt;&amp;lt;/TrustStore&amp;gt;&lt;br /&gt;&amp;lt;/parameter&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now all the required files are edited and you can create a .war file with all the required files of WSO2 ESB.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 5 - Creating the WSO2 ESB .war file&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Navigate to the folder /opt/wso2esb-1.7/webapp and type the command.&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;   &lt;span&gt; jar -cvf esb.war *&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It would create a war file inside the /opt/wso2esb-1.7/webapp folder.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 6 - Deploying the esb.war on Apache Tomcat&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now navigate to $CATALINA_HOME/webapps folder and drop the esb.war file which you created. If everything goes well the WSO2 ESB server should start successfully and you should see something like the following on the console which you started the Apache Tomcat server.&lt;br /&gt;&lt;br /&gt;&lt;span style="border: 1px solid rgb(192, 192, 192); padding: 5px; display: block;"&gt;&lt;span&gt;2008-07-09 15:09:02,030 ......INFO ServerManager Ready for processing&lt;/span&gt;&lt;span&gt;&lt;br /&gt;2008-07-09 15:09:03,654 ......INFO ServiceBusManager [ESB] Start request completed&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 7 - Login to the WSO2 ESB Administration Console&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now you should be able to login to the WSO2 ESB Administration Console as, &lt;a href="https://localhost:8443/esb"&gt;https://localhost:8443/esb&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-4289914246597623877?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/4289914246597623877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=4289914246597623877' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/4289914246597623877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/4289914246597623877'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2008/07/how-to-deploy-wso2-esb-on-apache-tomcat.html' title='How to deploy WSO2 ESB on Apache Tomcat'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-7648755802753124098</id><published>2008-06-30T00:03:00.000-07:00</published><updated>2008-09-19T01:57:57.081-07:00</updated><title type='text'>Database interactions in mediation using DBLookup and DBReport mediators with MySQL</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a href="http://www.mysql.com/"&gt;MySQL&lt;/a&gt; is known to be the world's most popular open source database due to its fast performance. It is a known fact that a many individuals as well as a lot of world's largest organizations such as Yahoo, Google, Nokia and YouTube use MySQL as their database to save time and money. &lt;a href="http://wso2.org/projects/esb/java"&gt;WS02 ESB&lt;/a&gt; has a wide variety of mediators that enables us to connect, manage and transform service interactions between Web services. The DBLookup and DBReport mediators allows you to read data from a database and also to write to a database. Generally we use &lt;a href="http://db.apache.org/derby/"&gt;Apache Derby&lt;/a&gt; as the database in our samples but we can use MySQL as well. Let us see how we can use these mediators to look up and report to a MySQL database. &lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;font-family:trebuchet ms;" &gt;Step 1 - Setting up the MySQL database&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;You will need to install &lt;a href="http://dev.mysql.com/downloads/"&gt;MySQL&lt;/a&gt; server on your machine. Once you have installed MySQL, log into the database using the command&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold; font-style: italic;font-family:trebuchet ms;" &gt;mysql -u &amp;lt;username&amp;gt; -p&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-style: italic;"&gt;E.g.:- mysql -u root -p&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;Create a database using the following command.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold; font-style: italic;font-family:trebuchet ms;" &gt;create database esb;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;Select the newly created database as follows&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold; font-style: italic;font-family:trebuchet ms;" &gt;CREATE table company(name varchar(10), id varchar(10), price double);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;Now create a table using the following command on the newly created database&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold; font-style: italic;font-family:trebuchet ms;" &gt;INSERT into company values ('IBM','c1',0.0);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold; font-style: italic;font-family:trebuchet ms;" &gt;INSERT into company values ('SUN','c2',0.0);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold; font-style: italic;font-family:trebuchet ms;" &gt;INSERT into company values ('MSFT','c3',0.0);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;font-family:trebuchet ms;" &gt;Step 2 - Installing WSO2 ESB&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-style: italic;font-family:trebuchet ms;" &gt;a) Downloading the binary distribution&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;You will need to install WSO2 ESB on your machine. You can download the latest ESB binary distribution from &lt;a href="http://wso2.org/downloads/esb/"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-style: italic;font-family:trebuchet ms;" &gt;b) Deploying the service&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;Extract the distribution and navigate to the ESB_HOME/samples/axis2Server folder and start the Axis2 Server. To deploy the SimpleStockQuoteService go to ESB_HOME/samples/axis2Server/src/SimpleStockQuoteService and type 'ant' and it will build the particular service. You can verify whether the service has been deployed successfully by accessing the URL http://localhost:9000/soap/&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;c) Starting the Simple Axis2 Server&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To start the simple axis server navigate to ESB_HOME/samples/axis2Server and run ./axis2Server.sh. Then it would start the axis2 server on port 9000&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-style: italic;font-family:trebuchet ms;" &gt;d) Starting the WSO2 ESB server&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;To start the WSO2 ESB server go to ESB_HOME/bin and run ./wso2-esb.sh. Once the WSO2 ESB server is started you will be able to access the WSO2 ESB admin console using https://localhost:9444/esb &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;font-family:trebuchet ms;" &gt;Step 3 - Create configuration&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;The following configuration sends a request to a service and receives a response and then the database is updated from those retrieved response values. Create the following configuration using the WS02 ESB admin console.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:100%;"&gt;&amp;lt;syn:definitions xmlns:syn="http://ws.apache.org/ns/synapse"&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;  &amp;lt;syn:sequence name="sample_sequence2"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;        &amp;lt;syn:in&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;            &amp;lt;syn:send&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                &amp;lt;syn:endpoint&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                    &amp;lt;syn:address uri="http://localhost:9000/soap/SimpleStockQuoteService"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                &amp;lt;/syn:endpoint&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;            &amp;lt;/syn:send&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;        &amp;lt;/syn:in&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;        &amp;lt;syn:out&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;            &amp;lt;syn:log level="custom"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                &amp;lt;syn:property name="text" value="** Reporting to the Database **"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;            &amp;lt;/syn:log&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;            &amp;lt;syn:dbreport&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                &amp;lt;syn:connection&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                    &amp;lt;syn:pool&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                        &amp;lt;syn:driver&amp;gt;com.mysql.jdbc.Driver&amp;lt;/syn:driver&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                        &amp;lt;syn:property name="autocommit" value="false"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                        &amp;lt;syn:password&amp;gt;admin&amp;lt;/syn:password&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                        &amp;lt;syn:user&amp;gt;root&amp;lt;/syn:user&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                        &amp;lt;syn:url&amp;gt;jdbc:mysql://127.0.0.1:3306/esb&amp;lt;/syn:url&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                    &amp;lt;/syn:pool&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                &amp;lt;/syn:connection&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                &amp;lt;syn:statement&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                    &amp;lt;syn:sql&amp;gt;&amp;lt;update company set price=? where name =?&amp;gt;&amp;lt;/syn:sql&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                    &amp;lt;syn:parameter xmlns:m0="http://services.samples/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" expression="//m0:return/m0:last/child::text()" type="DOUBLE"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                    &amp;lt;syn:parameter xmlns:m0="http://services.samples/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" expression="//m0:return/m0:symbol/child::text()" type="VARCHAR"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                &amp;lt;/syn:statement&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;            &amp;lt;/syn:dbreport&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;            &amp;lt;syn:log level="custom"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                &amp;lt;syn:property name="text" value="** Looking up from the Database **"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;            &amp;lt;/syn:log&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;            &amp;lt;syn:dblookup&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                &amp;lt;syn:connection&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                    &amp;lt;syn:pool&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                        &amp;lt;syn:driver&amp;gt;com.mysql.jdbc.Driver&amp;lt;/syn:driver&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                        &amp;lt;syn:password&amp;gt;admin&amp;lt;/syn:password&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                        &amp;lt;syn:user&amp;gt;root&amp;lt;/syn:user&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                        &amp;lt;syn:url&amp;gt;jdbc:mysql://127.0.0.1:3306/esb&amp;lt;/syn:url&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                    &amp;lt;/syn:pool&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                &amp;lt;/syn:connection&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                &amp;lt;syn:statement&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                    &amp;lt;syn:sql&amp;gt;&amp;lt;select * from company where name =?&amp;gt;&amp;lt;/syn:sql&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                    &amp;lt;syn:parameter xmlns:m0="http://services.samples/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" expression="//m0:return/m0:symbol/child::text()" type="VARCHAR"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                    &amp;lt;syn:result name="stock_price" column="price"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                &amp;lt;/syn:statement&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;            &amp;lt;/syn:dblookup&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;            &amp;lt;syn:log level="custom"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;                &amp;lt;syn:property xmlns:ns1="http://org.apache.synapse/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" name="text" expression="fn:concat('Stock price - ',get-property('stock_price'))"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;            &amp;lt;/syn:log&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;            &amp;lt;syn:send/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;        &amp;lt;/syn:out&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;    &amp;lt;/syn:sequence&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;/syn:definitions&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-weight: bold;"&gt;NOTE:&lt;/span&gt; When &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;using &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;MySQL as the database make sure that you set the following property in the configuration&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;pre&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&amp;lt;syn:property name="autocommit" value="false"/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;font-family:trebuchet ms;" &gt;&lt;br /&gt;Step 4 - Invoking the client&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;Once the configuration is created you should be able to invoke the stockquote client using the following command.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold; font-style: italic;font-family:trebuchet ms;" &gt;ant stockquote -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=IBM&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;If the client executes successfully you should see the following on the WSO2 ESB console&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;DEBUG LogMediator Start : Log mediator&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;INFO LogMediator text = ** Reporting to the Database **&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;DEBUG LogMediator End : Log mediator&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;....&lt;br /&gt;DEBUG DBReportMediator Successfully prepared statement : update company set price=? where name =? against DataSource : jdbc:mysql://127.0.0.1:3306/esb&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;DEBUG DBReportMediator Inserted 1 row/s using statement : update company set price=? where name =?&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;....&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;DEBUG LogMediator Start : Log mediator&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;INFO LogMediator text = ** Looking up from the Database **&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;DEBUG LogMediator End : Log mediator&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;....&lt;br /&gt;DEBUG DBLookupMediator Successfully prepared statement : select * from company where name =? against DataSource : jdbc:mysql://127.0.0.1:3306/esb&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;DEBUG DBLookupMediator End : DBLookup mediator&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;DEBUG LogMediator Start : Log mediator&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;INFO LogMediator text = Stock price - 147.286209770313&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;DEBUG LogMediator End : Log mediator&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;Finally you can check if the company table has been updated with the new stock value by a simple query.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-7648755802753124098?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/7648755802753124098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=7648755802753124098' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/7648755802753124098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/7648755802753124098'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2008/06/database-interactions-in-mediation.html' title='Database interactions in mediation using DBLookup and DBReport mediators with MySQL'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-1222381878671151146</id><published>2008-02-04T02:03:00.000-08:00</published><updated>2008-09-19T01:57:59.477-07:00</updated><title type='text'>Using WAST for ESB/WSAS performance testing - not a good choice</title><content type='html'>&lt;span style=";font-family:verdana;font-size:100%;"  &gt;Last November I blogged about WAST and how this tool can be used for Web Application Stress Testing. In that I made a statement saying that it would be great if we can use this tool for our own products such as ESB and WSAS. During the two week vacation I got due to my illness, I thought I should do some research to see if we can &lt;/span&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;actually &lt;/span&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;use this tool for ESB.&lt;br /&gt;&lt;br /&gt;So I first started the ESB server along with the axis2Server and then started recording. Once the recording started a Firefox browser window opened asking to enter the web address. Therefore I entered the proper URL and started doing some operations in the Administration Console. (E.g.:- Logged in, Click on Proxy Services link, etc). Then I stopped the recording to see if it has been properly done and to my surprise nothing was recorded. I was quite confused. I was pretty sure that I did everything properly but then again I have not read the manual properly. It clearly states that this can be used with Internet Explorer only. So this was the first reason for me to give up on this. Then I tried to record on IE but again failed since WAST does not support HTTPS. If you want to test a secured site like ESB you will manually have to go and change the URL, which was quite annoying.&lt;br /&gt;&lt;br /&gt;So due to these drawbacks I think that we should focus more on some other tools which we can easily use for stress testing without having to put so much effort like we have to when using WAST. On the other hand if we spend a little bit of time on this particular tool we might be able to get some use for our products. I'm sure we can but it requires a little bit of effort. So while checking for other alternatives it is advisable that we do more research on WAST as well.&lt;br /&gt;&lt;br /&gt;Refer &lt;a href="http://www.microsoft.com/technet/archive/itsolutions/intranet/downloads/webstres.mspx?mfr=true"&gt;http://www.microsoft.com/technet/archive/itsolutions/intranet/downloads/webstres.mspx?mfr=true&lt;/a&gt; for it's limitations.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-1222381878671151146?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/1222381878671151146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=1222381878671151146' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/1222381878671151146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/1222381878671151146'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2008/02/using-wast-for-esbwsas-performance.html' title='Using WAST for ESB/WSAS performance testing - not a good choice'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-59077094557892.post-2627561446693644180</id><published>2007-11-27T20:45:00.000-08:00</published><updated>2008-09-19T01:58:17.622-07:00</updated><title type='text'>Load Testing Web Applications using Microsoft’s Web Application Stress Tool</title><content type='html'>&lt;span style=";font-family:verdana;font-size:100%;"  &gt;As you all know, when testing WEB applications, we need to concentrate on many areas. Following is a list of things that we generally have to focus on when testing WEB applications.&lt;br /&gt;&lt;br /&gt;-         Load and Performance Testing&lt;br /&gt;-         Link Checking&lt;br /&gt;-         HTML Validating&lt;br /&gt;-         Web Functional/Regression Testing&lt;br /&gt;-         Web Site Security Testing&lt;br /&gt;-         External Site Monitoring&lt;br /&gt;&lt;br /&gt;Most of all what we have to concentrate on is  Load balancing and Performance Testing. Why load balancing? One would ask. Well, a web site is meant to be accessed by a whole bunch of people out there. At this instant thousands of people must be accessing the Google site. Millions of people must be reading things on CNN. Therefore these sites need to be stress tested before actually putting them out for production. That's why these type of stress testing tools are very valuable for testing such web applications.&lt;br /&gt;&lt;br /&gt;Some time back, at the my previous company which I was employed at, they developed a Java application which included a WEB application as well. This site was meant to be used by thousands of concurrent users. Therefore, it was very important for the site to be stress tested. As a result, we used WAST to do the performance testing and it became very successful. I think if we could research more on this tool, we should be able to use it for the future WEB applications that we develop at WSO2. I’m just giving you all a small introduction on the tool.&lt;br /&gt;&lt;br /&gt;This was taken by an article written by By Rick Strahl. For more information refer http://www.west-wind.com/presentations/webstress/webstress.htm&lt;br /&gt;&lt;br /&gt;Microsoft's Web Application Stress Tool provides an easy way to simulate large numbers of users against your Web application. This tool makes it possible to make intelligent decisions about hardware and software load incurred by your application and how much traffic a given machine or group of machines can handle. In this article Rick shows how the tool works and how to properly interpret the performance data it generates&lt;br /&gt;&lt;br /&gt;Introduction&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This article shows how to use the MS WAST ( Microsoft Web Application Stress Tool ) to perform stress and performance tests of Web Services.&lt;br /&gt;&lt;br /&gt;This paper was thought for developers working with Web Services using SOAP. Some of the steps used in this article are directed towards the eSoap Toolkit , but the majority of the themis generic and could be used with any other toolkit.&lt;br /&gt;&lt;br /&gt;In this article we present only the initial setup. For full understanding of WAST, we strongly recommend you to read its documentation, specially the Tutorial, and try using it for "tuning" your Web Service.&lt;br /&gt;Step by Step Procedure&lt;br /&gt;&lt;br /&gt;The most basic pre-condition to use this tool is getting familiar with it. It is very simple, and we recommend going to Microsoft site, and reading the tutorial for while.&lt;br /&gt;&lt;br /&gt;1. Create a "New Script"&lt;br /&gt;2. Specify the destination server&lt;br /&gt;&lt;/span&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style=";font-size:100%;color:black;"  &gt;&lt;span style="color:black;"&gt;&lt;br /&gt;&lt;img src="http://mail.google.com/mail/?ui=2&amp;amp;ik=eed829a792&amp;amp;attid=0.1&amp;amp;disp=emb&amp;amp;view=att&amp;amp;th=1167a596b28076f3" border="0" height="411" width="600" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;    3. Add a POST verb, specifying the actual "URI path" for the Web Service. You get this from the WSDL file. For eSoap we use: /rpcrouter&lt;br /&gt;&lt;br /&gt;Please double click on the 'button' just to the left of the verb to "edit the verb".&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style=";font-size:100%;color:black;"  &gt;&lt;span style="color:black;"&gt;&lt;br /&gt;&lt;img src="http://mail.google.com/mail/?ui=2&amp;amp;ik=eed829a792&amp;amp;attid=0.2&amp;amp;disp=emb&amp;amp;view=att&amp;amp;th=1167a596b28076f3" border="0" height="411" width="600" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;   4. Edit the Verb&lt;br /&gt;&lt;br /&gt;The step above brings up a tabbed selection window where you enter the settings.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style=";font-size:100%;color:black;"  &gt;&lt;span style="color:black;"&gt;&lt;br /&gt;&lt;img src="http://mail.google.com/mail/?ui=2&amp;amp;ik=eed829a792&amp;amp;attid=0.3&amp;amp;disp=emb&amp;amp;view=att&amp;amp;th=1167a596b28076f3" border="0" height="411" width="600" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;     5. In the QueryString tab, uncheck 'Format data to CGI standard' (see above).&lt;br /&gt;6. In the Post data tab, set the choice to Text and enter your SOAP Envelope (XML message).&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style=";font-size:100%;color:black;"  &gt;&lt;span style="color:black;"&gt;&lt;br /&gt;&lt;img src="http://mail.google.com/mail/?ui=2&amp;amp;ik=eed829a792&amp;amp;attid=0.4&amp;amp;disp=emb&amp;amp;view=att&amp;amp;th=1167a596b28076f3" border="0" height="447" width="600" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;NOTE: eSoap Specific: With eSoap it is easy to get "Envelope" data using a tool like proxyTrace developed by Simon Fell. From proxyTrace you could get the content of the "Request Envelope" and all necessary "HTTP Headers" that might be needed on the next step.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style=";font-size:100%;color:black;"  &gt;&lt;span style="color:black;"&gt;&lt;br /&gt;&lt;img src="http://mail.google.com/mail/?ui=2&amp;amp;ik=eed829a792&amp;amp;attid=0.5&amp;amp;disp=emb&amp;amp;view=att&amp;amp;th=1167a596b28076f3" border="0" height="411" width="600" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;Using "proxyTrace" with eSoap is very easy. Basically you have to setup the environment variable "HTTP_PROXY=http://localhost:8081" to the location where the proxy is running. This environment variable should be active on the context of each client process written using eSoap run-time. In this case, you started the "proxy" the local machine listening on port number 8081.&lt;br /&gt;&lt;br /&gt;7. In the Header tab, set the HTTP header settings that are important for SOAP (for eSoap they are ):&lt;br /&gt;&lt;br /&gt;·Content-Type       to: the_number_bytes_of_envelope&lt;br /&gt;·Content-Length     to: text/xml; charset="UTF-8"&lt;br /&gt;·SoapAction         to: the_soap_action_goes_here&lt;br /&gt;&lt;br /&gt;Example for eSoap:&lt;br /&gt;Content-Type:   text/xml; charset="utf-8"&lt;br /&gt;Content-Length: 526&lt;br /&gt;SOAPAction:     "some:action"&lt;/span&gt;&lt;/p&gt;&lt;span style=";font-family:Verdana;font-size:100%;color:black;"   &gt;&lt;span style="color:black;"&gt;&lt;br /&gt;&lt;img src="http://mail.google.com/mail/?ui=2&amp;amp;ik=eed829a792&amp;amp;attid=0.6&amp;amp;disp=emb&amp;amp;view=att&amp;amp;th=1167a596b28076f3" border="0" height="411" width="600" /&gt;&lt;br /&gt;&lt;br /&gt;NOTE: "Content-Length" is automatically filled in, if you leave the value "blank". Erase the "automatic" option.&lt;br /&gt;&lt;br /&gt;8. Close the edit dialog and run the script.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style=";font-size:100%;color:black;"  &gt;&lt;span style="color:black;"&gt;&lt;br /&gt;&lt;img src="http://mail.google.com/mail/?ui=2&amp;amp;ik=eed829a792&amp;amp;attid=0.7&amp;amp;disp=emb&amp;amp;view=att&amp;amp;th=1167a596b28076f3" border="0" height="411" width="600" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:Verdana;font-size:100%;color:black;"   &gt;&lt;span style="color:black;"&gt;     9. Selecting Test duration and concurrent connections (threads)&lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style=";font-size:100%;color:black;"  &gt;&lt;span style="color:black;"&gt;&lt;img src="http://mail.google.com/mail/?ui=2&amp;amp;ik=eed829a792&amp;amp;attid=0.8&amp;amp;disp=emb&amp;amp;view=att&amp;amp;th=1167a596b28076f3" border="0" height="411" width="600" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;By just reading the article anyone can easily learn how to use this tool. I hope we will be able to get some use of this tool if used one some of our products like ESB or WSAS.&lt;br /&gt;&lt;br /&gt;These information was taken from the article http://www.connecttel.com/index.php?link=_MS_Wast_N_eSOAP.html&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/59077094557892-2627561446693644180?l=evanthika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evanthika.blogspot.com/feeds/2627561446693644180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=59077094557892&amp;postID=2627561446693644180' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/2627561446693644180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/59077094557892/posts/default/2627561446693644180'/><link rel='alternate' type='text/html' href='http://evanthika.blogspot.com/2007/11/load-testing-web-applications-using.html' title='Load Testing Web Applications using Microsoft’s Web Application Stress Tool'/><author><name>Evan</name><uri>http://www.blogger.com/profile/02913709559298376105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://1.bp.blogspot.com/-sD4aCnb6nvg/TtOjhzwYHlI/AAAAAAAAAEA/dw8ot_AuZgU/s220/311056_10150432748756802_531181801_10378924_825335940_n.jpg'/></author><thr:total>1</thr:total></entry></feed>
