<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Technology</title>
	<atom:link href="http://error0.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://error0.wordpress.com</link>
	<description>Work and Passion</description>
	<lastBuildDate>Thu, 06 Oct 2011 13:44:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='error0.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Technology</title>
		<link>http://error0.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://error0.wordpress.com/osd.xml" title="Technology" />
	<atom:link rel='hub' href='http://error0.wordpress.com/?pushpress=hub'/>
		<item>
		<title>HowTo use the fault management framework with Oracle BPM</title>
		<link>http://error0.wordpress.com/2011/08/02/howto-use-the-fault-management-framework-with-oracle-bpm/</link>
		<comments>http://error0.wordpress.com/2011/08/02/howto-use-the-fault-management-framework-with-oracle-bpm/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 20:13:54 +0000</pubDate>
		<dc:creator>error0</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[BPM]]></category>
		<category><![CDATA[fault+management]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[soa]]></category>

		<guid isPermaLink="false">http://error0.wordpress.com/?p=120</guid>
		<description><![CDATA[The fault management framework of Oracle SOA is amazing: you can do a variety of action which you can configure with just 2 files. But the problem is to make it works!! Here some advice (the names are very important): - create a fault-policies.xml file and place it in your SOA root folder - create [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=120&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The fault management framework of Oracle SOA is amazing: you can do a variety of action which you can configure with just 2 files. But the problem is to make it works!!<br />
Here some advice (the names are very important):<br />
- create a fault-policies.xml file and place it in your SOA root folder<br />
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;faultPolicies xmlns=&quot;http://schemas.oracle.com/bpel/faultpolicy&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
	&lt;faultPolicy version=&quot;2.0.1&quot; id=&quot;fault-policies&quot; xmlns:env=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; 		xmlns=&quot;http://schemas.oracle.com/bpel/faultpolicy&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
		&lt;Conditions&gt;
		  &lt;faultName&gt;
			&lt;condition&gt;
				&lt;action ref=&quot;default-human-intervention&quot; /&gt;
			&lt;/condition&gt;
		  &lt;/faultName&gt;
		&lt;/Conditions&gt;
		&lt;Actions&gt;
			&lt;Action id=&quot;default-human-intervention&quot;&gt;
				&lt;humanIntervention /&gt;
			&lt;/Action&gt;
		&lt;/Actions&gt;
	&lt;/faultPolicy&gt;
&lt;/faultPolicies&gt;
</pre><br />
- create a fault-bindings.xml file and place it in your SOA root folder<br />
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
&lt;faultPolicyBindings version=&quot;2.0.1&quot; xmlns=&quot;http://schemas.oracle.com/bpel/faultpolicy&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
  &lt;composite faultPolicy=&quot;fault-policies&quot;/&gt;
&lt;/faultPolicyBindings&gt;
</pre><br />
- add to your composite.xml 2 properties after the service element and before the component element<br />
<pre class="brush: xml;">
&lt;property name=&quot;oracle.composite.faultPolicyFile&quot;&gt;fault-policies.xml&lt;/property&gt;
&lt;property name=&quot;oracle.composite.faultBindingFile&quot;&gt;fault-bindings.xml&lt;/property&gt;
</pre></p>
<p>Actually you could use some other kind of action, for example a retry action with a failure action which is human intervention:<br />
<pre class="brush: xml;">
&lt;Action id=&quot;ora-retry&quot;&gt;
    &lt;retry&gt;
		&lt;retryCount&gt;3&lt;/retryCount&gt;
		&lt;retryInterval&gt;2&lt;/retryInterval&gt;
		&lt;exponentialBackoff/&gt;
		&lt;retryFailureAction ref=&quot;default-human-intervention&quot;/&gt;
    &lt;/retry&gt;
&lt;/Action&gt;
</pre></p>
<p>But be carefull that <strong>the retry action doesn&#8217;t work with a BPM process</strong>!!!!!!!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/error0.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/error0.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/error0.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/error0.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/error0.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/error0.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/error0.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/error0.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/error0.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/error0.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/error0.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/error0.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/error0.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/error0.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=120&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://error0.wordpress.com/2011/08/02/howto-use-the-fault-management-framework-with-oracle-bpm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf83264759cf0ed5dc825741a7a039cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">error0</media:title>
		</media:content>
	</item>
		<item>
		<title>Oracle Service Oriented Architecture Infrastructure Implementation Certified Expert!</title>
		<link>http://error0.wordpress.com/2011/07/20/oracle-service-oriented-architecture-infrastructure-implementation-certified-expert/</link>
		<comments>http://error0.wordpress.com/2011/07/20/oracle-service-oriented-architecture-infrastructure-implementation-certified-expert/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 21:47:44 +0000</pubDate>
		<dc:creator>error0</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[certification]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[service+oriente+architecture]]></category>
		<category><![CDATA[soa]]></category>
		<category><![CDATA[soa11g]]></category>

		<guid isPermaLink="false">http://error0.wordpress.com/?p=102</guid>
		<description><![CDATA[Finally I got my first professional certification: Oracle Service Oriented Architecture Infrastructure Implementation Certified Expert! After 20 days of intense study I succeeded to get the certification. I studied: in train each day while going to work and while going back home during lunch after dinner at home sleeping about 5 hours per night I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=102&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Finally I got my first professional certification: Oracle Service Oriented Architecture Infrastructure Implementation Certified Expert!<br />
After 20 days of intense study I succeeded to get the certification. I studied:</p>
<ul>
<li>in train each day while going to work and while going back home</li>
<li>during lunch</li>
<li>after dinner at home sleeping about 5 hours per night</li>
</ul>
<p>I passed the exame with 86% of rigth answer on 28 of February (2011).<br />
After 40 days I received the envelope with the following attachements (see the pictures):</p>
<ul>
<li>Oracle SOA Architect Certification</li>
<li>Oracle Partner Network Certified Specialist</li>
<li>Oracle SOA Architect card which I promptly put in my wallet</li>
<li>Oracle Certified Expert logo for my email</li>
<li>Oracle Partner Network Certified Specialist logo for my email</li>
</ul>

<a href='http://error0.wordpress.com/2011/07/20/oracle-service-oriented-architecture-infrastructure-implementation-certified-expert/img_20110413_204118/' title='IMG_20110413_204118'><img data-attachment-id='103' data-orig-size='2592,1944' data-liked='0'width="150" height="112" src="http://error0.files.wordpress.com/2011/07/img_20110413_204118.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="IMG_20110413_204118" title="IMG_20110413_204118" /></a>
<a href='http://error0.wordpress.com/2011/07/20/oracle-service-oriented-architecture-infrastructure-implementation-certified-expert/img_20110413_204227/' title='IMG_20110413_204227'><img data-attachment-id='104' data-orig-size='2592,1944' data-liked='0'width="150" height="112" src="http://error0.files.wordpress.com/2011/07/img_20110413_204227.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="IMG_20110413_204227" title="IMG_20110413_204227" /></a>
<a href='http://error0.wordpress.com/2011/07/20/oracle-service-oriented-architecture-infrastructure-implementation-certified-expert/soa-architect/' title='soa-architect'><img data-attachment-id='105' data-orig-size='2592,1944' data-liked='0'width="150" height="112" src="http://error0.files.wordpress.com/2011/07/soa-architect.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="soa-architect" title="soa-architect" /></a>
<a href='http://error0.wordpress.com/2011/07/20/oracle-service-oriented-architecture-infrastructure-implementation-certified-expert/o_prtnrntwrkcertspclst_clr/' title='O_PrtnrNtwrkCertSpclst_clr'><img data-attachment-id='106' data-orig-size='529,338' data-liked='0'width="150" height="95" src="http://error0.files.wordpress.com/2011/07/o_prtnrntwrkcertspclst_clr.jpg?w=150&#038;h=95" class="attachment-thumbnail" alt="O_PrtnrNtwrkCertSpclst_clr" title="O_PrtnrNtwrkCertSpclst_clr" /></a>
<a href='http://error0.wordpress.com/2011/07/20/oracle-service-oriented-architecture-infrastructure-implementation-certified-expert/oce_clr/' title='OCE_clr'><img data-attachment-id='107' data-orig-size='525,288' data-liked='0'width="150" height="82" src="http://error0.files.wordpress.com/2011/07/oce_clr.jpg?w=150&#038;h=82" class="attachment-thumbnail" alt="OCE_clr" title="OCE_clr" /></a>

<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/error0.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/error0.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/error0.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/error0.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/error0.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/error0.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/error0.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/error0.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/error0.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/error0.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/error0.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/error0.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/error0.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/error0.wordpress.com/102/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=102&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://error0.wordpress.com/2011/07/20/oracle-service-oriented-architecture-infrastructure-implementation-certified-expert/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf83264759cf0ed5dc825741a7a039cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">error0</media:title>
		</media:content>

		<media:content url="http://error0.files.wordpress.com/2011/07/img_20110413_204118.jpg?w=150" medium="image">
			<media:title type="html">IMG_20110413_204118</media:title>
		</media:content>

		<media:content url="http://error0.files.wordpress.com/2011/07/img_20110413_204227.jpg?w=150" medium="image">
			<media:title type="html">IMG_20110413_204227</media:title>
		</media:content>

		<media:content url="http://error0.files.wordpress.com/2011/07/soa-architect.jpg?w=150" medium="image">
			<media:title type="html">soa-architect</media:title>
		</media:content>

		<media:content url="http://error0.files.wordpress.com/2011/07/o_prtnrntwrkcertspclst_clr.jpg?w=150" medium="image">
			<media:title type="html">O_PrtnrNtwrkCertSpclst_clr</media:title>
		</media:content>

		<media:content url="http://error0.files.wordpress.com/2011/07/oce_clr.jpg?w=150" medium="image">
			<media:title type="html">OCE_clr</media:title>
		</media:content>
	</item>
		<item>
		<title>2G, 3G, 4G, and everything about that</title>
		<link>http://error0.wordpress.com/2011/01/20/2g-3g-4g-and-everything-about-that/</link>
		<comments>http://error0.wordpress.com/2011/01/20/2g-3g-4g-and-everything-about-that/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 09:57:06 +0000</pubDate>
		<dc:creator>error0</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://error0.wordpress.com/?p=95</guid>
		<description><![CDATA[This is a summary on wireless technology definitions: 1G AMPS in the US combination of TACS and NMT in Europe no one was thinking about data services purely analog systems 2G first digital cellular networks GSM for Europe D-AMPS and an early version of Qualcomm&#8217;s CDMA in USA 2G standards didn&#8217;t have intrinsic, tightly-coupled support for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=95&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>This is a summary on wireless technology definitions:</div>
<ul>
<li>1G
<ul>
<li>AMPS in the US</li>
<li>combination of TACS and NMT in Europe</li>
<li>no one was thinking about data services</li>
<li>purely analog systems</li>
</ul>
</li>
<li>2G
<ul>
<li>first digital cellular networks</li>
<li>GSM for Europe</li>
<li>D-AMPS and an early version of Qualcomm&#8217;s CDMA in USA</li>
<li>2G standards didn&#8217;t have intrinsic, tightly-coupled support for data services</li>
<li>14.4kbps with dial-up</li>
</ul>
</li>
<li>2.5G
<ul>
<li>General Packet Radio Service &#8212; GPRS</li>
<li>permitted &#8220;always-on&#8221; data services: no more dial-up</li>
<li>over 100kbps in theory</li>
<li>40kbps in practice</li>
<li>people started <em>really</em> checking their email accounts incessantly</li>
</ul>
</li>
<li>3G, 3.5G, 3.75G and 2.75G too
<ul>
<li>UMTS in place of GSM</li>
<li>CDMA2000 in place of CDMA</li>
<li>EDGE &#8212; Enhanced Data-rates for GSM Evolution &#8212; was conceived as an easy way for operators of GSM networks to squeeze some extra juice out of their 2.5G</li>
<li><span style="color:#444444;font-family:georgia;">EDGE is 2.75G</span></li>
<li><span style="color:#444444;font-family:georgia;">CDMA2000 revision A is 3.5G</span></li>
<li><span style="color:#444444;font-family:georgia;">UMTS: HSDPA and HSUPA is 3..5G</span></li>
<li>HSPA+, dual-carrier HSPA+, and HSPA+ Evolution is 3.75G (14Mbs)</li>
</ul>
</li>
<li><span style="color:#444444;font-family:georgia;">4G</span>
<ul>
<li>1Gbps when stationary and 100Mbps when mobile</li>
<li>outstrip the average DSL or cable broadband connection</li>
<li>WiMAX and LTE are not really 4G: the former tops out at around 40Mbps and the latter around 100Mbps theoretical</li>
<li>&#8230;</li>
</ul>
</li>
</ul>
<p>I couldn&#8217;t understand anything more&#8230;</p>
<p>This is my source <a href="http://www.engadget.com/2011/01/17/2g-3g-4g-and-everything-in-between-an-engadget-wireless-prim/">link</a> if you&#8217;re interested</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/error0.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/error0.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/error0.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/error0.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/error0.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/error0.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/error0.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/error0.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/error0.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/error0.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/error0.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/error0.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/error0.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/error0.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=95&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://error0.wordpress.com/2011/01/20/2g-3g-4g-and-everything-about-that/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf83264759cf0ed5dc825741a7a039cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">error0</media:title>
		</media:content>
	</item>
		<item>
		<title>HowTo Send JMS notification (or execute a generic action) after commits of container-managed EJB transactions</title>
		<link>http://error0.wordpress.com/2010/11/16/howto-send-jms-notification-after-a-commit-of-container-managed-ejb-transactions/</link>
		<comments>http://error0.wordpress.com/2010/11/16/howto-send-jms-notification-after-a-commit-of-container-managed-ejb-transactions/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 17:17:25 +0000</pubDate>
		<dc:creator>error0</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[afterCompletion]]></category>
		<category><![CDATA[ejb]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jms]]></category>
		<category><![CDATA[SessionSynchronization]]></category>
		<category><![CDATA[Synchronization]]></category>
		<category><![CDATA[transaction]]></category>

		<guid isPermaLink="false">http://error0.wordpress.com/?p=77</guid>
		<description><![CDATA[Finally I&#8217;m back with a new post. The issue I had to face was how to synchronized JMS notification with the commit of an EJB transaction. Why? Because of the following architecture: a front-end send data to a back-end through web services the back-end insert or update the data sent from the front-end moreover the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=77&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Finally I&#8217;m back with a new post.</p>
<p>The issue I had to face was how to synchronized JMS notification with the commit of an EJB transaction.</p>
<p>Why? Because of the following architecture:</p>
<ul>
<li>a front-end send data to a back-end through web services</li>
<li>the back-end insert or update the data sent from the front-end</li>
<li>moreover the back-end check if there is any variations that could be significant for the listener. If so, the back-end send a JMS notification about a variation on a topic</li>
<li>the listener is triggered by the notification and then it queries a web service provided by the back-end to read the new data</li>
</ul>
<p style="text-align:center;"><a href="http://error0.files.wordpress.com/2010/11/jms-synchronized.png"><img class="aligncenter size-full wp-image-78" title="JMS-synchronized" src="http://error0.files.wordpress.com/2010/11/jms-synchronized.png?w=600" alt="System architecture"   /></a></p>
<p>The issue I had was that the notification was sent before the data were committed, and that the listener queried the back-end before the commit, therefore reading the old data values.</p>
<p>How to solve this problem? Don&#8217;t try to use a sleep in your code: also if you were able to send the notification in an asynchronous thread, it will not work 100%. What you need instead is to Synchronize your EJB transaction with the notification system. There are 2 way to achieve this:</p>
<ul>
<li>through user-managed transactions: but then you need to explicitly commit or rollback your EJB transaction and, moreover, insert the code needed by the notification inside your EJB method (after the commit)</li>
<li>implementing the <a href="http://download.oracle.com/javaee/5/api/javax/ejb/SessionSynchronization.html" target="_blank">SessionSynchronization </a>interface inside your EJB: this is much better because you can separate the code for the notification system from the logic of your EJB and because you can use <span style="text-decoration:underline;">contained_managed transactions</span></li>
</ul>
<p>I used the second solution. When implementing the SessionSynchronization interface you need to implement 3 methods, which you can leave empty but the <em>afterCompletion</em> method. This method is called always after the commit of the EJB transaction, and here you need to insert the code for the notification system. Here is an example:</p>
<p><pre class="brush: java;">
@Stateful
public class ExampleBean implements ExampleLocal, SessionSynchronization  {

    private Logger logger = Logger.getLogger(ExampleBean.class);

    public DataResponse saveData(Data data){
	//some logic here
	//insert or update your Data
    }

    public void beforeCompletion() {}

    public void afterBegin(){}

    public void afterCompletion(boolean committed) {
        logger.debug(&quot;After completion invoked: committed = &quot;+committed);
        if (committed == true){
        	//send you JMS notification
        }else{
        	//do nothing
        }

    }
}
</pre></p>
<p>Note: if you have Stateless EJB you can use the interface <em>Synchronization</em> instead of <em>SessionSynchronization</em>, but for some reason I could&#8217;nt get it working.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/error0.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/error0.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/error0.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/error0.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/error0.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/error0.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/error0.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/error0.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/error0.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/error0.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/error0.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/error0.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/error0.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/error0.wordpress.com/77/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=77&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://error0.wordpress.com/2010/11/16/howto-send-jms-notification-after-a-commit-of-container-managed-ejb-transactions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf83264759cf0ed5dc825741a7a039cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">error0</media:title>
		</media:content>

		<media:content url="http://error0.files.wordpress.com/2010/11/jms-synchronized.png" medium="image">
			<media:title type="html">JMS-synchronized</media:title>
		</media:content>
	</item>
		<item>
		<title>JMS Grid standalone producer [UPDATE: modified messageChannels usage]</title>
		<link>http://error0.wordpress.com/2010/03/25/jms-grid-standalone-producer/</link>
		<comments>http://error0.wordpress.com/2010/03/25/jms-grid-standalone-producer/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 22:41:35 +0000</pubDate>
		<dc:creator>error0</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://error0.wordpress.com/?p=48</guid>
		<description><![CDATA[Who knows the Sun Java Message Service Grid? I didn&#8217;t know it before today. It is a message server option integrated with the Java Composite Application Platform Suite (Java CAPS) providing enhanced reliability required for managing messaging in a mission-critical, distributed service-oriented architecture environment. In other words it is an implementation of the standard javax.jms [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=48&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Who knows the Sun Java Message Service Grid? I didn&#8217;t know it before today. It is a message server option integrated with the Java Composite Application Platform Suite (Java CAPS) providing enhanced reliability required for managing messaging in a mission-critical, distributed service-oriented architecture environment. In other words it is an implementation of the standard javax.jms interfaces.</p>
<p>We had some problem trying to create a producer to insert text messages in a queue. Well, actually we already used this technology inside JBoss, using dedicated settings, both for producing and consuming messages. And what is the problem then? I could just copy that setting and use those in my application. But my application wasn&#8217;t running in JBoss, instead in Glassfish. Moreover I didn&#8217;t want to use an application server configuration, but a standalone client which could be executed everywhere.</p>
<p>Therefore i started to study this technology to understand how to use it. First of all these are the libraries that implement the jms interfaces:</p>
<ul>
<li>com.stc.jmsjca.core.jar</li>
<li>com.stc.jmsjca.rawave.jar</li>
<li>com.stc.wave.lwmsClient.jar</li>
<li>com.stc.wave.mgmt.jar</li>
<li>com.stc.wave.wave.jar</li>
</ul>
<p>Then this is the code I used to connect to the queue :</p>
<p><pre class="brush: java;">
public static void JMSGridProducer() throws Exception{
	//OLD CODE
	//java.util.Properties env = System.getProperties();
	//env.put(&quot;messageChannels&quot;,&quot;tcp://10.10.10.10:50600&quot;);

	Properties properties1 = new Properties();
	properties1.put(Context.INITIAL_CONTEXT_FACTORY,&quot;com.spirit.directory.SpiritDirectoryContextFactory&quot;);
	properties1.put(Context.PROVIDER_URL, &quot;tcp://10.10.10.10:50600&quot;);
	properties1.put(&quot;messageChannels&quot;,&quot;tcp://10.10.10.10:50600&quot;);
	InitialContext iniCtx = new InitialContext(properties1);
	QueueConnectionFactory qcf = (QueueConnectionFactory) iniCtx.lookup(&quot;QueueConnectionFactory&quot;);
	QueueConnection conn = qcf.createQueueConnection();
	QueueSession session = conn.createQueueSession(false,QueueSession.AUTO_ACKNOWLEDGE);
	Queue que = (Queue) iniCtx.lookup(&quot;jmsqueue&quot;);
	conn.start();
	System.out.println(&quot;Connection started&quot;);
	TextMessage tm = session.createTextMessage(&quot;LOL&quot;);
	QueueSender send = session.createSender(que);
	send.send(tm);
	System.out.println(&quot;Message sent&quot;);
	send.close();
	conn.stop();
	session.close();
	conn.close();
	System.out.println(&quot;Connection closed&quot;);
}
</pre></p>
<p>P.S.<br />
I used netstat -n (on windows) and the debugger to find the messageChannels environment property, other way the QueueFactory was always trying to connect on localhost when opening the connection for the queue.</p>
<p>P.P.S.</p>
<p><a href="http://dlc.sun.com/pdf/819-7328/819-7328.pdf">Here is some documentation</a> you can find useful if you need to use JMS Grid.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/error0.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/error0.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/error0.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/error0.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/error0.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/error0.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/error0.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/error0.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/error0.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/error0.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/error0.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/error0.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/error0.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/error0.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=48&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://error0.wordpress.com/2010/03/25/jms-grid-standalone-producer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf83264759cf0ed5dc825741a7a039cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">error0</media:title>
		</media:content>
	</item>
		<item>
		<title>HOWTO insert code in a post: syntaxhighlighter (Blogger vs WordPress)</title>
		<link>http://error0.wordpress.com/2010/02/22/howto-insert-code-in-blogspot-syntaxhighlighter/</link>
		<comments>http://error0.wordpress.com/2010/02/22/howto-insert-code-in-blogspot-syntaxhighlighter/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 16:18:25 +0000</pubDate>
		<dc:creator>error0</dc:creator>
				<category><![CDATA[blogspot]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[syntaxhighlighter]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://error0.wordpress.com/?p=10</guid>
		<description><![CDATA[Do you know how to insert some code snippets in your posts? The best way to do it in Blogger is provided by syntaxhighlighter, a Google&#8217;s project which consists of a javascript library. Here is the link to the project. But the usage is not that simple because you have to upload the javascript on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=10&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Do you know how to insert some code snippets in your posts? The best way to do it in Blogger is provided by syntaxhighlighter, a Google&#8217;s project which consists of a javascript library. <a href="http://code.google.com/p/syntaxhighlighter">Here</a> is the link to the project.</p>
<p>But the usage is not that simple because you have to upload the javascript on your web site, or on a dedicated URL, and then put the following javascript code <strong>at the end </strong>of your page, just before the <em>&#8220;body&#8221;</em> tag.</p>
<p><pre class="brush: jscript;">
//&lt;![CDATA[
function FindTagsByName(container, name, Tag){
  var elements = document.getElementsByTagName(Tag);
  for (var i = 0; i &amp;lt; elements.length; i++){
    if (elements[i].getAttribute(&quot;name&quot;) == name){
      container.push(elements[i]);
    }
  }
}

var elements = [];
FindTagsByName(elements, &quot;code&quot;, &quot;pre&quot;);
FindTagsByName(elements, &quot;code&quot;, &quot;textarea&quot;);

for(var i=0; i &amp;lt; elements.length; i++) {
  if(elements[i].nodeName.toUpperCase() == &quot;TEXTAREA&quot;) {
    var childNode = elements[i].childNodes[0];
    var newNode = document.createTextNode(childNode.nodeValue.replace(//gi,'\n'));
    elements[i].replaceChild(newNode, childNode);
  }
  else if(elements[i].nodeName.toUpperCase() == &quot;PRE&quot;) {
    brs = elements[i].getElementsByTagName(&quot;br&quot;);
    for(var j = 0, brLength = brs.length; j &amp;lt; brLength; j++) {
    var newNode = document.createTextNode(&quot;\n&quot;);
    elements[i].replaceChild(newNode, brs[0]);
  }
}

//clipboard does not work well, no line breaks
//dp.SyntaxHighlighter.ClipboardSwf = &quot;http://www.valeriobarbagallo.eu/sh/Scripts/clipboard.swf&quot;;
dp.SyntaxHighlighter.HighlightAll(&quot;code&quot;);
//]]&gt;
</pre></p>
<p>But as you know, I moved to WordPress, and I had to find another way to insert code snippets in my posts. I was worried because on Blogger it wasn&#8217;t that easy as it should be, because it should help you to manage your blogs. But do you know what I found? In WordPress you just need to use the following code to display it in a very elegant way. By doing this you are still using syntaxhighlighter, but of course in an easier way. Obviously you can change the language to the one you need. Check it out on WordPress all the languages which are supported.</p>
<p><pre class="brush: plain;">
[sourcecode language=&quot;java&quot;]
insert your code here ...
[ /sourcecode]
</pre><br />
This is a totally win for WordPress!</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/error0.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/error0.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/error0.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/error0.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/error0.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/error0.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/error0.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/error0.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/error0.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/error0.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/error0.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/error0.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/error0.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/error0.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=10&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://error0.wordpress.com/2010/02/22/howto-insert-code-in-blogspot-syntaxhighlighter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf83264759cf0ed5dc825741a7a039cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">error0</media:title>
		</media:content>
	</item>
		<item>
		<title>Moved to WordPress(.com)</title>
		<link>http://error0.wordpress.com/2010/02/09/moved-to-wordpress-com/</link>
		<comments>http://error0.wordpress.com/2010/02/09/moved-to-wordpress-com/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 15:12:09 +0000</pubDate>
		<dc:creator>error0</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://error0.wordpress.com/?p=31</guid>
		<description><![CDATA[The beginning: I wanted to refresh my website and especially my blog, my technology blog. And above all I wanted to buy a domain for my website. So i bought a domain on tophost www.valeriobarbagallo.eu (remember the www because without it doesn&#8217;t work!). With about 10 euro you can buy both a domain and a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=31&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The beginning: I wanted to refresh my website and especially my blog, my technology blog. And above all I wanted to buy a domain for my website.</p>
<p>So i bought a domain on tophost www.valeriobarbagallo.eu (remember the www because without it doesn&#8217;t work!). With about 10 euro you can buy both a domain and a web hosting which supports also php and mysql. Not bad. Theoretically unlimited, but don&#8217;t trust it, there is no unlimited service! Then i found that I with tophost the cpanel is terrible and you can&#8217;t redirect to another web site ( for example my old site http://error0.altervista.org ). I also found that i couldn&#8217;t access my tophost domain without the prefix www. I personally hate to write www because I found it pretty useless and just a waste of time.</p>
<p>Then I went back to my old web site, the one hosted by altervista, and i started studying the features provided by altervista. I was able to install a wordpress blog with just one click in the control panel of altervista. Really nice. So i started testing this platform: wordpress. I found it very nice and moreover also the support for mobile phone was great! I felt in love with it, I wanted it! In addition I found that blogger will not support anymore the ftp publishing. So the decision was taken: wordpress is all I need because it offers 1 blog plus some static page where I can put, for example, my curriculum and something more about me, just like my web site template!!!</p>
<p>I then had to decide where to host my blog/web site:</p>
<ul>
<li>on tophost (www.valeriobarbagallo.eu)</li>
<li>on altervista (error0.altervista.org)</li>
<li>on wordpress.com</li>
</ul>
<p>I started hating the first for the reasons I explained you above, so then I bought another domain on altervista: www.valeriobarbagallo.com (this time also accessible without the www), which became free the 7th of February! Well it was already registered at the beginning, but the service whois told me that after 2 days (it was the 5th) it would be expired. Then I put an alarm in my agenda and &#8230;. the domain is now mine! The .com domains are still the best because the browser autocomplete them.</p>
<p>So I was very happy about my experience in altervista, altougth the database is really a bottleneck for your web site and for the wordpress platform, and in any case I had to use a redirect from valeriobarbagallo.com to error0.altervista.org using an iframe, which is not really nice.</p>
<p>Therefore I decided to move to wordpress.com because:</p>
<ul>
<li>in any case I had to use the redirect with the iframe</li>
<li>I have no limit in query (without paying) my blog can execute on the database</li>
<li>it is really easy to handle</li>
<li>it gets also more pubblicity because it is hosted on wordpress.com</li>
</ul>
<p>If you are in my same situation, don&#8217;t worry too much about your chose, just buy a domain and point it to your web hosting solution. WordPress has a really nice import/export feature and so you can move it anywhere when you want, with just 1 click (in the same way I imported all my previous posts, few, on blogger).</p>
<p>Give me some more time and I will setup also the others static pages on this blog.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/error0.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/error0.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/error0.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/error0.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/error0.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/error0.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/error0.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/error0.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/error0.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/error0.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/error0.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/error0.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/error0.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/error0.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=31&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://error0.wordpress.com/2010/02/09/moved-to-wordpress-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf83264759cf0ed5dc825741a7a039cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">error0</media:title>
		</media:content>
	</item>
		<item>
		<title>HOWTO schedule a task in JBoss</title>
		<link>http://error0.wordpress.com/2010/02/02/howto-schedule-a-task-in-jboss/</link>
		<comments>http://error0.wordpress.com/2010/02/02/howto-schedule-a-task-in-jboss/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 10:53:00 +0000</pubDate>
		<dc:creator>error0</dc:creator>
				<category><![CDATA[cluster]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[scheduler]]></category>
		<category><![CDATA[timer]]></category>

		<guid isPermaLink="false">http://error0.wordpress.com/2010/02/02/howto-schedule-a-task-in-jboss</guid>
		<description><![CDATA[Since many colleagues asked me how to schedule a service under JBoss I decided to write it once and explain it to everyone. Let&#8217;s give some details of the problem: my &#8220;EXAMPLE-APP&#8221; needs to run a specific task every X time (days/hours/months&#8230;) It runs under JBoss 4.2.3 and uses Java5 Preferably a systems engineer should [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=8&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since many colleagues asked me how to schedule a service under JBoss I decided to write it once and explain it to everyone.</p>
<p>Let&#8217;s give some details of the problem:</p>
<ul>
<li>my &#8220;EXAMPLE-APP&#8221; needs to run a specific task every X time (days/hours/months&#8230;)</li>
<li>It runs under JBoss 4.2.3 and uses Java5</li>
<li>Preferably a systems engineer should be able to change the scheduled time of the task without redeploying or modifying the .ear file and even without restarting the server</li>
<li>My Application runs in a clustered JBoss and the timer should execute the task only once and it should also offer HA being deployed on both JBoss AS (and therefore be able to run also if there is only one instance of the cluster alive)</li>
</ul>
<p>If you have all these requirements, like I had, I sugget you to use the Single Scheduler Provider provided by JBoss.</p>
<p>First of all I created this interface:</p>
<p><pre class="brush: java;">
public interface SchedulableMBeanExampleInterface extends org.jboss.system.ServiceMBean {
    void hit(javax.management.Notification lNotification, java.util.Date lDate,long lRepetitions, javax.management.ObjectName name, String test);
    int getHitCount();
    javax.management.Notification getHitNotification();
    java.util.Date getHitDate();
    long getRemainingRepetitions();
    String getTestString();
    javax.management.ObjectName getSchedulerName();
}
</pre></p>
<p>Then the implementaion for the interface:</p>
<p><pre class="brush: java;">
public class SchedulableMBeanExample extends ServiceMBeanSupport implements SchedulableMBeanExampleInterface {
    private Notification notification;
    private Date date;
    private long repetitions;
    private ObjectName name;
    private String test;
    private int hitCount;
    private static Logger logger = Logger.getLogger(SchedulableMBeanExample.class);

    /*all get method for the private variable here*/
    public void hit(Notification notification, Date date, long repetitions, ObjectName name, String test) {
        logger.info(&quot;Started...&quot;);
        this.notification = notification;
        this.date = date;
        this.repetitions = repetitions;
        this.name = name;
        this.test = test;
        hitCount++;
        //Do the task you need
    }
}
</pre></p>
<p>Then I setup the scheduler in a *-service.xml file, which i called EXAMPLE-APP-service.xml. You can put this file under the conf/ directory. Here is the file you need:<br />
<pre class="brush: xml;">
&lt;server&gt;
  &lt;mbean code=&quot;org.jboss.mx.timer.JBossTimer&quot; name=&quot;jboss:service=Timer&quot;&gt;&lt;/mbean&gt;
  &lt;mbean code=&quot;org.jboss.varia.scheduler.ScheduleManager&quot; name=&quot;jboss:service=ScheduleManager&quot;&gt;
    &lt;attribute name=&quot;StartAtStartup&quot;&gt;true&lt;/attribute&gt;
    &lt;attribute name=&quot;FixedRate&quot;&gt;true&lt;/attribute&gt;
  &lt;/mbean&gt;
  &lt;mbean code=&quot;org.jboss.varia.scheduler.SingleScheduleProvider&quot; name=&quot;jboss:service=SingleScheduleProvider&quot;&gt;
    &lt;depends name=&quot;ScheduleManagerName&quot;&gt;jboss:service=ScheduleManager&lt;/depends&gt;
    &lt;depends name=&quot;TargetName&quot;&gt;jboss:service=SchedulableMBeanExample&lt;/depends&gt;
    &lt;attribute name=&quot;TargetMethod&quot;&gt;hit( NOTIFICATION, DATE, REPETITIONS,    SCHEDULER_NAME, java.lang.String )&lt;/attribute&gt;
    &lt;attribute name=&quot;DateFormat&quot;&gt;d/M/yy HH:mm Z&lt;/attribute&gt;
    &lt;attribute name=&quot;StartDate&quot;&gt;1/1/2001 01:00 CEST&lt;/attribute&gt;
    &lt;attribute name=&quot;Period&quot;&gt;86400000&lt;/attribute&gt; &lt;!-- in milliseconds --&gt;
    &lt;attribute name=&quot;Repetitions&quot;&gt;-1&lt;/attribute&gt; &lt;!-- infinite repetitions --&gt;
    &lt;depends&gt;jboss.ha:service=HASingletonDeployer,type=Barrier&lt;/depends&gt;
  &lt;/mbean&gt;
&lt;/server&gt;
</pre></p>
<p>As you can see form the xml above, this scheduler is dependent with a SchedulableMBeanExample which is not a service provided by JBoss and neither we have declared it yet. Therefore we need to declare it, but we will do it inside the ear, so that this service will be started only after deploying the ear itself.<br />
I declared this service in the root of the ear (but you can also move it in the META-INF directory) and I called it myschedule-service.xml. It is the following:</p>
<p>After declaring this service, you need to tell to JBoss that it should read also the myschedule-service.xml and execute the xml contained. To achieve this you have to define the jboss-app.xml file in the META-INF direcotry with the following content:<br />
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; 
&lt;server&gt;   
  &lt;mbean code=&quot;it.example.SchedulableMBeanExample&quot; name=&quot;jboss:service=SchedulableMBeanExample&quot;&gt;&lt;/mbean&gt;  
&lt;/server&gt;
</pre></p>
<p>And that&#8217;s all! Good luck with your scheduler!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/error0.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/error0.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/error0.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/error0.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/error0.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/error0.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/error0.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/error0.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/error0.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/error0.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/error0.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/error0.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/error0.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/error0.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=8&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://error0.wordpress.com/2010/02/02/howto-schedule-a-task-in-jboss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf83264759cf0ed5dc825741a7a039cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">error0</media:title>
		</media:content>
	</item>
		<item>
		<title>New air for this blog</title>
		<link>http://error0.wordpress.com/2010/01/27/new-air-for-this-blog/</link>
		<comments>http://error0.wordpress.com/2010/01/27/new-air-for-this-blog/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 14:26:00 +0000</pubDate>
		<dc:creator>error0</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://error0.wordpress.com/2010/01/27/new-air-for-this-blog</guid>
		<description><![CDATA[I guess noone noticed that i didn&#8216;t post anything on this blog, probably because noone reads it! But i decided to revamp my personal web site and this blog too. See you soon!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=7&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I <span class="blsp-spelling-error" id="SPELLING_ERROR_0">guess</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_1">noone</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_2">noticed</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_3">that</span> i <span class="blsp-spelling-error" id="SPELLING_ERROR_4">didn</span>&#8216;t post <span class="blsp-spelling-error" id="SPELLING_ERROR_5">anything</span> on <span class="blsp-spelling-error" id="SPELLING_ERROR_6">this</span> blog, <span class="blsp-spelling-error" id="SPELLING_ERROR_7">probably</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_8">because</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_9">noone</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_10">reads</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_11">it</span>! <span class="blsp-spelling-error" id="SPELLING_ERROR_12">But</span> i <span class="blsp-spelling-error" id="SPELLING_ERROR_13">decided</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_14">to</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_15">revamp</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_16">my</span> personal web site <span class="blsp-spelling-error" id="SPELLING_ERROR_17">and</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_18">this</span> blog <span class="blsp-spelling-error" id="SPELLING_ERROR_19">too</span>.
<div><span class="blsp-spelling-error" id="SPELLING_ERROR_20">See</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_21">you</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_22">soon</span>!</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/error0.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/error0.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/error0.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/error0.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/error0.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/error0.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/error0.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/error0.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/error0.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/error0.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/error0.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/error0.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/error0.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/error0.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=7&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://error0.wordpress.com/2010/01/27/new-air-for-this-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf83264759cf0ed5dc825741a7a039cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">error0</media:title>
		</media:content>
	</item>
		<item>
		<title>Firefox Bookmarks Toolbar Disappeared</title>
		<link>http://error0.wordpress.com/2008/12/11/firefox-bookmarks-toolbar-disappeared/</link>
		<comments>http://error0.wordpress.com/2008/12/11/firefox-bookmarks-toolbar-disappeared/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 10:52:00 +0000</pubDate>
		<dc:creator>error0</dc:creator>
				<category><![CDATA[addon]]></category>
		<category><![CDATA[bookmarks]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[FireFox]]></category>

		<guid isPermaLink="false">http://error0.wordpress.com/2008/12/11/firefox-bookmarks-toolbar-disappeared</guid>
		<description><![CDATA[Where did it go? I came home yesterday, and I was in front of my PC, but my bookmarks toolbar wasn&#8217;t there! Anyway all the bookmarks was still there and they were functioning. Maybe an addon problem? I use FireFox Synchronizer and it manages my bookmarks. Probably it cause the problem, but i don&#8217;t know [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=6&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Where did it go? I came home yesterday, and I was in front of my PC, but my bookmarks toolbar wasn&#8217;t there! Anyway all the bookmarks was still there and they were functioning. Maybe an <span class="blsp-spelling-error" id="SPELLING_ERROR_0">addon</span> problem? I use <span class="blsp-spelling-corrected" id="SPELLING_ERROR_1">FireFox</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_2">Synchronizer</span> and it manages my bookmarks. Probably it cause the problem, but i don&#8217;t know exactly. I&#8217;m just guessing.</p>
<p>Anyway I cleaned my cache and it was all back again!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/error0.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/error0.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/error0.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/error0.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/error0.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/error0.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/error0.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/error0.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/error0.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/error0.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/error0.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/error0.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/error0.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/error0.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=error0.wordpress.com&amp;blog=11862211&amp;post=6&amp;subd=error0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://error0.wordpress.com/2008/12/11/firefox-bookmarks-toolbar-disappeared/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf83264759cf0ed5dc825741a7a039cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">error0</media:title>
		</media:content>
	</item>
	</channel>
</rss>
