<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dimuthu's Blog</title>
	<atom:link href="http://www.dimuthu.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dimuthu.org</link>
	<description>Waiting for your comments</description>
	<lastBuildDate>Wed, 03 Feb 2010 02:03:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
  <link>http://www.dimuthu.org</link>
  <url>http://www.dimuthu.org/favicon.ico</url>
  <title>Dimuthu's Blog</title>
</image>
		<item>
		<title>Webinar: WSO2 Business Activity Monitor for Agile Enterprises</title>
		<link>http://www.dimuthu.org/blog/2010/02/03/webinar-wso2-business-activity-monitor-for-agile-enterprises/</link>
		<comments>http://www.dimuthu.org/blog/2010/02/03/webinar-wso2-business-activity-monitor-for-agile-enterprises/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 02:03:45 +0000</pubDate>
		<dc:creator>dimuthu</dc:creator>
				<category><![CDATA[BAM]]></category>
		<category><![CDATA[Governance]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[agile enterprsie]]></category>
		<category><![CDATA[buisness activity monitor]]></category>
		<category><![CDATA[report]]></category>
		<category><![CDATA[webinar]]></category>
		<category><![CDATA[wso2]]></category>

		<guid isPermaLink="false">http://www.dimuthu.org/?p=1070</guid>
		<description><![CDATA[Samisa Abeysinghe, the directory of engineering at WSO2 will present a webinar on Building an Agile Enterprise With Business Activity Monitoring today (3rd February 2010).
There he will provide an overview of WSO2 Business Activity Monitor (WSO2 BAM), the latest product from the WSO2 Carbon platform, including its built-in dashboard to view analytics , reports of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://samisa-abeysinghe.blogspot.com">Samisa Abeysinghe</a>, the directory of engineering at WSO2 will present a <a href="http://wso2.org/library/webinars/02-03-2010-webinar-building-agile-enterprise-business-activity-monitoring/?otbdate=22110">webinar on Building an Agile Enterprise With Business Activity Monitoring</a> today (3rd February 2010).</p>
<p>There he will provide an overview of <a href="http://wso2.org/projects/bam">WSO2 Business Activity Monitor (WSO2 BAM)</a>, the latest product from the WSO2 Carbon platform, including its built-in dashboard to view analytics , reports of past and present activities of the enterprise SOA infrastructure and how these information can be used in tactical and strategic decision making.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dimuthu.org/blog/2010/02/03/webinar-wso2-business-activity-monitor-for-agile-enterprises/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Access WSO2 Governance as a Service From Remote Registry</title>
		<link>http://www.dimuthu.org/blog/2010/01/11/access-wso2-governance-as-a-service-from-remote-registry/</link>
		<comments>http://www.dimuthu.org/blog/2010/01/11/access-wso2-governance-as-a-service-from-remote-registry/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 16:36:45 +0000</pubDate>
		<dc:creator>dimuthu</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[GaaS]]></category>
		<category><![CDATA[Governance]]></category>
		<category><![CDATA[Governance Registry]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[wso2]]></category>
		<category><![CDATA[governance as a service]]></category>
		<category><![CDATA[governance registry]]></category>
		<category><![CDATA[remote registry]]></category>

		<guid isPermaLink="false">http://www.dimuthu.org/?p=1065</guid>
		<description><![CDATA[WSO2 Governance as a Service is a hosted instance of WSO2 Governance Registry with multi-tenant support. WSO2 Governance as a Service provide you almost all the functionalities provided with the Governance Registry targeting the enterprise SOA governance, same time it provides all the advantages  inherent with the Software as a Service model.
Here I&#8217;m talking about [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://governance.cloud.wso2.com">WSO2 Governance as a Service</a> is a hosted instance of <a href="http://wso2.org/projects/governance-registry">WSO2 Governance Registry</a> with multi-tenant support. WSO2 Governance as a Service provide you almost all the functionalities provided with the Governance Registry targeting the enterprise SOA governance, same time it provides all the advantages  inherent with the Software as a Service model.</p>
<p>Here I&#8217;m talking about how to use a popular feature available in Governance Registry, inside WSO2 Governance as a Service. i.e. <a href="http://wso2.org/project/registry/3.0.2/docs/developer_guide/remote_registry_client.html">Remote Registry Client</a>. With Remote Registry Client, you can access the resources in registry programatically. It uses atom/pub protocol to communicate with the registry server.</p>
<p>Here is an example of using Remote Registry Client. I assumed I have an account with domain name &#8216;example.com&#8217; with a user name &#8216;example_user&#8217; (&#8216;example_password&#8217;). You have to change this to valid values before running this code, You can create an account in Governance as a Service freely for a limited use.</p>
<pre><span style="color: #a1a100;">import java.net.URL;</span>
<span style="color: #a1a100;">import org.wso2.carbon.registry.core.Registry;</span>
<span style="color: #a1a100;">import org.wso2.carbon.registry.core.Resource;</span>
<span style="color: #a1a100;">import org.wso2.carbon.registry.app.RemoteRegistry;</span>

<span style="color: #000000; font-weight: bold;">class</span> RegistryDemo <span style="color: #66cc66;">{</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #993333;">void</span> main<span style="color: #66cc66;">(</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">[</span><span style="color: #66cc66;">]</span> args<span style="color: #66cc66;">)</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AException+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Exception</span></a> <span style="color: #66cc66;">{</span>

        <span style="color: #808080; font-style: italic;">// calls the registry with the authentication information</span>
        callRemoteRegistry<span style="color: #66cc66;">(</span><span style="color: #ff0000;">"http://governance.cloud.wso2.com/registry"</span>,
                   <span style="color: #ff0000;">"example_username@example.com"</span>, <span style="color: #ff0000;">"example_password"</span><span style="color: #66cc66;">)</span>;
    <span style="color: #66cc66;">}</span>

    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #993333;">void</span> callRemoteRegistry<span style="color: #66cc66;">(</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> url, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> username,
                       <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> password<span style="color: #66cc66;">)</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AException+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Exception</span></a> <span style="color: #66cc66;">{</span>

        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ARegistry+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Registry</span></a> myRegistry = <span style="color: #000000; font-weight: bold;">new</span> RemoteRegistry<span style="color: #66cc66;">(</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AURL+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">URL</span></a><span style="color: #66cc66;">(</span>url<span style="color: #66cc66;">)</span>, username, password<span style="color: #66cc66;">)</span>;
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">(</span>!myRegistry.<span style="color: #006600;">resourceExists</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"/demoResource"</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

            Resource r = myRegistry.<span style="color: #006600;">newResource</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;
            r.<span style="color: #006600;">setContent</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"demo content"</span><span style="color: #66cc66;">)</span>;
            myRegistry.<span style="color: #006600;">put</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"/demoResource"</span>, r<span style="color: #66cc66;">)</span>;
        <span style="color: #66cc66;">}</span>

        Resource r = myRegistry.<span style="color: #006600;">get</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"/demoResource"</span><span style="color: #66cc66;">)</span>;
        <span style="color: #993333;">byte</span><span style="color: #66cc66;">[</span><span style="color: #66cc66;">]</span> contentBytes = <span style="color: #66cc66;">(</span><span style="color: #993333;">byte</span><span style="color: #66cc66;">[</span><span style="color: #66cc66;">]</span><span style="color: #66cc66;">)</span>r.<span style="color: #006600;">getContent</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> content = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">(</span>contentBytes<span style="color: #66cc66;">)</span>;
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"Content: "</span> + content<span style="color: #66cc66;">)</span>;
    <span style="color: #66cc66;">}</span>
<span style="color: #66cc66;">}</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dimuthu.org/blog/2010/01/11/access-wso2-governance-as-a-service-from-remote-registry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make vs Ant</title>
		<link>http://www.dimuthu.org/blog/2010/01/10/make-vs-ant/</link>
		<comments>http://www.dimuthu.org/blog/2010/01/10/make-vs-ant/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 13:06:39 +0000</pubDate>
		<dc:creator>dimuthu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[makefile]]></category>

		<guid isPermaLink="false">http://www.dimuthu.org/?p=1063</guid>
		<description><![CDATA[Ant was developed mainly to run java programs, so it is good at building and running java programs. But you can use the good all Make program to build and even run java programs.
Say I have an ant file that will

Clean the build &#8211; ant clean
Compile &#8211; ant compile
Make a Jar &#8211; ant jar
Run &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Ant was developed mainly to run java programs, so it is good at building and running java programs. But you can use the good all Make program to build and even run java programs.</p>
<p>Say I have an ant file that will</p>
<ol>
<li>Clean the build &#8211; ant clean</li>
<li>Compile &#8211; ant compile</li>
<li>Make a Jar &#8211; ant jar</li>
<li>Run &#8211; ant run or simply ant</li>
</ol>
<p>For this, I will only compile one java file name src/test/HelloWorld.java</p>
<pre><span style="font-weight: bold; color: black;">&lt;project</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"HelloWorld"</span> <span style="color: #000066;">basedir</span>=<span style="color: #ff0000;">"."</span> <span style="color: #000066;">default</span>=<span style="color: #ff0000;">"main"</span><span style="font-weight: bold; color: black;">&gt;</span>

    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"src.dir"</span>     <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"src"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>

    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"build.dir"</span>   <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"build"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"classes.dir"</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"${build.dir}/classes"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>

    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"jar.dir"</span>     <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"${build.dir}/jar"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"main-class"</span>  <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"test.HelloWorld"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>

    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"clean"</span><span style="font-weight: bold; color: black;">&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;delete</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">"${build.dir}"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/target<span style="font-weight: bold; color: black;">&gt;</span></span></span>

    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"compile"</span><span style="font-weight: bold; color: black;">&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mkdir</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">"${classes.dir}"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;javac</span> <span style="color: #000066;">srcdir</span>=<span style="color: #ff0000;">"${src.dir}"</span> <span style="color: #000066;">destdir</span>=<span style="color: #ff0000;">"${classes.dir}"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>

    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/target<span style="font-weight: bold; color: black;">&gt;</span></span></span>

    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"jar"</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">"compile"</span><span style="font-weight: bold; color: black;">&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mkdir</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">"${jar.dir}"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>

        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;jar</span> <span style="color: #000066;">destfile</span>=<span style="color: #ff0000;">"${jar.dir}/${ant.project.name}.jar"</span> <span style="color: #000066;">basedir</span>=<span style="color: #ff0000;">"${classes.dir}"</span><span style="font-weight: bold; color: black;">&gt;</span></span>
            <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;manifest<span style="font-weight: bold; color: black;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;attribute</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"Main-Class"</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"${main-class}"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>

            <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/manifest<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/jar<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/target<span style="font-weight: bold; color: black;">&gt;</span></span></span>

    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"run"</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">"jar"</span><span style="font-weight: bold; color: black;">&gt;</span></span>

        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;java</span> <span style="color: #000066;">jar</span>=<span style="color: #ff0000;">"${jar.dir}/${ant.project.name}.jar"</span> <span style="color: #000066;">fork</span>=<span style="color: #ff0000;">"true"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/target<span style="font-weight: bold; color: black;">&gt;</span></span></span>

    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"clean-build"</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">"clean,jar"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>

    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"main"</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">"clean,run"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>

<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/project<span style="font-weight: bold; color: black;">&gt;</span>
</span></span></pre>
<p>If you want to learn what each line of this means, just follow the excellent ant tutorial at <a href="http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html">http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html</a>.</p>
<p>Here is the Makefile that will do the above tasks,</p>
<pre><span style="color: #007800;">SRC_DIR=</span>src
<span style="color: #007800;">BUILD_DIR=</span>build
<span style="color: #007800;">CLASSES_DIR=</span>$<span style="color: #7a0874; font-weight: bold;">(</span>BUILD_DIR<span style="color: #7a0874; font-weight: bold;">)</span>/classes
<span style="color: #007800;">JAR_DIR=</span>$<span style="color: #7a0874; font-weight: bold;">(</span>BUILD_DIR<span style="color: #7a0874; font-weight: bold;">)</span>/jar

<span style="color: #007800;">PROJECT=</span>HelloWorld
<span style="color: #007800;">MAIN_CLASS=</span>test.HelloWorld
<span style="color: #007800;">PACKAGE=</span>test
 
run: clean jar
        java -jar $<span style="color: #7a0874; font-weight: bold;">(</span>JAR_DIR<span style="color: #7a0874; font-weight: bold;">)</span>/$<span style="color: #7a0874; font-weight: bold;">(</span>PROJECT<span style="color: #7a0874; font-weight: bold;">)</span>.jar
 

jar: $<span style="color: #7a0874; font-weight: bold;">(</span>JAR_DIR<span style="color: #7a0874; font-weight: bold;">)</span>/$<span style="color: #7a0874; font-weight: bold;">(</span>PROJECT<span style="color: #7a0874; font-weight: bold;">)</span>.jar
 
$<span style="color: #7a0874; font-weight: bold;">(</span>JAR_DIR<span style="color: #7a0874; font-weight: bold;">)</span>/$<span style="color: #7a0874; font-weight: bold;">(</span>PROJECT<span style="color: #7a0874; font-weight: bold;">)</span>.jar: $<span style="color: #7a0874; font-weight: bold;">(</span>CLASSES_DIR<span style="color: #7a0874; font-weight: bold;">)</span>/$<span style="color: #7a0874; font-weight: bold;">(</span>PACKAGE<span style="color: #7a0874; font-weight: bold;">)</span>/*.class
        <span style="color: #7a0874; font-weight: bold;">echo</span> Main-Class: $<span style="color: #7a0874; font-weight: bold;">(</span>MAIN_CLASS<span style="color: #7a0874; font-weight: bold;">)</span>&gt; mf
        <span style="color: #7a0874; font-weight: bold;">test</span> -d $<span style="color: #7a0874; font-weight: bold;">(</span>JAR_DIR<span style="color: #7a0874; font-weight: bold;">)</span> | <span style="color: #c20cb9; font-weight: bold;">mkdir</span> -p $<span style="color: #7a0874; font-weight: bold;">(</span>JAR_DIR<span style="color: #7a0874; font-weight: bold;">)</span>

        jar cfm $@ mf -C $<span style="color: #7a0874; font-weight: bold;">(</span>CLASSES_DIR<span style="color: #7a0874; font-weight: bold;">)</span> .
 
compile: $<span style="color: #7a0874; font-weight: bold;">(</span>CLASSES_DIR<span style="color: #7a0874; font-weight: bold;">)</span>/$<span style="color: #7a0874; font-weight: bold;">(</span>PACKAGE<span style="color: #7a0874; font-weight: bold;">)</span>/*.class

 
$<span style="color: #7a0874; font-weight: bold;">(</span>CLASSES_DIR<span style="color: #7a0874; font-weight: bold;">)</span>/$<span style="color: #7a0874; font-weight: bold;">(</span>PACKAGE<span style="color: #7a0874; font-weight: bold;">)</span>/%.class: <span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">{</span>SRC_DIR<span style="color: #7a0874; font-weight: bold;">}</span></span>/$<span style="color: #7a0874; font-weight: bold;">(</span>PACKAGE<span style="color: #7a0874; font-weight: bold;">)</span>/*.java
        <span style="color: #7a0874; font-weight: bold;">test</span> -d $<span style="color: #7a0874; font-weight: bold;">(</span>CLASSES_DIR<span style="color: #7a0874; font-weight: bold;">)</span> | <span style="color: #c20cb9; font-weight: bold;">mkdir</span> -p $<span style="color: #7a0874; font-weight: bold;">(</span>CLASSES_DIR<span style="color: #7a0874; font-weight: bold;">)</span>

        javac -sourcepath src -d <span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">{</span>CLASSES_DIR<span style="color: #7a0874; font-weight: bold;">}</span></span> $&lt;
 
clean:
        <span style="color: #c20cb9; font-weight: bold;">rm</span> -rf build mf
</pre>
<p>You may notice I had to provide the package name to the compile command, as it doesn&#8217;t have a proper wildcards to represent the jar. Similar to ant all these make tasks will execute only if it is required. i.e. for an example if all the .class files are up to date with .java it will not try to recompile it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dimuthu.org/blog/2010/01/10/make-vs-ant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WSF/PHP Code First Approach: Returning an Array of String</title>
		<link>http://www.dimuthu.org/blog/2010/01/08/wsfphp-code-first-approach-returning-an-array-of-string/</link>
		<comments>http://www.dimuthu.org/blog/2010/01/08/wsfphp-code-first-approach-returning-an-array-of-string/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 02:05:12 +0000</pubDate>
		<dc:creator>dimuthu</dc:creator>
				<category><![CDATA[SOA]]></category>
		<category><![CDATA[Tutorial/Guide]]></category>
		<category><![CDATA[WSDL]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wsf/php]]></category>
		<category><![CDATA[wso2]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xml schema]]></category>
		<category><![CDATA[code first]]></category>
		<category><![CDATA[wsdl generation]]></category>

		<guid isPermaLink="false">http://www.dimuthu.org/?p=1060</guid>
		<description><![CDATA[Here is a problem that many people have asked me how to do it. &#8220;Returning an array of string&#8221; with the code first approach. The API or WSDL generation annotation guide, http://wso2.org/project/wsf/php/2.0.0/docs/wsdl_generation_api.html contain all the things required in details. Here is an example of a service that return an array of string.
&#60;?php

/** splitMe function
 * [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a problem that many people have asked me how to do it. &#8220;Returning an array of string&#8221; with the code first approach. The API or WSDL generation annotation guide, <a href="http://wso2.org/project/wsf/php/2.0.0/docs/wsdl_generation_api.html">http://wso2.org/project/wsf/php/2.0.0/docs/wsdl_generation_api.html</a> contain all the things required in details. Here is an example of a service that return an array of string.</p>
<pre><span style="color: #000000; font-weight: bold;">&lt;?php</span>

<span style="color: #808080; font-style: italic;">/** splitMe function
 * @param string $string_to_split string to split
 * (maps to the xs:string XML schema type )
 * @return array of string $result split to array
 *(maps to the xs:double XML schema type )
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> splitMe<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$string_to_split</span><span style="color: #66cc66;">)</span>
<span style="color: #66cc66;">{</span>
    <span style="color: #b1b100;">return</span> <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"result"</span> =&gt; <a href="http://www.php.net/split"><span style="color: #000066;">split</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">":"</span>, <span style="color: #0000ff;">$string_to_split</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;

<span style="color: #66cc66;">}</span>

<span style="color: #0000ff;">$operations</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"splitMe"</span>=&gt;<span style="color: #ff0000;">"splitMe"</span><span style="color: #66cc66;">)</span>;
<span style="color: #0000ff;">$opParams</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"splitMe"</span>=&gt;<span style="color: #ff0000;">"MIXED"</span><span style="color: #66cc66;">)</span>;

<span style="color: #0000ff;">$svr</span> = <span style="color: #000000; font-weight: bold;">new</span> WSService<span style="color: #66cc66;">(</span><a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"operations"</span>=&gt;<span style="color: #0000ff;">$operations</span>,
                           <span style="color: #ff0000;">"bindingStyle"</span>=&gt;<span style="color: #ff0000;">"doclit"</span>,
                           <span style="color: #ff0000;">"opParams"</span>=&gt;<span style="color: #0000ff;">$opParams</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;

<span style="color: #0000ff;">$svr</span>-&gt;<span style="color: #006600;">reply</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
</pre>
<p>Note that the annotation corresponding to the return value.</p>
<pre> * @return array of spring $result split to array
</pre>
<p>This will generate an schema with an element of maxOccurs=&#8217;unbounded&#8217;. Note that you can get the wsdl from the &#8217;serviceurl?wsdl&#8217;.</p>
<pre><span style="font-weight: bold; color: black;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"splitMeResponse"</span><span style="font-weight: bold; color: black;">&gt;</span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;xsd:complexType<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;xsd:sequence<span style="font-weight: bold; color: black;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"result"</span> <span style="color: #000066;">maxOccurs</span>=<span style="color: #ff0000;">"unbounded"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"xsd:string"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/xsd:sequence<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/xsd:complexType<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/xsd:element<span style="font-weight: bold; color: black;">&gt;</span>
</span></span></pre>
<p>Now just generate a client for this service using wsdl2php and try invoke it. You will get an array of string as the response.</p>
<pre>    <span style="color: #0000ff;">$input</span> = <span style="color: #000000; font-weight: bold;">new</span> splitMe<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;
    <span style="color: #0000ff;">$input</span>-&gt;<span style="color: #006600;">string_to_split</span> = <span style="color: #ff0000;">"a:b:c:d"</span>;

 
    <span style="color: #808080; font-style: italic;">// call the operation</span>
    <span style="color: #0000ff;">$response</span> = <span style="color: #0000ff;">$proxy</span>-&gt;<span style="color: #006600;">splitMe</span><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$input</span><span style="color: #66cc66;">)</span>;
    <a href="http://www.php.net/print_r"><span style="color: #000066;">print_r</span></a><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$response</span><span style="color: #66cc66;">)</span>;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dimuthu.org/blog/2010/01/08/wsfphp-code-first-approach-returning-an-array-of-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing Business Rules in WSO2 Carbon Platform</title>
		<link>http://www.dimuthu.org/blog/2010/01/07/writing-business-rules-in-wso2-carbon-platform/</link>
		<comments>http://www.dimuthu.org/blog/2010/01/07/writing-business-rules-in-wso2-carbon-platform/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 03:52:49 +0000</pubDate>
		<dc:creator>dimuthu</dc:creator>
				<category><![CDATA[SOA]]></category>
		<category><![CDATA[Tutorial/Guide]]></category>
		<category><![CDATA[carbon]]></category>
		<category><![CDATA[wso2]]></category>
		<category><![CDATA[business rules]]></category>
		<category><![CDATA[esb]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.dimuthu.org/?p=1055</guid>
		<description><![CDATA[If you want to write rules in a Java program you have lot of choices. You can use a third party library like Drools or use the JAVA built-in JSR-94 reference implementation. In WSO2 Carbon, there is a component that abstract the behaviour of different rule engine and give you a unified API. Currently it [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to write rules in a Java program you have lot of choices. You can use a <a href="http://java-source.net/open-source/rule-engines">third party library</a> like Drools or use the JAVA built-in JSR-94 reference implementation. In <a href="http://wso2.org">WSO2</a> Carbon, there is a component that abstract the behaviour of different rule engine and give you a unified API. Currently it has plugged into Drools and JAVA built-in JSR-94 implementation.</p>
<p>The rule component in WSO2 Carbon platform mainly used by <a href="http://wso2.org/projects/esb/java">WSO2 ESB</a> product to mediate messages according to the given business rules. But the component is written to facilitate any requirement of using business rules in WSO2 Carbon platform. I had such a requirement in past few days and manage to use the rule component easily with the help of the component author, indika@wso2.com. So I thought it is worth sharing my experience in here.</p>
<p>Here You will be preparing the following stuff.</p>
<p>1. Rule configuration -</p>
<p>We can use this to provide the information about the rule implementation we are going to use, the rules (You can write rules inline or provide a reference to an external file) and the input and output adapter information.</p>
<pre><span style="font-weight: bold; color: black;">&lt;configuration</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">"http://www.wso2.org/products/rule/drools"</span><span style="font-weight: bold; color: black;">&gt;</span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;executionSet</span> <span style="color: #000066;">uri</span>=<span style="color: #ff0000;">"simpleItemRuleXML"</span><span style="font-weight: bold; color: black;">&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;source</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">"file:src/test/resources/rules/simple-rules.drl"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>

<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;source&gt;</span>
</span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;x<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[</span>
<span style="color: #339933;"> rule InvokeABC</span>
<span style="color: #339933;"> // rules inbuilt to the rule conf</span>
<span style="color: #339933;"> end</span>

<span style="color: #339933;"> ]]&gt;</span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/x<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/source<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;creation<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"source"</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"drl"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>

<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/creation<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/executionSet<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;session</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"stateless"</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;input</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"facts"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"itemData"</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">"dataContext"</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/input<span style="font-weight: bold; color: black;">&gt;</span></span></span>

<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;output</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"results"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"itemData"</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">"dataContext"</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/output<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/configuration<span style="font-weight: bold; color: black;">&gt;</span></span></span>

<span style="color: #009900;"><span style="font-weight: bold; color: black;"><span style="font-weight: bold; color: black;">
</span></span></span></pre>
<p>2. The Rules  -</p>
<p>You can write rules inline in the above configuration or put it in a file and refer it from a key which can be refered from the ResourceHelper (described below).</p>
<pre><span style="color: #a1a100;">import java.util.Calendar;</span>

rule YearEndDiscount
when
$item : org.<span style="color: #006600;">test</span>.<span style="color: #006600;">pojo</span>.<span style="color: #006600;">SimpleItem</span><span style="color: #66cc66;">(</span>price &gt; <span style="color: #cc66cc;">100</span> <span style="color: #66cc66;">)</span>

then

<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ACalendar+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Calendar</span></a> calendar = <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ACalendar+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Calendar</span></a>.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">(</span>calendar.<span style="color: #006600;">get</span><span style="color: #66cc66;">(</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ACalendar+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Calendar</span></a>.<span style="color: #006600;">MONTH</span><span style="color: #66cc66;">)</span> == <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ACalendar+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Calendar</span></a>.<span style="color: #006600;">JANUARY</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

$item.<span style="color: #006600;">setPrice</span><span style="color: #66cc66;">(</span>$item.<span style="color: #006600;">getPrice</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span> * <span style="color: #cc66cc;">80</span>/<span style="color: #cc66cc;">100</span><span style="color: #66cc66;">)</span>;
<span style="color: #66cc66;">}</span>

end
</pre>
<p>3. Data Context -</p>
<p>The context object that can be used to feed and retrieve data from and to rule engine. Here is the data context for my application.</p>
<pre><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SimpleDataContext <span style="color: #66cc66;">{</span>

    <span style="color: #000000; font-weight: bold;">public</span> List&lt;NameValuePair&gt; getInput<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

        <span style="color: #808080; font-style: italic;">// in reality the data will be retrieve from a database or some datasource </span>
        List&lt;NameValuePair&gt; itemPairList = <span style="color: #000000; font-weight: bold;">new</span> ArrayList&lt;NameValuePair&gt;<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;
        SimpleItem item1 = <span style="color: #000000; font-weight: bold;">new</span> SimpleItem<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;
        item1.<span style="color: #006600;">setName</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"item1"</span><span style="color: #66cc66;">)</span>;
        item1.<span style="color: #006600;">setPrice</span><span style="color: #66cc66;">(</span><span style="color: #cc66cc;">50</span><span style="color: #66cc66;">)</span>;
        itemPairList.<span style="color: #006600;">add</span><span style="color: #66cc66;">(</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ANameValuePair+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">NameValuePair</span></a><span style="color: #66cc66;">(</span>item1.<span style="color: #006600;">getName</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>, item1<span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;

        SimpleItem item2 = <span style="color: #000000; font-weight: bold;">new</span> SimpleItem<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;
        item2.<span style="color: #006600;">setName</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"item2"</span><span style="color: #66cc66;">)</span>;
        item2.<span style="color: #006600;">setPrice</span><span style="color: #66cc66;">(</span><span style="color: #cc66cc;">120</span><span style="color: #66cc66;">)</span>;
        itemPairList.<span style="color: #006600;">add</span><span style="color: #66cc66;">(</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ANameValuePair+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">NameValuePair</span></a><span style="color: #66cc66;">(</span>item2.<span style="color: #006600;">getName</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>, item2<span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;

        SimpleItem item3 = <span style="color: #000000; font-weight: bold;">new</span> SimpleItem<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;
        item3.<span style="color: #006600;">setName</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"item3"</span><span style="color: #66cc66;">)</span>;
        item3.<span style="color: #006600;">setPrice</span><span style="color: #66cc66;">(</span><span style="color: #cc66cc;">130</span><span style="color: #66cc66;">)</span>;
        itemPairList.<span style="color: #006600;">add</span><span style="color: #66cc66;">(</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ANameValuePair+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">NameValuePair</span></a><span style="color: #66cc66;">(</span>item3.<span style="color: #006600;">getName</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>, item3<span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;

        <span style="color: #000000; font-weight: bold;">return</span> itemPairList;
    <span style="color: #66cc66;">}</span>

    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> setResult<span style="color: #66cc66;">(</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AObject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> result<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">(</span>!<span style="color: #66cc66;">(</span>result <span style="color: #000000; font-weight: bold;">instanceof</span> SimpleItem<span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>
            <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"it is not a SimpleItem"</span><span style="color: #66cc66;">)</span>;
        <span style="color: #66cc66;">}</span>

        SimpleItem item = <span style="color: #66cc66;">(</span>SimpleItem<span style="color: #66cc66;">)</span>result;
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"Item: "</span> + item.<span style="color: #006600;">getName</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span> + <span style="color: #ff0000;">", Price: "</span> + item.<span style="color: #006600;">getPrice</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;
    <span style="color: #66cc66;">}</span>

<span style="color: #66cc66;">}</span>
</pre>
<p>And the Item I&#8217;m going to manipulate using rule is a simple bean like this,</p>
<pre><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SimpleItem <span style="color: #66cc66;">{</span>
    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> name;
    <span style="color: #993333;">int</span> price;
    <span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> getName<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

        <span style="color: #000000; font-weight: bold;">return</span> name;
    <span style="color: #66cc66;">}</span>

    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> setName<span style="color: #66cc66;">(</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> name<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">name</span> = name;
    <span style="color: #66cc66;">}</span>

    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">int</span> getPrice<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

        <span style="color: #000000; font-weight: bold;">return</span> price;
    <span style="color: #66cc66;">}</span>

    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> setPrice<span style="color: #66cc66;">(</span><span style="color: #993333;">int</span> price<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">price</span> = price;
    <span style="color: #66cc66;">}</span>
<span style="color: #66cc66;">}</span>
</pre>
<p>4. Data Adapter</p>
<p>You have to adapt the input and output with the rule engine. Mostly here you only have to wrap the data context. The advantage of having the data adapter is, a data adapter always associated with a input/output type. So in the rule configuration I can provide the type for the input and output. If you see my rule configuration above, you see the input/output type is marked as &#8220;ItemData&#8221;.  Here is my custom data adapter that is associated with the &#8220;itemData&#8221; type.</p>
<pre><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SimpleDataAdapter <span style="color: #000000; font-weight: bold;">implements</span>
        ResourceAdapter, InputAdaptable, OutputAdaptable <span style="color: #66cc66;">{</span>

    <span style="color: #808080; font-style: italic;">// the type associated with the adapter</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">static</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> TYPE = <span style="color: #ff0000;">"itemData"</span>;
    <span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> getType<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

        <span style="color: #000000; font-weight: bold;">return</span> TYPE;
    <span style="color: #66cc66;">}</span>

    <span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AObject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> adaptInput<span style="color: #66cc66;">(</span>ResourceDescription resourceDescription, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AObject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> tobeadapted<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">(</span>!<span style="color: #66cc66;">(</span>tobeadapted <span style="color: #000000; font-weight: bold;">instanceof</span> SimpleDataContext<span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>
            <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">null</span>;
        <span style="color: #66cc66;">}</span>

        SimpleDataContext dataContext = <span style="color: #66cc66;">(</span>SimpleDataContext<span style="color: #66cc66;">)</span>tobeadapted;
        <span style="color: #000000; font-weight: bold;">return</span> dataContext.<span style="color: #006600;">getInput</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;
    <span style="color: #66cc66;">}</span>

    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">boolean</span> adaptOutput<span style="color: #66cc66;">(</span>ResourceDescription description,
                               <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AObject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> value,
                               <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AObject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> context,
                               ResourceHelper resourceHelper<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">(</span>!<span style="color: #66cc66;">(</span>context <span style="color: #000000; font-weight: bold;">instanceof</span> SimpleDataContext<span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>
            <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">false</span>;
        <span style="color: #66cc66;">}</span>

        <span style="color: #66cc66;">(</span><span style="color: #66cc66;">(</span>SimpleDataContext<span style="color: #66cc66;">)</span>context<span style="color: #66cc66;">)</span>.<span style="color: #006600;">setResult</span><span style="color: #66cc66;">(</span>value<span style="color: #66cc66;">)</span>;
        <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">true</span>;
    <span style="color: #66cc66;">}</span>

    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">boolean</span> canAdapt<span style="color: #66cc66;">(</span>ResourceDescription description, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AObject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> ouptput<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> key = description.<span style="color: #006600;">getKey</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;
        <span style="color: #000000; font-weight: bold;">return</span> key != <span style="color: #000000; font-weight: bold;">null</span> &amp;&amp; !<span style="color: #ff0000;">""</span>.<span style="color: #006600;">equals</span><span style="color: #66cc66;">(</span>key<span style="color: #66cc66;">)</span>;
    <span style="color: #66cc66;">}</span>

<span style="color: #66cc66;">}</span>
</pre>
<p>5. Resource Helper</p>
<p>Resource Helper will map the keys refered from the configuration to JAVA objects. This is mostly used in mediation rule configurations which can extract the message data using a key or an xpath. In this example, we don&#8217;t have much keys refering from the configuration only the rule file and the data context.</p>
<pre><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SimpleResourceHelper <span style="color: #000000; font-weight: bold;">extends</span> ResourceHelper <span style="color: #66cc66;">{</span>

    <span style="color: #000000; font-weight: bold;">public</span> ReturnValue findByKey<span style="color: #66cc66;">(</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> key, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AObject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> source, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AObject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> defaultValue<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">(</span>!<span style="color: #66cc66;">(</span>source <span style="color: #000000; font-weight: bold;">instanceof</span> SimpleDataContext<span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>
            <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> ReturnValue<span style="color: #66cc66;">(</span>defaultValue<span style="color: #66cc66;">)</span>;
        <span style="color: #66cc66;">}</span>

        SimpleDataContext dataContext = <span style="color: #66cc66;">(</span>SimpleDataContext<span style="color: #66cc66;">)</span>source;
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">(</span>key.<span style="color: #006600;">startsWith</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"file:"</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

            <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> filename = key.<span style="color: #006600;">substring</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"file:"</span>.<span style="color: #006600;">length</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;
            <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #66cc66;">{</span>

                <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ABufferedInputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">BufferedInputStream</span></a> in = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ABufferedInputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">BufferedInputStream</span></a><span style="color: #66cc66;">(</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AFileInputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">FileInputStream</span></a><span style="color: #66cc66;">(</span>filename<span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;
                <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> ReturnValue<span style="color: #66cc66;">(</span>in<span style="color: #66cc66;">)</span>;
            <span style="color: #66cc66;">}</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #66cc66;">(</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AException+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Exception</span></a> e<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

                <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> ReturnValue<span style="color: #66cc66;">(</span>defaultValue<span style="color: #66cc66;">)</span>;
            <span style="color: #66cc66;">}</span>
        <span style="color: #66cc66;">}</span>
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">(</span>key.<span style="color: #006600;">startsWith</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"dataContext"</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

            <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> ReturnValue<span style="color: #66cc66;">(</span>dataContext<span style="color: #66cc66;">)</span>;
        <span style="color: #66cc66;">}</span>
        <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> ReturnValue<span style="color: #66cc66;">(</span>defaultValue<span style="color: #66cc66;">)</span>;
    <span style="color: #66cc66;">}</span>

    <span style="color: #808080; font-style: italic;">// there are few more methods to be implemented, which can just leave not implemented for this example</span>
    <span style="color: #66cc66;">}</span>
<span style="color: #66cc66;">}</span>
</pre>
<p>That is all the accessories. Now you will be able to write the rule engine execution code.</p>
<pre><span style="color: #aaaadd; font-weight: bold;">File</span> ruleConfigFile = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AFile+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">File</span></a><span style="color: #66cc66;">(</span>ruleConfigFilename<span style="color: #66cc66;">)</span>;
XMLStreamReader parser = XMLInputFactory.<span style="color: #006600;">newInstance</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">createXMLStreamReader</span><span style="color: #66cc66;">(</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AFileInputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">FileInputStream</span></a><span style="color: #66cc66;">(</span>ruleConfigFile<span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;

<span style="color: #808080; font-style: italic;">//create the builder</span>
StAXOMBuilder builder = <span style="color: #000000; font-weight: bold;">new</span> StAXOMBuilder<span style="color: #66cc66;">(</span>parser<span style="color: #66cc66;">)</span>;
<span style="color: #808080; font-style: italic;">//get the root element (in this case the envelope)</span>

OMElement ruleConfig =  builder.<span style="color: #006600;">getDocumentElement</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;
EngineConfiguration configuration =
        <span style="color: #000000; font-weight: bold;">new</span> EngineConfigurationFactory<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">create</span><span style="color: #66cc66;">(</span>ruleConfig, <span style="color: #000000; font-weight: bold;">new</span> AXIOMXPathFactory<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;

EngineController
        engineController = <span style="color: #000000; font-weight: bold;">new</span> EngineController<span style="color: #66cc66;">(</span>configuration, <span style="color: #000000; font-weight: bold;">new</span> SimpleResourceHelper<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;
        <span style="color: #000000; font-weight: bold;">final</span> ResourceAdapterFactory factory = ResourceAdapterFactory.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;

ResourceAdapter adapter = <span style="color: #000000; font-weight: bold;">new</span> SimpleDataAdapter<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> adapterType = adapter.<span style="color: #006600;">getType</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">(</span>!factory.<span style="color: #006600;">containsResourceAdapter</span><span style="color: #66cc66;">(</span>adapterType<span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

    factory.<span style="color: #006600;">addResourceAdapter</span><span style="color: #66cc66;">(</span>adapter<span style="color: #66cc66;">)</span>;
<span style="color: #66cc66;">}</span>

SimpleDataContext simpleContext = <span style="color: #000000; font-weight: bold;">new</span> SimpleDataContext<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;

<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">(</span>!engineController.<span style="color: #006600;">isInitialized</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>
    engineController.<span style="color: #006600;">init</span><span style="color: #66cc66;">(</span>simpleContext<span style="color: #66cc66;">)</span>;

<span style="color: #66cc66;">}</span>

<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">(</span>engineController.<span style="color: #006600;">isInitialized</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>
    engineController.<span style="color: #006600;">execute</span><span style="color: #66cc66;">(</span>simpleContext, simpleContext<span style="color: #66cc66;">)</span>;

<span style="color: #66cc66;">}</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dimuthu.org/blog/2010/01/07/writing-business-rules-in-wso2-carbon-platform/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting the size of BLOB in MySql</title>
		<link>http://www.dimuthu.org/blog/2010/01/06/getting-the-size-of-blob-in-mysql/</link>
		<comments>http://www.dimuthu.org/blog/2010/01/06/getting-the-size-of-blob-in-mysql/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 02:53:32 +0000</pubDate>
		<dc:creator>dimuthu</dc:creator>
				<category><![CDATA[Tutorial/Guide]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[blob]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[OCTET_LENGTH]]></category>

		<guid isPermaLink="false">http://www.dimuthu.org/?p=1049</guid>
		<description><![CDATA[If you want to store binary in database, you can use BLOB as the data type of that column. In Mysql you can use TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB depending on your space requirement. Here is an example of database table using BLOB as a column type.
CREATE TABLE BloBTest (
    id INT NOT [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to store binary in database, you can use <a href="http://dev.mysql.com/doc/refman/5.0/en/blob.html">BLOB</a> as the data type of that column. In Mysql you can use TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB depending on your space requirement. Here is an example of database table using BLOB as a column type.</p>
<pre><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> BloBTest <span style="color: #66cc66;">(</span>
    id INT <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span>,
    filename VARCHAR<span style="color: #66cc66;">(</span> <span style="color: #cc66cc;">32</span> <span style="color: #66cc66;">)</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span>,
    content BLOB <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span>,
    <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">(</span> id <span style="color: #66cc66;">)</span>
<span style="color: #66cc66;">)</span></pre>
<p><strong>Storing Data</strong></p>
<p><strong>PHP:</strong></p>
<pre><span style="color: #0000ff;">$filename</span> = <span style="color: #ff0000;">"myimage.png"</span>;
<span style="color: #0000ff;">$filecontent</span> = <a href="http://www.php.net/file_get_contents"><span style="color: #000066;">file_get_contents</span></a><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$filename</span><span style="color: #66cc66;">)</span>;
<span style="color: #0000ff;">$filecontent_escaped</span> = <a href="http://www.php.net/mysql_real_escape_string"><span style="color: #000066;">mysql_real_escape_string</span></a><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$filecontent</span><span style="color: #66cc66;">)</span>;

<span style="color: #0000ff;">$sql</span> = <span style="color: #ff0000;">"INSERT INTO BloBTest(filename, content) "</span> +
       <span style="color: #ff0000;">"VALUES('$filename','$filecontent_escaped')"</span>;
<a href="http://www.php.net/mysql_query"><span style="color: #000066;">mysql_query</span></a><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$sql</span>, <span style="color: #0000ff;">$link</span><span style="color: #66cc66;">)</span>;</pre>
<p><strong> Java:</strong></p>
<pre><span style="color: #aaaadd; font-weight: bold;">String</span> filename = <span style="color: #ff0000;">"myimage.png"</span>;
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AInputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">InputStream</span></a> filecontent = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AFileInputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">FileInputStream</span></a><span style="color: #66cc66;">(</span>filename<span style="color: #66cc66;">)</span>;

<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> sql = <span style="color: #ff0000;">"INSERT INTO BloBTest(filename, content) VALUES(?, ?)"</span>;

<span style="color: #993333;">int</span> size = filecontent.<span style="color: #006600;">available</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3APreparedStatement+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">PreparedStatement</span></a> ps = conn.<span style="color: #006600;">prepareStatement</span><span style="color: #66cc66;">(</span>sql<span style="color: #66cc66;">)</span>;
ps.<span style="color: #006600;">setString</span><span style="color: #66cc66;">(</span><span style="color: #cc66cc;">1</span>, filename<span style="color: #66cc66;">)</span>;
ps.<span style="color: #006600;">setBinaryStream</span><span style="color: #66cc66;">(</span><span style="color: #cc66cc;">2</span>, filecontent, size<span style="color: #66cc66;">)</span>;
ps.<span style="color: #006600;">executeUpdate</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;</pre>
<p><strong>Retrieving Data</strong></p>
<p><strong>PHP</strong></p>
<pre><span style="color: #0000ff;">$sql</span> = <span style="color: #ff0000;">"SELECT filename, content FROM BloBTest"</span>;
<span style="color: #0000ff;">$result</span> = <a href="http://www.php.net/mysql_query"><span style="color: #000066;">mysql_query</span></a><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$sql</span>, <span style="color: #0000ff;">$link</span><span style="color: #66cc66;">)</span>;
<span style="color: #b1b100;">while</span> <span style="color: #66cc66;">(</span><span style="color: #0000ff;">$row</span> = <a href="http://www.php.net/mysql_fetch_assoc"><span style="color: #000066;">mysql_fetch_assoc</span></a><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$result</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span>

    <span style="color: #0000ff;">$filename</span> = <span style="color: #0000ff;">$row</span><span style="color: #66cc66;">[</span><span style="color: #ff0000;">"filename"</span><span style="color: #66cc66;">]</span>;
    <span style="color: #0000ff;">$content</span> = <span style="color: #0000ff;">$row</span><span style="color: #66cc66;">[</span><span style="color: #ff0000;">"content"</span><span style="color: #66cc66;">]</span>;
    <span style="color: #0000ff;">$new_filename</span> = <span style="color: #ff0000;">"new_"</span> . <span style="color: #0000ff;">$filename</span>;
    file_put_contents<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$new_filename</span>, <span style="color: #0000ff;">$content</span><span style="color: #66cc66;">)</span>;
<span style="color: #66cc66;">}</span></pre>
<p><strong>Java</strong>:</p>
<pre><span style="color: #aaaadd; font-weight: bold;">String</span> sql = <span style="color: #ff0000;">"SELECT filename, content FROM BloBTest"</span>;

PrepareStatement ps  = conn.<span style="color: #006600;">prepareStatement</span><span style="color: #66cc66;">(</span>resourceContentSQL<span style="color: #66cc66;">)</span>;
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AResultSet+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">ResultSet</span></a> result = ps.<span style="color: #006600;">executeQuery</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;

<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">(</span>result.<span style="color: #006600;">next</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span>
    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> filename = result.<span style="color: #006600;">getString</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"filename"</span><span style="color: #66cc66;">)</span>;
    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AInputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">InputStream</span></a> contentStream = result.<span style="color: #006600;">getBinaryStream</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"content"</span><span style="color: #66cc66;">)</span>;
    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> newFilename = <span style="color: #ff0000;">"new_"</span> + filename;
    <span style="color: #808080; font-style: italic;">// storing the input stream in the file</span>

    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AOutputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">OutputStream</span></a> out=<span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AFileOutputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">FileOutputStream</span></a><span style="color: #66cc66;">(</span>newFilename<span style="color: #66cc66;">)</span>;
    <span style="color: #993333;">byte</span> buf<span style="color: #66cc66;">[</span><span style="color: #66cc66;">]</span>=<span style="color: #000000; font-weight: bold;">new</span> <span style="color: #993333;">byte</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">1024</span><span style="color: #66cc66;">]</span>;
    <span style="color: #993333;">int</span> len;
    <span style="color: #b1b100;">while</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">(</span>len=contentStream.<span style="color: #006600;">read</span><span style="color: #66cc66;">(</span>buf<span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>&gt;<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">)</span>

    out.<span style="color: #006600;">write</span><span style="color: #66cc66;">(</span>buf,<span style="color: #cc66cc;">0</span>,len<span style="color: #66cc66;">)</span>;
    out.<span style="color: #006600;">close</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;
<span style="color: #66cc66;">}</span></pre>
<p><strong>Retrieving the Size of the Blob</strong></p>
<p>After you store your data as a blob, you can manipulate or query the data with some of the in-built <a href="http://dev.mysql.com/doc/refman/5.0/en/string-functions.html">String functions</a> in mysql. For an example if you want to query the size of the blob you just stored, you can use <a href="http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_octet-length">OCTET_LENGTH</a> function. Here is an example,  (this will give you the size in bytes.)</p>
<pre><span style="color: #993333; font-weight: bold;">SELECT</span> OCTET_LENGTH<span style="color: #66cc66;">(</span>content<span style="color: #66cc66;">)</span> <span style="color: #993333; font-weight: bold;">FROM</span> BloBTest <span style="color: #993333; font-weight: bold;">WHERE</span> filename=<span style="color: #ff0000;">'myimage.png'</span></pre>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 228px; width: 1px; height: 1px;">
<pre>.</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.dimuthu.org/blog/2010/01/06/getting-the-size-of-blob-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Register Today for WSO2 Governance as a Service</title>
		<link>http://www.dimuthu.org/blog/2010/01/05/register-today-for-wso2-governance-as-a-service/</link>
		<comments>http://www.dimuthu.org/blog/2010/01/05/register-today-for-wso2-governance-as-a-service/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 12:32:38 +0000</pubDate>
		<dc:creator>dimuthu</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[GaaS]]></category>
		<category><![CDATA[Governance]]></category>
		<category><![CDATA[Governance Registry]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Tutorial/Guide]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[gaas]]></category>
		<category><![CDATA[SaaS]]></category>
		<category><![CDATA[services]]></category>
		<category><![CDATA[wso2]]></category>

		<guid isPermaLink="false">http://www.dimuthu.org/?p=1035</guid>
		<description><![CDATA[WSO2 Governance as a Service is an online multi-tenant supported instance of WSO2 Governance Registry which is the solution for SOA Governance from the WSO2 SOA stack. You can start trying out WSO2 Governance as a Service by accessing the http://governance.cloud.wso2.com and creating an account for your organization (free for limited use).
In order to identify [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://governance.cloud.wso2.com/">WSO2 Governance as a Service</a> is an online multi-tenant supported instance of WSO2 Governance Registry which is the solution for SOA Governance from the WSO2 SOA stack. You can start trying out WSO2 Governance as a Service by accessing the <a href="http://governance.cloud.wso2.com">http://governance.cloud.wso2.com</a> and creating an account for your organization (free for limited use).</p>
<p>In order to identify your account, you have to provide the domain name of your organization. I will demonstrate how to create an account using the &#8220;ws.dimuthu.org&#8221; as my domain name.</p>
<p>1. First go to http://governance.cloud.wso2.com from a web browser and click the &#8216;Register&#8217; button. You will be asked to enter the domain name as the first step.</p>
<div id="attachment_1036" class="wp-caption aligncenter" style="width: 783px"><a href="http://www.dimuthu.org/wp-content/uploads/2010/01/enter-domain.png"><img class="size-full wp-image-1036" title="Enter the domain" src="http://www.dimuthu.org/wp-content/uploads/2010/01/enter-domain.png" alt="Enter the domain" width="773" height="303" /></a><p class="wp-caption-text">Enter the domain</p></div>
<p>After that, you have the option of validating the ownership of the domain right at the registration process, or you can skip the validation and continue to the next step in which case your domain will be appended &#8216;-trial&#8217; suffix. You can validate the ownership of the domain later at any stage.</p>
<p>Here I want to validate the domain right now, so I click &#8216;Take me to the domain ownership confirmation page straight-away&#8217; and click the &#8216;Submit&#8217; button.</p>
<p>2. This will redirect you to the domain ownership validation page. You can validate the ownership of your domain in one of two ways.</p>
<p>Method i). Just create a text file named &#8216;wso2gaas.txt&#8217; in the web root of your domain and enter the given text. This is the most simplest method of two.</p>
<div id="attachment_1039" class="wp-caption aligncenter" style="width: 732px"><a href="http://www.dimuthu.org/wp-content/uploads/2010/01/validate-domain-by-testfile.png"><img class="size-full wp-image-1039" title="validate-domain-by-textfile" src="http://www.dimuthu.org/wp-content/uploads/2010/01/validate-domain-by-testfile.png" alt="Validate domain name using Textfile" width="722" height="256" /></a><p class="wp-caption-text">Validate domain name using Textfile</p></div>
<p>Method ii). You can put a DNS entry according to the given instructions. This is a little tedious approch to validate the domain. In fact it may take a while to propagate the new DNS information, so you may have to wait hours without refreshing the page until you finally validate the domain ownership.</p>
<p><a href="http://www.dimuthu.org/wp-content/uploads/2010/01/validate-domain-by-dns-entry.png"><img class="aligncenter size-full wp-image-1040" title="validate-domain-by-dns-entry" src="http://www.dimuthu.org/wp-content/uploads/2010/01/validate-domain-by-dns-entry.png" alt="" width="723" height="294" /></a></p>
<p>Click the continue button after the domain validation done. Then you will be redirected to a page requesting more information.</p>
<p>3. Tenant Registration Page</p>
<div id="attachment_1041" class="wp-caption aligncenter" style="width: 797px"><a href="http://www.dimuthu.org/wp-content/uploads/2010/01/registration-page.png"><img class="size-full wp-image-1041" title="registration-page" src="http://www.dimuthu.org/wp-content/uploads/2010/01/registration-page.png" alt="Tenant Registration" width="787" height="478" /></a><p class="wp-caption-text">Tenant Registration</p></div>
<p>4) After this step, you will be notified to check for your email which will contain a mail with a link to proceed with the registration. There you will be able to select a theme for your organization and finalize creating your account. Login to the admin account for your tenant with the credential you provided a the time of the registration.</p>
<p>The domain ownership validation was introduced to WSO2 Governance as a Service account registration only now. So for organizations who have already have account will have a message similar to this when they are trying to login to their account.</p>
<div id="attachment_1046" class="wp-caption aligncenter" style="width: 470px"><a href="http://www.dimuthu.org/wp-content/uploads/2010/01/login-warning-message.png"><img class="size-full wp-image-1046" title="login-warning-message" src="http://www.dimuthu.org/wp-content/uploads/2010/01/login-warning-message.png" alt="Info box at login" width="460" height="169" /></a><p class="wp-caption-text">Info box at login</p></div>
<p>So the account I have registered using the domain name &#8216;example.com&#8217; has been renamed to &#8216;example.com-trial&#8217;. As the instruction of the message says you can go to the account management page after the login and validate the domain ownership.</p>
<div id="attachment_1043" class="wp-caption aligncenter" style="width: 818px"><a href="http://www.dimuthu.org/wp-content/uploads/2010/01/account-mgt.png"><img class="size-full wp-image-1043" title="account-mgt" src="http://www.dimuthu.org/wp-content/uploads/2010/01/account-mgt.png" alt="Account Management Page" width="808" height="536" /></a><p class="wp-caption-text">Account Management Page</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.dimuthu.org/blog/2010/01/05/register-today-for-wso2-governance-as-a-service/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WSO2 Bringing Cloud Computing and SOA Together</title>
		<link>http://www.dimuthu.org/blog/2009/12/02/wso2-bringing-cloud-computing-and-soa-together/</link>
		<comments>http://www.dimuthu.org/blog/2009/12/02/wso2-bringing-cloud-computing-and-soa-together/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 02:06:45 +0000</pubDate>
		<dc:creator>dimuthu</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[carbon]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[wso2]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[gaas]]></category>

		<guid isPermaLink="false">http://www.dimuthu.org/?p=1032</guid>
		<description><![CDATA[Wso2 Cloud Public 2009 11 16
]]></description>
			<content:encoded><![CDATA[<div id="__ss_2511160" style="width: 425px; text-align: left;"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" title="Wso2 Cloud Public 2009 11 16" href="http://www.slideshare.net/sanjiva/wso2-cloud-public-2009-11-16">Wso2 Cloud Public 2009 11 16</a><object style="margin:0px" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=wso2-cloud-public-2009-11-16-091116095441-phpapp02&amp;rel=0&amp;stripped_title=wso2-cloud-public-2009-11-16" /><param name="allowfullscreen" value="true" /><embed style="margin:0px" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=wso2-cloud-public-2009-11-16-091116095441-phpapp02&amp;rel=0&amp;stripped_title=wso2-cloud-public-2009-11-16" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
]]></content:encoded>
			<wfw:commentRss>http://www.dimuthu.org/blog/2009/12/02/wso2-bringing-cloud-computing-and-soa-together/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WSO2 SOA Platform Enters in to the Cloud</title>
		<link>http://www.dimuthu.org/blog/2009/11/19/wso2-soa-platform-enters-in-to-the-cloud/</link>
		<comments>http://www.dimuthu.org/blog/2009/11/19/wso2-soa-platform-enters-in-to-the-cloud/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 02:40:34 +0000</pubDate>
		<dc:creator>dimuthu</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Governance]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[wso2]]></category>

		<guid isPermaLink="false">http://www.dimuthu.org/?p=1030</guid>
		<description><![CDATA[WSO2 announced the launch of their SOA platform inside the Cloud earlier this week. With this launch, you can try out and use their comprehensive SOA platform inside the cloud.
WSO2 Cloud Platform consists of various products, including

WSO2 Cloud Virtual Machines: All WSO2 Java products are now available as

Amazon Machine Images (AMIs). Visit the &#8216;Getting Started&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>WSO2 announced the <a href="http://wso2.com/about/news/wso2-launches-industry%E2%80%99s-most-comprehensive-platform-for-extending-an-soa-to-cloud-computing/">launch of their SOA platform inside the Cloud</a> earlier this week. With this launch, you can try out and use their comprehensive SOA platform inside the cloud.</p>
<p>WSO2 Cloud Platform consists of various products, including</p>
<ul>
<li><a href="http://wso2.com/cloud/virtual-machines">WSO2 Cloud Virtual Machines</a>: All WSO2 Java products are now available as
<ul>
<li>Amazon Machine Images (AMIs). Visit the &#8216;Getting Started&#8217; tutorial from <a href="http://wso2.org/library/articles/getting-started-wso2-cloud-virtual-machines-amazon-ec2">Getting Started with WSO2 Cloud Virtual Machines for Amazon EC2</a></li>
<li>VMWare/VMWare VSX and KVM images. Visit the tutorial, <a href="http://wso2.org/library/tutorials/getting-started-wso2-vmware-images">Getting Started with WSO2 VMWare Images</a>.</li>
</ul>
</li>
<li><a href="http://wso2.com/wp-content/themes/wso2ng/images/cloud-connectors-small.gif">WSO2 Cloud Connectors</a>:
<ul>
<li>WSO2 Cloud Service Gateway &#8211; A manage and secured gateway between the services in your Enterprise and the cloud. Visit <a href="http://wso2.org/library/tutorials/introducing-wso2-cloud-services-gateway">Introducing WSO2 Cloud Services Gateway</a> for a comprehensive tutorial.</li>
<li>WSO2 Service Accelerator &#8211; Accelerate the processing of WS-Security and WS-Reliable Messaging using WSO2 Web Service Framework for C++.</li>
</ul>
</li>
<li> <a href="http://wso2.com/cloud/services">WSO2 Cloud Services</a>: Providing WSO2 Products as Services following the Software as a Service (SaaS) Model.
<ul>
<li>WSO2 Governance as a Service: Hosted instance of WSO2 Governance Registry with multi-tenant support. You can try out the software from <a href="https://governance.cloud.wso2.com">https://governance.cloud.wso2.com</a>. Visit <a href="http://wso2.org/library/tutorials/getting-started-wso2-governance-as-a-service">Getting Started With WSO2 Governance as a Service</a> and <a href="http://wso2.org/library/articles/faqs-governance-service">FAQ</a> for more information.</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dimuthu.org/blog/2009/11/19/wso2-soa-platform-enters-in-to-the-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WSO2 SOA Workshop 2009, Santa Clara, CA</title>
		<link>http://www.dimuthu.org/blog/2009/10/13/wso2-soa-workshop-2009-santa-clara-ca/</link>
		<comments>http://www.dimuthu.org/blog/2009/10/13/wso2-soa-workshop-2009-santa-clara-ca/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 13:17:11 +0000</pubDate>
		<dc:creator>dimuthu</dc:creator>
				<category><![CDATA[Governance]]></category>
		<category><![CDATA[Governance Registry]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[bps]]></category>
		<category><![CDATA[carbon]]></category>
		<category><![CDATA[esb]]></category>
		<category><![CDATA[mashup server]]></category>
		<category><![CDATA[wso2]]></category>
		<category><![CDATA[SOA Governance]]></category>
		<category><![CDATA[Workshop]]></category>

		<guid isPermaLink="false">http://www.dimuthu.org/?p=1025</guid>
		<description><![CDATA[WSO2 is hosting a SOA Workshop in Santa Clara, California in November 3rd 2009. You will be able to attend to the following sessions covered by the industry leading experts in SOA.

ESBS and SOA
SOA Security
Mashups and Business Process Management for SOA
SOA Governance
SOA with C, C++, PHP
SOA Architecture Pattern

Visit here to find more details about the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wso2.com">WSO2</a> is hosting a SOA Workshop in Santa Clara, California in November 3rd 2009. You will be able to attend to the following sessions covered by the industry leading experts in SOA.</p>
<ul>
<li>ESBS and SOA</li>
<li>SOA Security</li>
<li>Mashups and Business Process Management for SOA</li>
<li>SOA Governance</li>
<li>SOA with C, C++, PHP</li>
<li>SOA Architecture Pattern</li>
</ul>
<p>Visit here to find more details about the event, <a href="http://wso2.com/events/2009-us-soa-workshop/?soaotad=10072009">http://wso2.com/events/2009-us-soa-workshop/?soaotad=10072009</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dimuthu.org/blog/2009/10/13/wso2-soa-workshop-2009-santa-clara-ca/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
