tag:blogger.com,1999:blog-86254043362926821182024-03-05T01:56:26.544-08:00My TracesThis blog is going to reveal few traces that i touched.....Rekahttp://www.blogger.com/profile/11571708478901798978noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-8625404336292682118.post-6702361381625016792014-02-27T21:49:00.003-08:002014-02-27T21:53:05.099-08:00WSO2 con 2014 Asia is coming soon in March.....<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: center;">
WSO2 con - 2014 in Colombo, Asia</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDSRPxK2d9Ep2pgQQWhVrVAMp0h1MQ5o9XiMuVL-0NlkppxpCHv-4P1QonlEVx7eFyHDjg5jA2dr-YUbogdt5ESEMhO2ppOE9yoz_3N2wRaWFra8I2vND4xQ8gjFHJNbs-eQfl0Yv44G2G/s1600/wso2con-asia-2014-home-logo.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDSRPxK2d9Ep2pgQQWhVrVAMp0h1MQ5o9XiMuVL-0NlkppxpCHv-4P1QonlEVx7eFyHDjg5jA2dr-YUbogdt5ESEMhO2ppOE9yoz_3N2wRaWFra8I2vND4xQ8gjFHJNbs-eQfl0Yv44G2G/s1600/wso2con-asia-2014-home-logo.jpg" height="111" width="400" /></a></div>
<div>
<br /></div>
<div style="text-align: center;">
<br /></div>
WSO2 brings 2014 conference back in Colombo, SriLanka . It will be
a great opportunity to learn technology insights in SOA(Service
Oriented Architecture) and to build connected business with the
world. Within a short time, you will get a chance to exposure on a
complete middleware stack including governance, big data, enterprise
integration, API-centric enterprise integration, Real time
analistics, Security and Cloud. Attending to the con will definitely sharpen your tech background with these varienty of things in SOA.<br />
<br />
Are you interested in get to know about how to build a light
weight PaaS with essential elements in placed? Here is the talk for
that “Essential Elements of an Enterprise PaaS” by Lakmal. In this session, Lakmal will talk about the essential elements of
an Enterprise PaaS and how Apache Stratos (incubating) is delivering
on these aspects. You will get to know about
a rapidly development Apache project and it would be a entry point
for you to <b>contribute to a Apache project</b>. Please visit Apache Stratos <a href="http://stratos.incubator.apache.org/">official-site</a> to get more information in order to be part of the conversations and
contribution. If you wish contributing to Apache Stratos, don't miss
the chance of attending to WSO2 2014 Asia conference in March.<br />
<br />
<h3 style="text-align: left;">
Apache Stratos as PaaS framework</h3>
It is light weight messaging based PaaS framework helps you to
quickly develop, deploy and run your new applications. You put your
things on top of Stratos and continue to use it without worrying much
about the availability of your application all the time. Stratos
will take care of the resources by monitoring and provision enough
resources in your peek time and manage them in a cost effective
manner. This will include scaling and fail-over handling to your
applications. The health monitoring behind Apache Stratos will take
the decision in the real time and passing it to the relevant
functional point.<br />
<br />
The key features are delivering in Apache Stratos:<br />
<br />
* Support for several IaaS such as EC2, openstack, vcloud and
etc(in future)<br />
* Support for any kind of application<br />
* Support for data persistent<br />
* Horizontal scaling, high availability and span across geographical regions
<br />
* Multitenancy support<br />
* Monitoring and Billing for the applications<br />
<br />
<br />
In order to work with Apache Stratos,<br />
* Follow us in <a href="http://stratos.incubator.apache.org/community/mailing-lists.html">mailing-lists</a> or in the <a href="http://stratos.incubator.apache.org/">official-site</a> to get the
right guide. So that you will get to install your own PaaS in a very
short time.<br />
<br />
For more information see WSO2Con Asia 2014 <a href="https://asia14.wso2con.com/agenda/">official website</a>.</div>
Rekahttp://www.blogger.com/profile/11571708478901798978noreply@blogger.com0tag:blogger.com,1999:blog-8625404336292682118.post-9830891699827209162013-12-19T00:42:00.001-08:002013-12-19T02:48:51.348-08:00PayloadFactory Vs Enrich Mediator in WSO2 ESB<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<br /></div>
<div style="text-align: center;">
<br /></div>
When you need to customize the payload of request or a response in WSO2 ESB, then here is the way to go. You can use PayloadFactory mediator to replace the payload with the different payload or you can use enrich mediator to modify the existing payload.<br />
<br />
<div style="text-align: left;">
</div>
<ul style="text-align: left;">
<li>The following steps will explain how can a payload be replaced with a different payload using PayloadFactory mediator:</li>
</ul>
<br />
<br />
<span style="color: #674ea7;"><property name="id" expression="//id" scope="default" type="STRING"/></span><br />
<span style="color: #674ea7;"><property name="name" expression="//name" scope="default" type="STRING"/></span><br />
<span style="color: #674ea7;"><br /></span>
<span style="color: #674ea7;"><payloadFactory media-type="xml"></span><br />
<span style="color: #674ea7;"> <format></span><br />
<span style="color: #674ea7;"> <m:response xmlns:m="http://services.samples"></span><br />
<span style="color: #674ea7;"> <m:customer></span><br />
<span style="color: #674ea7;"> <m:id>$1</m:id></span><br />
<span style="color: #674ea7;"> <m:name>$2</m:name></span><br />
<span style="color: #674ea7;"> </m:customer></span><br />
<span style="color: #674ea7;"> </m:response></span><br />
<span style="color: #674ea7;"> </format></span><br />
<span style="color: #674ea7;"> <args></span><br />
<span style="color: #674ea7;"> <arg evaluator="xml" expression="$ctx:id"/></span><br />
<span style="color: #674ea7;"> <arg evaluator="xml" expression="$ctx:name"/></span><br />
<span style="color: #674ea7;"> </args></span><br />
<span style="color: #674ea7;"> </payloadFactory></span><br />
<br />
Where in the argument, the id and name are set using the message context. From the request or response, these id and name can be parsed through the xpath and set it as a property as above.<br />
<br />
<br />
<ul style="text-align: left;">
<li>The following steps will explain how can a payload be replaced with a different payload using Enrich mediator:</li>
</ul>
<br />
<br />
<span style="color: #674ea7;"><property name="id" expression="//id" scope="default" type="STRING"/></span><br />
<span style="color: #674ea7;"><property name="name" expression="//name" scope="default" type="STRING"/></span><br />
<span style="color: #674ea7;"><br /></span>
<span style="color: #674ea7;"><enrich></span><br />
<span style="color: #674ea7;"> <source type="inline"></span><br />
<span style="color: #674ea7;"> <response ></span><br />
<span style="color: #674ea7;"> <customer></span><br />
<span style="color: #674ea7;"> <id>xxx</id></span><br />
<span style="color: #674ea7;"> <name>xxxx</name></span><br />
<span style="color: #674ea7;"> </customer></span><br />
<span style="color: #674ea7;"> </response></span><br />
<span style="color: #674ea7;"> </source></span><br />
<span style="color: #674ea7;"> <target type="body"/></span><br />
<span style="color: #674ea7;"> </enrich></span><br />
<span style="color: #674ea7;"><enrich></span><br />
<span style="color: #674ea7;"> <source type="property" clone="true" property="id"/></span><br />
<span style="color: #674ea7;"> <target xpath="//s:response/s:customer/s:id" xmlns:s="http://ws.apache.org/ns/synapse"/></span><br />
<span style="color: #674ea7;"></enrich></span><br />
<span style="color: #674ea7;"> <enrich></span><br />
<span style="color: #674ea7;"> <source type="property" clone="true" property="message"/></span><br />
<span style="color: #674ea7;"> <target xpath="//s:response/s:customer/s:name" xmlns:s="http://ws.apache.org/ns/synapse"/></span><br />
<span style="color: #674ea7;"></enrich></span><br />
<br />
In this case, the first enrich will replace the body with the specified payload. Then the second and third enrich will replace the values of the element in the body using the available property.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
Rekahttp://www.blogger.com/profile/11571708478901798978noreply@blogger.com0tag:blogger.com,1999:blog-8625404336292682118.post-69889990714507381792013-02-18T03:48:00.001-08:002013-02-18T03:50:53.415-08:00Worker-Manager separation with two ELB's<div dir="ltr" style="text-align: left;" trbidi="on">
The latest release of WSO2 products which were based on carbon 4.0.0 supports worker-manger separation. In this post, you can find out how to configure worker-manager with two ELB's with single cluster and how it can be extended to another deployment. This patterns is clearly explained in <span style="color: #0000ee;"><u>Afkham Azeez's</u></span> blog.<br />
<b style="font-size: large;"><br /></b>
<b style="font-size: large;">Worker-Manager clustering with two ELB's and one
worker/manager cluster</b><br />
<div style="margin-bottom: 0in;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWu4YrEYnSCzhCXIux9HnI4Rr8zEgL8XXhj6gdEMIDUVK2ghbXjEOGwAGsyktgJmPAVnaEjt5cx7TcUe643IBuqi5EU_s0TwkUiwUgssIJ-rtHklfZsj9jErbuanRohVj8T3jSK2_yhJJf/s1600/Untitled+drawing.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="237" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWu4YrEYnSCzhCXIux9HnI4Rr8zEgL8XXhj6gdEMIDUVK2ghbXjEOGwAGsyktgJmPAVnaEjt5cx7TcUe643IBuqi5EU_s0TwkUiwUgssIJ-rtHklfZsj9jErbuanRohVj8T3jSK2_yhJJf/s320/Untitled+drawing.jpg" width="320" /></a></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
I have configured every instance in
different machine. The configuration can be found as following:</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="font-size: medium;"><b>ELB-mgt</b></span></div>
<div style="margin-bottom: 0in;">
=========</div>
<div style="margin-bottom: 0in;">
<span style="background: #00dcff;">repository/conf/loadbalancer.conf</span></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">esb {</span></div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;"> hosts
mgt.esb.cloud-test.wso2.com; </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;"> domains { </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
wso2.esb.domain { </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
sub_domain worker; </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
tenant_range *; </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;"> } </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;"> } </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;"> } </span>
</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="background: #00dcff;">repository/conf/carbon.xml</span></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
<MgtHostName>elb.mgt.wso2.com</MgtHostName> </span>
</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
Then you have to have the relevant
entry in the /etc/hosts for elb.mgt.wso2.com.
</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="font-size: medium;"><b>ELB-worker</b></span></div>
<div style="margin-bottom: 0in;">
===========</div>
<div style="margin-bottom: 0in;">
<span style="background: #00dcff;">repository/conf/loadbalancer.conf</span></div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">esb { </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;"> hosts
esb.cloud-test.wso2.com; </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;"> domains
{ </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
wso2.esb.domain { </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
sub_domain worker; </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
tenant_range *; </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;"> } </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;"> } </span></div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">} </span>
</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="background: #00dcff;">repository/conf/carbon.xml</span></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
<MgtHostName>elb.worker.wso2.com</MgtHostName> </span>
</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
Then you have to have the relevant
entry in the /etc/hosts for elb.worker.wso2.com.
</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
I have assumed here that port offset of
both ELB's are kept as default and they are running in different
machine. Default ELB's transport port https:8243, http:8280</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="font-size: medium;"><b>Worker-cluster</b></span></div>
<div style="margin-bottom: 0in;">
==============</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
All worker nodes can be configured as
in
(<a href="http://docs.wso2.org/wiki/display/ELB203/Setup+ELB+with+WSO2+ESB">http://docs.wso2.org/wiki/display/ELB203/Setup+ELB+with+WSO2+ESB</a>)
for clustering and proxy set up. Also, add the relevant entries to
/etc/hosts</div>
<div style="margin-bottom: 0in;">
in addition to the configuration, you
will have to add the following to all worker node as like management
node (can find the place in documentation).</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="background: #00dcff;">repository/conf/axis2/axis2.xml</span></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<code class="western"><span style="color: #355e00;"><span style="font-family: Liberation Serif, serif;"><property</span></span></code><span style="color: #355e00;"><span style="font-family: Liberation Serif, serif;">
</span></span><code class="western"><span style="color: #355e00;"><span style="font-family: Liberation Serif, serif;">name="port.mapping.8280"</span></span></code><span style="color: #355e00;"><span style="font-family: Liberation Serif, serif;">
</span></span><code class="western"><span style="color: #355e00;"><span style="font-family: Liberation Serif, serif;">value="9764"/></span></span></code></div>
<div style="margin-bottom: 0in;">
<code class="western"><span style="color: #355e00;"><span style="font-family: Liberation Serif, serif;"><property</span></span></code><span style="color: #355e00;"><span style="font-family: Liberation Serif, serif;">
</span></span><code class="western"><span style="color: #355e00;"><span style="font-family: Liberation Serif, serif;">name="port.mapping.8243"</span></span></code><span style="color: #355e00;"><span style="font-family: Liberation Serif, serif;">
</span></span><code class="western"><span style="color: #355e00;"><span style="font-family: Liberation Serif, serif;">value="9444"/></span></span></code></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<code class="western"><span style="color: black;"><span style="font-family: Liberation Serif, serif;">9764,
9444 can be veried according to your port offset of servlet
transport. 8280, 8283 are ELB's transport. If two ELB for one
cluster, then both should be kept in the same transport port.</span></span></code></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="font-size: medium;"><b>Special node which will
be manager and worker</b></span></div>
<div style="margin-bottom: 0in;">
==========================================</div>
<div style="margin-bottom: 0in;">
Have to configure <span style="color: maroon;">like
above worker node</span> cluster and in addition to that need to add
</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="background: #00dcff;">repository/conf/carbon.xml</span></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<code class="western"><span style="color: #355e00;"><span style="font-family: Liberation Serif, serif;"><MgtHostName>mgt.esb.cloud-test.wso2.com</MgtHostName>
</span></span></code>
</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="background: #00dcff;">repository/conf/axis2/axis2.xml</span></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
Instead of one member, need to add two
ELB as well known memebers.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;"><members> </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
<member> </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
<hostName></span><code class="western"><span style="color: #355e00;"><span style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace;"><span style="font-size: x-small;">elb.mgt.wso2.com</span></span></span></code><span style="color: #355e00;"></hostName>
</span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
<port>4000</port> </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
</member> </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
<member> </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
<hostName></span><code class="western"><span style="color: #355e00;"><span style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace;"><span style="font-size: x-small;">elb.worker.wso2.com</span></span></span></code><span style="color: #355e00;"></hostName>
</span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
<port>4000</port> </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
</member> </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;"></members></span></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="background: #00dcff;">repository/conf/axis2.xml.</span></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<code class="western"><span style="color: #355e00;"><span style="font-family: Liberation Serif, serif;"><parameter
name="WSDLEPRPrefix"
locked="false">http://esb.cloudtest.wso2.com:8280</parameter></span></span></code></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<code class="western"><span style="font-family: Liberation Serif, serif;"><span style="font-size: small;"><b><span style="background: #00ae00;">/etc/hosts
of special node should include</span></b></span></span></code></div>
<div style="margin-bottom: 0in;">
<code class="western"><span style="color: black;"><span style="font-family: Liberation Serif, serif;"><span style="font-size: small;"><span style="background: #ffffff;">.</span></span></span></span></code></div>
<div style="margin-bottom: 0in;">
<code class="western"><span style="color: black;"><span style="font-family: Liberation Serif, serif;"><span style="font-size: small;"><span style="background: #ffffff;"><ip
of ELB worker> esb.cloud-test.wso2.com <br /><ip of ELB managee>
mgt.esb.cloud-test.wso2.com <br /><ip of ELB worker>
elb.worker.wso2.com <br /><ip of ELB manager> elb.mgt.wso2.com </span></span></span></span></code>
</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="font-size: medium;"><b>Single cluster with one
ELB where one node worker/manager and accessible directly</b></span></div>
<div style="margin-bottom: 0in;">
==================================================================</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7XnJJqDUiROjLa0FWFA6NImnTOecAO7PBsh98Ip_NUwX1dFyB6tl_aj-oX8_jMl3WYRvEr4GgjuyOdb8pks5M-IYQpiV3moIQbG_aii8l5qCimJIXujP8bvBaKR9p8XaaNUeioPhPdBEc/s1600/Untitled+drawing.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="232" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7XnJJqDUiROjLa0FWFA6NImnTOecAO7PBsh98Ip_NUwX1dFyB6tl_aj-oX8_jMl3WYRvEr4GgjuyOdb8pks5M-IYQpiV3moIQbG_aii8l5qCimJIXujP8bvBaKR9p8XaaNUeioPhPdBEc/s320/Untitled+drawing.png" width="320" /></a></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
All workers need to configure as stated
in the documentation.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<b>Special Node :</b></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
As stated in the above setup for
special node, you will have to follow up,</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
adding only one member as a well known
member as following:</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;"><members></span></div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
<member> </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
<hostName></span><code class="western"><span style="color: #355e00;"><span style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace;"><span style="font-size: x-small;">elb.worker.wso2.com</span></span></span></code><span style="color: #355e00;"></hostName>
</span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
<port>4000</port> </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;">
</member> </span>
</div>
<div style="margin-bottom: 0in;">
<span style="color: #355e00;"> </members></span></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
removing the <span style="color: #355e00;">proxy
port</span> in repository/conf/tomcat/catalina-server.xml and keep
other configurations as it is.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
All the other configuration should be
kept as previous setup manager node. Now you can eliminate the
manager ELB and work on this setup accessing management console
directly via <span style="color: purple;">https://mgt.esb.cloud-test.wso2:9444</span>
(servlet transport port) and worker requests can be served via
<span style="color: purple;">https://esb.cloud-test.wso2:8243</span> via
ELB.
</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
Also, add the /etc/hosts as similar as
above setup to the special node machine.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
References</div>
<div style="margin-bottom: 0in;">
========</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
1. http://blog.afkham.org/2012/08/separation-of-worker-management-nodes.html</div>
<div style="margin-bottom: 0in;">
2. http://charithaka.blogspot.com/2012/09/setting-up-minimum-deployment-of-wso2.html</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
</div>
Rekahttp://www.blogger.com/profile/11571708478901798978noreply@blogger.com0tag:blogger.com,1999:blog-8625404336292682118.post-63063735652585954882012-12-02T20:53:00.000-08:002012-12-02T20:53:01.421-08:00<div dir="ltr" style="text-align: left;" trbidi="on">
Encoding and Decoding<br />
=================<br />
<br />
You can use encoding in order to render a specific language properly in any browser. When you support encoding from your front end, you need to make sure that you adhere to the following in order to avoid upcoming future issues.<br />
<br />
1. OS (windows, ubuntu and etc)<br />
2. Browser<br />
3. Code (whole flow from JSP to the back end)<br />
<br />
1. OS<br />
<br />
Different OS supports different encoding type as default. For example windows 7 supports cp1252 which is a western char set and ubuntu supports UTF-8 which unicode char set. If we take java, jvm by default pick up the char set from the OS. But you can change the char set to jvm by adding an environmental variable in windows for example to support UTF-8 in windows:<br />
<br />
JAVA_TOOL_OPTIONS<br />
Variable value : - -Dfile.encoding=UTF-8<br />
<br />
FYI:- Windows XP and previous versions supports unicode. So that you don't need to add this. But after windows 7 only, you may need to add this only if the default char set is different from UTF-8.<br />
<br />
The reason why i'm taken UTF-8 is most of the time we support in our code UTF-8 as it is unicode. So making whole flow into unique charset is important when it comes to encoding and decoding.<br />
<br />
2. Browser<br />
<br />
To view a particular language, you may have to switch to correct encoding from the browser. Browser precedence when choosing right encoding is from:<br />
<br />
* The encoding send by the server (in JSP eg: encoding specified in meta tag)<br />
* User preference from the broswer<br />
<br />
Since we include UTF-8 or some other encoding in JSP's, browser tends to choose them as the encoding every time a page getting loaded. In order to to choose different encoding from JSP's meta tag, we will have to choose it in every page reloads which is a pain for a user. So that we have to support such different encoding from JSP itself. Then only users can go ahead without facing any problem.<br />
<br />
3. Code (whole flow from JSP to the back end)<br />
<br />
Every where encoding and decoding should be taken as the correct charset. So in order to make sure, we might have to develop the back end supporting correct encoding and decoding. For an example:<br />
Encoding in JSP's<br />
Encoding to query parameters<br />
Encoding to DB input values<br />
<br />
Like wise, you will have to check each and every area where encoding decoding is handled in order to avoid loosing details by following wrong encoding type in the middle.<br />
<br />
This post is to just to give an idea about encoding and it's issues so that we can think better to support internationalization of a developing web site.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<span style="display: block; padding-left: 6em;"><br /></span><span style="display: block; padding-left: 6em;"><br /></span></div>
Rekahttp://www.blogger.com/profile/11571708478901798978noreply@blogger.com0tag:blogger.com,1999:blog-8625404336292682118.post-81308147091826048802012-11-01T22:46:00.000-07:002012-11-01T22:46:40.516-07:00URL-Mapping on Stratos<div dir="ltr" style="text-align: left;" trbidi="on">
Configure URL-mapping on Stratos<br />
=========================<br />
<br />
<span id="internal-source-marker_0.10376822252020823" style="font-family: Arial; font-size: 15px; vertical-align: baseline;">ELB setup</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">========</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">CARBON_HOME/repository/conf/loadbalancher.conf</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> * enable cache_size with preferred size</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> * enable url_sufix in each service</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> Eg: </span><br />
<span style="font-family: Arial;"><span style="font-size: 15px;"><br /></span></span><span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">************************************************************************************</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">appserver {</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> hosts appserver.cloud-test.wso2.com;</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> url_suffix as.wso2.com;</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> domains {</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> wso2.as.domain {</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> tenant_range *;</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> }</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> </span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> }</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> }</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> esb {</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> hosts esb.cloud-test.wso2.com;</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> url_suffix esb.wso2.com;</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> domains {</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> wso2.esb.domain {</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> tenant_range *;</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> }</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> }</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> }</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial;"><span style="font-size: 15px;">***************************************************************************************</span></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">as such all the servers which have axis2 services or any services should be defined with unique url_suffix.</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">Worker-manager node</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">================</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">appserver {</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> domains {</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> CharithaASdomain {</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> hosts mgt.charitha.appserver.wso2.com;</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> sub_domain mgt;</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> tenant_range *;</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> }</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> CharithaASdomain {</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> hosts charitha.appserver.wso2.com;</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> url_suffix as.wso2.com;</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> sub_domain worker;</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> tenant_range *;</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> }</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> </span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> }</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"> }</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">only worker node needs the url_suffix.</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">AS node setup</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">==========</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">by default url-mapping feature is there</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">So in CARBON_HOME/repository/conf/etc/url-mappings.xml</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">
* replace url-prefix as “localhost” with “as.wso2.com” which is given
in the ELB’s conf as url-suffix for that particular AS node.</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">Worker_manager node (AS)</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">====================</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">Manager node should have the url-suffix defined as in loadbalancher.conf for the worker node.</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">Worker can be as default.</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">ESB node setup</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">===============</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">install url-mapping feature from p2 repo.</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">Then as like AS node setup, change the configuration file with relevant url-suffix from ELB conf.</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">Greg</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">====</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">Need to mount Greg’s governance as shared across all the modes.</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">DNS mapping for a URL-mapping</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">========================</span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;"></span><br />
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline;">Have to get a DNS mapping to that particular URL-mapping.</span><br />
<br />
<br /></div>
Rekahttp://www.blogger.com/profile/11571708478901798978noreply@blogger.com0tag:blogger.com,1999:blog-8625404336292682118.post-54619417205369730902012-09-08T20:49:00.002-07:002012-09-08T20:52:14.790-07:00Context Mapping for Applications and Services in WSO2 AS<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0QEYK9CQFrXOWgBPiiNQ9IvVoELic_ZO5d1JyTGVY210FF3lnPPI5WBuk__0xzn32KFc14u-UpjVNkMWiFTEJKpcNNAwOPDUO9Z0TZ3W_rxcgkoQIUfEgYo2XUCJCiDlhrIMdPle2B4f3/s1600/url.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0QEYK9CQFrXOWgBPiiNQ9IvVoELic_ZO5d1JyTGVY210FF3lnPPI5WBuk__0xzn32KFc14u-UpjVNkMWiFTEJKpcNNAwOPDUO9Z0TZ3W_rxcgkoQIUfEgYo2XUCJCiDlhrIMdPle2B4f3/s1600/url.png" /></a></div>
<br />
<br />
<br />
If
you would like to have your own name for a app that you are
developing and hosting it with us in Apps server, then here is the way to go. The
custom URL will be mapped to the long URL. <br />
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
You can own a unique domain to your
deployed web application in our Apps server. Basically your app can be accessible like <a href="http://example.com/">http://example.wso2.com</a> rather confusing
with a long URL <span style="color: red;"><a href="http://appserver.stratoslive.com/t/tenant.com/webapps/example">http://appserver.stratoslive.com/t/tenant.com/webapps/example</a></span>. Here you can configure the suffix ".wso2.com" through a CARBON_HOME/reposiory/etc/conf/url-mappings.xml file. </div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
The services which hosts in apps server can also be accessible via http://serviceid.wso2.com?wsdl. Also, tryit and rest call could use the same URL.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
The short URL is tenant isolated even though it is not having tenant URL pattern. Also, the webapps which could be accessible through short URL will work with:</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
1.Tenant Lazy loading</div>
<div style="margin-bottom: 0in;">
2.Ghost Deployment of artifacts</div>
<div style="margin-bottom: 0in;">
3.Billing and Metering in Stratos</div>
<div style="margin-bottom: 0in;">
4.Cloud Deployment of AS nodes</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
The configuration of URL mappings will be slight different in case of stand alone products and in stratos. I'll explain the configuration details in my next post.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
</div>
Rekahttp://www.blogger.com/profile/11571708478901798978noreply@blogger.com0