<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;AkYMR3czfCp7ImA9WhRaE0Q.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754</id><updated>2012-02-16T08:16:26.984-05:00</updated><category term="tethering" /><category term="logging" /><category term="socketio" /><category term="clustering" /><category term="javascript" /><category term="mycila-event" /><category term="websocket" /><category term="redis" /><category term="actors" /><category term="usbkey" /><category term="junit" /><category term="maven" /><category term="disk" /><category term="gzip" /><category term="conference" /><category term="long-polling" /><category term="syncasync" /><category term="backtrack" /><category term="hostapd" /><category term="job" /><category term="git" /><category term="jetty" /><category term="polling" /><category term="mycila-log" /><category term="video" /><category term="top" /><category term="nosql" /><category term="cometd" /><category term="piggyback" /><category term="reverse" /><category term="eventbus" /><category term="google-guice" /><category term="linux" /><category term="apache" /><category term="shell script" /><category term="cvs" /><category term="scala" /><category term="atmosphere" /><category term="java" /><category term="jug" /><category term="ajax" /><category term="streaming" /><category term="minidlna" /><category term="projecteuler" /><category term="ffmpeg" /><category term="godaddy" /><category term="log4j" /><category term="xmltool" /><category term="intellij idea" /><category term="jquery" /><category term="android" /><category term="blogger" /><category term="wireless" /><category term="groovy" /><category term="mercury" /><category term="twitter" /><category term="event-driven" /><category term="dlna" /><category term="mathematics" /><category term="mycila-ujd" /><category term="ubuntu" /><category term="testing" /><category term="reverse-ajax" /><category term="subversion" /><category term="nautilus" /><title>Mycila Blog</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.mycila.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.mycila.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>113</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/mycilablog" /><feedburner:info uri="mycilablog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CEUDQ30_eSp7ImA9WhRRGEk.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-6313041675129904511</id><published>2011-12-02T00:59:00.000-05:00</published><updated>2011-12-02T11:11:12.341-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-02T11:11:12.341-05:00</app:edited><title>Redis Introduction</title><content type="html">Redis est un serveur NoSQL (sorte de MemCache évolué) permettant de partager des données entre différens serveurs. Nous allons voir comment l'utiliser en Java et ses principaux atout, notament l'atomicité, les transactions, l'asynchrone et les différents types de données supportés.

Nous allons également montrer un usage concret d'utilisation d'un tel type de BD pour le clustering de sessions sur Jetty.

&lt;div style="width:425px" id="__ss_10426379"&gt; &lt;strong style="display:block;margin:12px 0 4px"&gt;&lt;a href="http://www.slideshare.net/mathieucarbou/redis-introduction" title="Redis Introduction" target="_blank"&gt;Redis Introduction&lt;/a&gt;&lt;/strong&gt; &lt;iframe src="http://www.slideshare.net/slideshow/embed_code/10426379" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"&gt;&lt;/iframe&gt; &lt;div style="padding:5px 0 12px"&gt; View more &lt;a href="http://www.slideshare.net/" target="_blank"&gt;presentations&lt;/a&gt; from &lt;a href="http://www.slideshare.net/mathieucarbou" target="_blank"&gt;Mathieu Carbou&lt;/a&gt; &lt;/div&gt; &lt;/div&gt;

&lt;b&gt;Source code:&lt;/b&gt; &lt;a href="https://github.com/Ovea/conf-redis"&gt;https://github.com/Ovea/conf-redis&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-6313041675129904511?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5yCVJflvJuQUuPutpepPgBHffo8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5yCVJflvJuQUuPutpepPgBHffo8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5yCVJflvJuQUuPutpepPgBHffo8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5yCVJflvJuQUuPutpepPgBHffo8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/CDEhUydRQHk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/6313041675129904511/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/12/redis-introduction.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/6313041675129904511?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/6313041675129904511?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/CDEhUydRQHk/redis-introduction.html" title="Redis Introduction" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.mycila.com/2011/12/redis-introduction.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C04MRX08fCp7ImA9WhRRGEk.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-5421754047141358082</id><published>2011-12-02T00:57:00.000-05:00</published><updated>2011-12-02T11:06:24.374-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-02T11:06:24.374-05:00</app:edited><title>Advanced Junit &amp; Mockito</title><content type="html">Junit est une librarie de test que tout le monde connaît, mais peu de personne savent qu'il existe de nombreuses fonctionnailités plus ou moins documentées et assez puissantes.

Cette présentation vise à montrer ces outils cachés via des démonstrations (@Rule, Suite, Theories, Comment tester la concurrence, Exécution en parallèle des tests, ...). Nous entrerons également dans le détail à savoir comment créer votre propre Runner Junit pour étendre ce framework et nous verrons les features expérimentales de Junit.

Enfin nous verrons comment utiliser Mockito, un framework avancé de mocking.
&lt;div style="width:425px" id="__ss_9685533"&gt; &lt;strong style="display:block;margin:12px 0 4px"&gt;&lt;a href="http://www.slideshare.net/mathieucarbou/advanced-junit-and-mockito" title="Advanced junit and mockito" target="_blank"&gt;Advanced junit and mockito&lt;/a&gt;&lt;/strong&gt; &lt;iframe src="http://www.slideshare.net/slideshow/embed_code/9685533" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"&gt;&lt;/iframe&gt; &lt;div style="padding:5px 0 12px"&gt; View more &lt;a href="http://www.slideshare.net/" target="_blank"&gt;presentations&lt;/a&gt; from &lt;a href="http://www.slideshare.net/mathieucarbou" target="_blank"&gt;Mathieu Carbou&lt;/a&gt; &lt;/div&gt; &lt;/div&gt;

&lt;b&gt;Source code:&lt;/b&gt; &lt;a href="http://github.com/Ovea/conf-junit"&gt;http://github.com/Ovea/conf-junit&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-5421754047141358082?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/yxnwajpIGnRZ147QMGGd93y3dqQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yxnwajpIGnRZ147QMGGd93y3dqQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/yxnwajpIGnRZ147QMGGd93y3dqQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yxnwajpIGnRZ147QMGGd93y3dqQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/72wOKYoLvm0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/5421754047141358082/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/12/advanced-junit-mockito.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/5421754047141358082?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/5421754047141358082?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/72wOKYoLvm0/advanced-junit-mockito.html" title="Advanced Junit &amp; Mockito" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/12/advanced-junit-mockito.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUHR3Yyeip7ImA9WhRSFE8.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-8118535085118907748</id><published>2011-11-15T23:26:00.001-05:00</published><updated>2011-11-16T00:10:36.892-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-16T00:10:36.892-05:00</app:edited><title>Java, Groovy and Javascript compatible coding library</title><content type="html">Last week I worked on a Java/Groovy and JavaScript compatible coding library including:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;binary to hex representation (aka Hex class of commons codec)&lt;/li&gt;
&lt;li&gt; base64 implementation&lt;/li&gt;
&lt;li&gt;Tiny Encryption Algorithm (&lt;a href="http://en.wikipedia.org/wiki/XXTEA"&gt;XXTEA&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;ASCII to binary conversion&lt;/li&gt;
&lt;/ul&gt;
The challenge is to get the same output in JavaScript and Java for the same input. JavaScript has no &lt;i&gt;byte&lt;/i&gt; type so the only common binary type representation I found for both of them is to &lt;i&gt;arrays of 32-bits integers&lt;/i&gt;,&lt;br /&gt;
&lt;br /&gt;
Most of existing coding JavaScript library works based on String, but String encoding may vary between Java and JavaScript. Integers cannot. On Java-side, the library can work with bytes, integers and most of all &lt;i&gt;NIO buffers&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
Here is an excerpt of what you can do with this library. The result is the same in Java, Groovy and JavaScript providing the same input.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Java / Groovy&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;// ascii &amp;lt;-&amp;gt; binary conversion &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;String str = 'abcdefghijklmnopqrstuvwxyz'&lt;/span&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;IntBuffer buffer = ASCII.toIntBuffer(str)&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;assert str == &lt;/span&gt;&lt;span style="font-size: small;"&gt;ASCII.fromIntBuffer(buffer)&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt; // hex representation&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;String str = '0123456789ABCDEF'&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;IntBuffer buffer = &lt;/span&gt;&lt;span style="font-size: small;"&gt;HEX.decodeHexAsInts(str)&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;assert str == &lt;/span&gt;&lt;span style="font-size: small;"&gt;HEX&lt;/span&gt;&lt;span style="font-size: small;"&gt;.encodeHexString(buffer)&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;// Base64 &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;String &lt;/span&gt;&lt;span style="font-size: small;"&gt;str&lt;/span&gt;&lt;span style="font-size: small;"&gt; = Base64.encodeBase64String(buffer)&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;ByteBuffer buffer =&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: small;"&gt;Base64.decodeBase64(str)&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;// TEA key generation&lt;br /&gt;
  &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;Random r = new SecureRandom()&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;IntBuffer key = IntBuffer.wrap([&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; r.nextInt(),&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: small;"&gt;r.nextInt(),&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: small;"&gt;r.nextInt(),&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: small;"&gt;r.nextInt()] as int[]) //128-bits keys&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;// TEA encryption&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;String data = "...." // &amp;gt; 128-bits data&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;IntBuffer buffer = ASCII.toIntBuffer(data)&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;XXTEA.encryptInPlace(&lt;/span&gt;&lt;span style="font-size: small;"&gt;buffer&lt;/span&gt;&lt;span style="font-size: small;"&gt;, key)&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;String b64 = Base64.encodeBase64String(&lt;/span&gt;&lt;span style="font-size: small;"&gt;buffer&lt;/span&gt;&lt;span style="font-size: small;"&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;// TEA decryption&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;buffer = Base64.decodeBase64(b64).asIntBuffer()&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;XXTEA.decryptInPlace(&lt;/span&gt;&lt;span style="font-size: small;"&gt;buffer&lt;/span&gt;&lt;span style="font-size: small;"&gt;, key)&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;String clear_text = ASCII.fromIntBuffer(&lt;/span&gt;&lt;span style="font-size: small;"&gt;buffer&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: small;"&gt;) &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;JavaScript &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;// ascii &amp;lt;-&amp;gt; binary conversion &lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;var str = 'abcdefghijklmnopqrstuvwxyz';&lt;/span&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;var int_array = ovea.crypto.ascii.toInts(str);&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;str ==&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: small;"&gt;ovea.crypto.ascii.fromInts(&lt;/span&gt;&lt;span style="font-size: small;"&gt;int_array&lt;/span&gt;&lt;span style="font-size: small;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt; // hex representation&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;var str = '0123456789ABCDEF'v&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;var int_array = &lt;/span&gt;&lt;span style="font-size: small;"&gt;ovea.crypto.hex.decode(str);&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;str == &lt;/span&gt;&lt;span style="font-size: small;"&gt;ovea.crypto.hex.encode(int_array&lt;/span&gt;&lt;span style="font-size: small;"&gt;)&lt;/span&gt;&lt;span style="font-size: small;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;// Base64 &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;var &lt;/span&gt;&lt;span style="font-size: small;"&gt;str&lt;/span&gt;&lt;span style="font-size: small;"&gt; = ovea.crypto.base64.encode(buffer)&lt;/span&gt;&lt;span style="font-size: small;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;var int_array =&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: small;"&gt;ovea.crypto.base64.decode&lt;/span&gt;&lt;span style="font-size: small;"&gt;(str)&lt;/span&gt;&lt;span style="font-size: small;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;// TEA key generation&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;var key = [0, 1, 2, 3]&amp;nbsp; // 128-bits key&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;// TEA encryption&lt;br /&gt;
  &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;var data = "...." // &amp;gt; 128-bits data&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;var buffer = ovea.crypto.ascii.toInts(data);&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;ovea.crypto.xxtea.encryptInPlace(buffer, key);&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;var b64 = ovea.crypto.base64.encode(buffer); &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;&lt;br /&gt;
  &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;// TEA decryption&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span style="font-size: small;"&gt;var buffer = ovea.crypto.base64.decode(b64);&lt;br /&gt;ovea.crypto.xxtea.decryptInPlace(buffer, key);&lt;br /&gt;var clear_text = ovea.crypto.ascii.fromInts(buffer);&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The project &lt;a href="https://github.com/Ovea/java-js-crypto"&gt;java-js-crypto&lt;/a&gt; is available on &lt;a href="https://github.com/Ovea/"&gt;Ovea's GitHub&lt;/a&gt;. The license is Apache 2 and libraries are deployed in Maven2 Central Repository at:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://repo1.maven.org/maven2/com/ovea/ovea-crypto/"&gt;http://repo1.maven.org/maven2/com/ovea/ovea-crypto/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-8118535085118907748?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PDQxO_ft33oA8Q6o-biZJzEjs7o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PDQxO_ft33oA8Q6o-biZJzEjs7o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PDQxO_ft33oA8Q6o-biZJzEjs7o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PDQxO_ft33oA8Q6o-biZJzEjs7o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/C6t4Vjudpz0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/8118535085118907748/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/11/java-groovy-and-javascript-compatible.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/8118535085118907748?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/8118535085118907748?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/C6t4Vjudpz0/java-groovy-and-javascript-compatible.html" title="Java, Groovy and Javascript compatible coding library" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/11/java-groovy-and-javascript-compatible.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UFSHw_eyp7ImA9WhdUGUw.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-6275260912868625602</id><published>2011-10-06T10:26:00.002-04:00</published><updated>2011-10-06T10:26:59.243-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-06T10:26:59.243-04:00</app:edited><title>Jetty session clustering with Redis</title><content type="html">&lt;a href="http://www.ovea.com/"&gt;Ovea&lt;/a&gt;'s implementation of &lt;a href="https://github.com/Ovea/jetty-session-redis"&gt;Jetty Session Clustering based on Redis&lt;/a&gt; has been updated to Jetty 8 releases in september. It is available in Maven repository at:&lt;br /&gt;
&lt;a href="http://repo1.maven.org/maven2/com/ovea/jetty-session-redis/2.0.rc1/"&gt;http://repo1.maven.org/maven2/com/ovea/jetty-session-redis/2.0.rc1/&lt;/a&gt;&lt;br /&gt;
The main advantage of using Redis is that Redis is a volatile in-memory storage enabling expiration on entries plus atomic operations. It is also very fast.&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-6275260912868625602?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/iQqYOjHoQM7jPlAM-nesV0tBM6I/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iQqYOjHoQM7jPlAM-nesV0tBM6I/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/iQqYOjHoQM7jPlAM-nesV0tBM6I/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iQqYOjHoQM7jPlAM-nesV0tBM6I/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/hugGy7rmLV0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/6275260912868625602/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/10/jetty-session-clustering-with-redis.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/6275260912868625602?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/6275260912868625602?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/hugGy7rmLV0/jetty-session-clustering-with-redis.html" title="Jetty session clustering with Redis" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/10/jetty-session-clustering-with-redis.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAHRXY8fCp7ImA9WhdUGUw.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-1851025021994321169</id><published>2011-10-06T10:18:00.003-04:00</published><updated>2011-10-06T10:18:54.874-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-06T10:18:54.874-04:00</app:edited><title>Reverse-Ajax part 5</title><content type="html">The last article on Reverse-Ajax has already been published on IBM Developer Works.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.ibm.com/developerworks/web/library/wa-reverseajax5/index.html"&gt;Reverse-Ajax part 5&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
It talks about Event-Driven Web development. &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-1851025021994321169?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JQ-eaxLA4IkDl9TOmb3aRhANYmw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JQ-eaxLA4IkDl9TOmb3aRhANYmw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JQ-eaxLA4IkDl9TOmb3aRhANYmw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JQ-eaxLA4IkDl9TOmb3aRhANYmw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/UdwbjsiL0SQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/1851025021994321169/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/10/reverse-ajax-part-5.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/1851025021994321169?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/1851025021994321169?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/UdwbjsiL0SQ/reverse-ajax-part-5.html" title="Reverse-Ajax part 5" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/10/reverse-ajax-part-5.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQERnk-eSp7ImA9WhdUEEQ.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-7219794451532225917</id><published>2011-09-27T00:21:00.001-04:00</published><updated>2011-09-27T00:21:47.751-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-27T00:21:47.751-04:00</app:edited><title>Direct Star TV</title><content type="html">&lt;pre wrap=""&gt;Particularly these days, when everyone seems obsessed with procuring the very best programming technologies available, the benefits of satellite television packages have been publicized to a great extent. However, many people also worry that they will be forfeiting certain services if they switch to satellite. For example, some think that satellite service is less reliable than cable, or that they will have less access to local channels without a basic cable package. Fortunately, neither of these concerns is very valid, as you will be able to tell with just a little bit of research on different satellite programming packages.

To begin with, you will find that Satellite companies actually offer packages that are uniquely catered to different regions. For example, depending on where you live or where you need television service, just run a simple search such as “&lt;a href="http://www.directstartv.com/localchannels/Arizona/Y/Yuma/"&gt;Yuma Cable”&lt;/a&gt; or “Satellite in Philadelphia,” etc. You will find that not only are there packages available that extend your range of channels while also allowing you to keep your local channels; you will also be provided with free installation from an employee of the company that you choose to get your service from. Essentially, this means that when you start with your new television package, you will have exactly what you already have, plus the addition of potentially hundreds of new channels.

You will also find that a satellite television package offers you access to special deals, and special channels. For instance, if you are a football fan looking to catch absolutely all of the action this season, you may want to look into features such as “Sunday NFL Ticket,” which literally brings you every game throughout the season. Or, if you are more interested in movies and television, you should probably consider upgrading to gain access to channels such as Cinemax and HBO, both of which have reputations for providing extremely high quality entertainment. Whatever your interest may be, a satellite television company will be able to offer you multiple ways of tapping into your favorite aspects of television watching.

Furthermore, you will probably find that the clarity and consistency of your satellite signal is flawless. While many people like to argue about the differences in these factors with regard to cable and satellite, the fact is that both are fairly advanced at this point, and should bring you a high quality picture all of the time. So, if you simply want to enjoy your connection with increased programming options, it might be the right decision for you to switch to a satellite provider some time soon.&lt;/pre&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-7219794451532225917?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ocrbesLmHreHRIMr1ZWZD-WnXqE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ocrbesLmHreHRIMr1ZWZD-WnXqE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ocrbesLmHreHRIMr1ZWZD-WnXqE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ocrbesLmHreHRIMr1ZWZD-WnXqE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/QbVYNfwkgHM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/7219794451532225917/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/09/direct-star-tv.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/7219794451532225917?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/7219794451532225917?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/QbVYNfwkgHM/direct-star-tv.html" title="Direct Star TV" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/09/direct-star-tv.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUNSHozcCp7ImA9WhdWGEg.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-1685950725577423334</id><published>2011-09-12T14:47:00.000-04:00</published><updated>2011-09-12T15:04:59.488-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-12T15:04:59.488-04:00</app:edited><title>Stream and Process Pipes and Socket Tunnels</title><content type="html">When communicating over sockets and processes we often have to create pipes to connect streams. The code is quite difficult to write since it's a combination of threads, synchronization, exception handling, locks, ..&lt;br /&gt;
We developed at Ovea a library to facilitate piping streams, processes and also creating socket tunnels.&lt;br /&gt;
The usage is really simple:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Stream Pipes&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:java"&gt;
// create a pipe
Pipe pipe = Pipes.create(&amp;quot;optional  pipe name&amp;quot;, myInputStream, myOutputStream).listenedBy(myOptionalPipeListener);

// get the connection handle
PipeConnection connection = pipe.connect();

// then you can do
connection.await();
connection.await(1, SECONDS);
connection.interrupt();
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Process Pipes&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:java"&gt;
ProcessPipe pipe = Pipes.pipe(
        new ProcessBuilder(&amp;quot;ls&amp;quot;, &amp;quot;-al&amp;quot;, &amp;quot;/workspace/ovea/project/pipe/src&amp;quot;).start(),
        new ProcessBuilder(&amp;quot;cut&amp;quot;, &amp;quot;-c&amp;quot;, &amp;quot;50-&amp;quot;).start(),
        new ProcessBuilder(&amp;quot;grep&amp;quot;, &amp;quot;-v&amp;quot;, &amp;quot;-E&amp;quot;, &amp;quot;&amp;quot;^\.\.?$&amp;quot;&amp;quot;).start());
Pipes.connect(&amp;quot;out&amp;quot;, pipe.getInputStream(), System.out);
Pipes.connect(&amp;quot;err&amp;quot;, pipe.getErrorStream(), System.err);
int retCode = pipe.waitFor();
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Socket Tunnels&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:java"&gt;
Socket socket1 = new Socket(&amp;quot;localhost&amp;quot;, 2000);
Socket socket2 = new Socket(&amp;quot;localhost&amp;quot;, 2222);
Tunnel tunnel = Tunnel.connect(socket1, socket2, new TunnelListener() {
    @Override
    public void onConnect(Tunnel tunnel) {
        System.out.println(&amp;quot;onConnect - &amp;quot; + tunnel);
    }

    @Override
    public void onClose(Tunnel tunnel) {
        System.out.println(&amp;quot;onClose - &amp;quot; + tunnel);
    }

    @Override
    public void onBroken(Tunnel tunnel, BrokenTunnelException e) {
        System.out.println(&amp;quot;onBroken - &amp;quot; + tunnel);
    }

    @Override
    public void onInterrupt(Tunnel tunnel) {
        System.out.println(&amp;quot;onInterrupt - &amp;quot; + tunnel);
    }
});
&lt;/pre&gt;
&lt;br /&gt;
The &lt;b&gt;Maven&lt;/b&gt; Dependency has been deployed:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:xml"&gt;
&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;com.ovea&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;ovea-pipe&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.0.ga&amp;lt;/version&amp;gt;
    &amp;lt;optional&amp;gt;true&amp;lt;/optional&amp;gt;
&amp;lt;/dependency&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
=&amp;gt; &lt;a href="https://github.com/Ovea/pipe"&gt;Ovea Pipe on GitHub&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-1685950725577423334?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/I_u5pdkPM1r0ljzfQ1cHMEzBVRE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/I_u5pdkPM1r0ljzfQ1cHMEzBVRE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/I_u5pdkPM1r0ljzfQ1cHMEzBVRE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/I_u5pdkPM1r0ljzfQ1cHMEzBVRE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/Q6hYIMWks4Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/1685950725577423334/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/09/stream-and-process-pipes-and-socket.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/1685950725577423334?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/1685950725577423334?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/Q6hYIMWks4Q/stream-and-process-pipes-and-socket.html" title="Stream and Process Pipes and Socket Tunnels" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.mycila.com/2011/09/stream-and-process-pipes-and-socket.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcNQ3Y5fyp7ImA9WhdWFko.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-5428224407555050726</id><published>2011-09-10T13:01:00.000-04:00</published><updated>2011-09-10T13:01:32.827-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-10T13:01:32.827-04:00</app:edited><title>Mycila Junit</title><content type="html">I've updated mycila-junit to lastest Junit version (4.9). This projects include all the ConcurrentJunitRunner and ConcurrentRule desribed in my previous blog posts at &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://blog.mycila.com/search/label/junit"&gt;http://blog.mycila.com/search/label/junit&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The library is released and will be available on Maven Repository in 2-3 days at&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://repo1.maven.org/maven2/com/mycila/mycila-junit/"&gt;http://repo1.maven.org/maven2/com/mycila/mycila-junit/ &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;You can take version 1.1.ga for Junit 4.9 and above.&lt;br /&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-5428224407555050726?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/M3kol30uWBDOb2DxZsd0oqoG88c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/M3kol30uWBDOb2DxZsd0oqoG88c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/M3kol30uWBDOb2DxZsd0oqoG88c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/M3kol30uWBDOb2DxZsd0oqoG88c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/vt6BWWAMc50" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/5428224407555050726/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/09/mycila-junit.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/5428224407555050726?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/5428224407555050726?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/vt6BWWAMc50/mycila-junit.html" title="Mycila Junit" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/09/mycila-junit.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QHSXczfCp7ImA9WhdWE04.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-1753174168764022999</id><published>2011-09-06T16:02:00.000-04:00</published><updated>2011-09-06T16:02:18.984-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-06T16:02:18.984-04:00</app:edited><title>Reverse-Ajax part 3 &amp; 4</title><content type="html">My next articles on Reverse-Ajax are available on IBM Developer Works.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.ibm.com/developerworks/web/library/wa-reverseajax3/index.html"&gt;Reverse-Ajax part 3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ibm.com/developerworks/web/library/wa-reverseajax4/index.html"&gt;Reverse-Ajax part 4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-1753174168764022999?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_lvoB3R6vs5hJBuUf5TZpCf9H70/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_lvoB3R6vs5hJBuUf5TZpCf9H70/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_lvoB3R6vs5hJBuUf5TZpCf9H70/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_lvoB3R6vs5hJBuUf5TZpCf9H70/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/lp9XN5J8ijI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/1753174168764022999/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/09/reverse-ajax-part-3-4.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/1753174168764022999?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/1753174168764022999?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/lp9XN5J8ijI/reverse-ajax-part-3-4.html" title="Reverse-Ajax part 3 &amp; 4" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/09/reverse-ajax-part-3-4.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUQCSXk-eCp7ImA9WhdQFEg.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-402233720671525217</id><published>2011-08-15T20:08:00.001-04:00</published><updated>2011-08-15T20:09:28.750-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-15T20:09:28.750-04:00</app:edited><title>Subversion recursive update with Java 7 Fork/Join</title><content type="html">Some time ago I've developed a little bash script called &lt;a href="http://blog.mycila.com/2009/07/recursive-svn-update.html"&gt;svn-recursive-update&lt;/a&gt; to update recursively projects given a root directory.&lt;br /&gt;
&lt;br /&gt;
I've rewritten it yesterday in Groovy (thus the script now works in any plateform) using the new Java 7 Concurrent feature: the Fork/Join framework. The Fork/Join concurrency API is really suited when you have a task that you can divide in 2 or more tasks recursively and when you don't necessary know when the processing will finish.&lt;br /&gt;
&lt;br /&gt;
Since our tool scan all folders, sub-folders and so on to find Subversion projects, we have an updater task calling itself for each sub-folder.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:groovy"&gt;class Updater extends RecursiveAction {
    File dir
    Updater(File dir) {this.dir = dir}
    protected void compute() {
        if (dir.isDirectory()) {
            if (new File(dir, '.svn').exists()) {
                // do svn update
            } else {
                def tasks = dir.listFiles({dir.isDirectory()} as FileFilter).collect({new Updater(it)})
                if (tasks) invokeAll(tasks)
            }
        }
    }
}&lt;/pre&gt;
&lt;br /&gt;
The recursive task can then be started within a thread pool like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:groovy"&gt;ForkJoinPool pool = new ForkJoinPool(cpus);
pool.invoke(new Updater(root));&lt;/pre&gt;
&lt;br /&gt;
You can find the complete groovy code of &lt;a href="https://gist.github.com/1148180"&gt;svnup.groovy&lt;/a&gt; in Gist. Just put this file in your bin directory and run it from any folder.
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-402233720671525217?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/QWNDYffyOcecEVhD7B1-2897CD8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QWNDYffyOcecEVhD7B1-2897CD8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/QWNDYffyOcecEVhD7B1-2897CD8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QWNDYffyOcecEVhD7B1-2897CD8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/HozSzZgNq4A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/402233720671525217/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/08/subversion-recursive-update-with-java-7.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/402233720671525217?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/402233720671525217?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/HozSzZgNq4A/subversion-recursive-update-with-java-7.html" title="Subversion recursive update with Java 7 Fork/Join" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/08/subversion-recursive-update-with-java-7.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQCRngyeyp7ImA9WhdREEk.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-3686831840915174510</id><published>2011-07-30T12:12:00.001-04:00</published><updated>2011-07-30T12:12:47.693-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-30T12:12:47.693-04:00</app:edited><title>Reverse-Ajax Part 2</title><content type="html">Part 2 of the Reverse-Ajax series I write is online at&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.ibm.com/developerworks/web/library/wa-reverseajax2/index.html"&gt;http://www.ibm.com/developerworks/web/library/wa-reverseajax2/index.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-3686831840915174510?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3_xPB9L-YFCwEnBfec8ioIC4HF8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3_xPB9L-YFCwEnBfec8ioIC4HF8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/3_xPB9L-YFCwEnBfec8ioIC4HF8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3_xPB9L-YFCwEnBfec8ioIC4HF8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/mPFZEUOlLwo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/3686831840915174510/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/07/reverse-ajax-part-2.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/3686831840915174510?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/3686831840915174510?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/mPFZEUOlLwo/reverse-ajax-part-2.html" title="Reverse-Ajax Part 2" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/07/reverse-ajax-part-2.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEADRHoyfSp7ImA9WhRTFkU.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-6046252379299734979</id><published>2011-07-29T20:15:00.010-04:00</published><updated>2011-11-07T11:19:35.495-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-07T11:19:35.495-05:00</app:edited><title>JQuery CORS plugin</title><content type="html">When working with web applications spread onto several subdomains or different domains, accessing resources in Ajax or even doing &lt;a href="http://blog.mycila.com/2011/03/reverse-ajax-techniques-and-libraries.html"&gt;Reverse-Ajax&lt;/a&gt; can really be difficult.&lt;br /&gt;
&lt;br /&gt;
Hopefully, the &lt;a href="http://www.nczonline.net/blog/2010/05/25/cross-domain-ajax-with-cross-origin-resource-sharing/"&gt;Cross-Origin Resource Sharing&lt;/a&gt; (CORS) specification is there to allow Ajax request to be sent from a domain to another domain, and even working with cookies.&lt;br /&gt;
&lt;br /&gt;
With jQuery, IE8+ is not supported because it used another separate object called &lt;a href="http://msdn.microsoft.com/en-us/library/cc288060%28v=vs.85%29.aspx"&gt;XDomainRequest&lt;/a&gt;. Thus, several plugins can be found to add a complete CORS support with jQuery. Amongst them we have:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="http://saltybeagle.com/2009/09/cross-origin-resource-sharing-demo/"&gt;This one&lt;/a&gt; or &lt;a href="http://plugins.jquery.com/files/jquery.cors.js.txt"&gt;this one&lt;/a&gt;, which provide their own API around jQuery code&lt;/li&gt;
&lt;li&gt; &lt;a href="http://stackoverflow.com/questions/3385404/ie8-xss-jquery-problem"&gt;This one&lt;/a&gt; which overrides some jQuery methods.&lt;/li&gt;
&lt;/ol&gt;
At &lt;a href="http://www.ovea.com/"&gt;Ovea&lt;/a&gt;, we were in the case with an existing application and we could not use solutions 1 because we cannot change our code, and we do not have any control olver third party libraries doing Ajax calls, and we cannot use solution 2 because we are using a lot of more methods other than &lt;i&gt;$.get&lt;/i&gt; and &lt;i&gt;$.post&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
Thus, we developed a working jQuery CORS plugin which &lt;b&gt;transparently&lt;/b&gt; add CORS support, even in IE8+. for this, we used &lt;i&gt;&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ajaxSettings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;/i&gt;&lt;span class="nx"&gt;&lt;i&gt;xhr&lt;/i&gt; to redefine the way Ajax request implementations are created.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="nx"&gt;Microsoft's XDomainRequest does not allow cookies to be passed in the headers. So we needed to rewrite the requests to add support for a potential session cookie in the url directly. This allows the web server to correctly found the session on server-side.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;span class="nx"&gt;http://server/path&lt;b&gt;;jsessionid=XYZ&lt;/b&gt;?name-value;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class="nx"&gt;The usage is really simple. After adding the jQuery Javascript in your page, add the &lt;a href="https://gist.github.com/1114981"&gt;jquery.xdomain.js&lt;/a&gt; file. If your session cookie is not called JSESSION_ID, you can change the value like this:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:js"&gt;&amp;lt;script src="path/to/jquery.js" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt;
    window.SESSION_COOKIE_NAME = 'ID';
&amp;lt;/script&amp;gt;
&amp;lt;script src="path/to/jquery.xdomain.js" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span class="nx"&gt;&lt;/span&gt;That's all !&lt;br /&gt;
&lt;br /&gt;
Code source of the &lt;a href="https://gist.github.com/1114981"&gt;jQuery CORS Plugin&lt;/a&gt; on GIST.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;If have any comments or bugs, please use the comment thread on the GIST page.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-6046252379299734979?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rubD4TSEAnwyxW5B5NOP6eGkp2o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rubD4TSEAnwyxW5B5NOP6eGkp2o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rubD4TSEAnwyxW5B5NOP6eGkp2o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rubD4TSEAnwyxW5B5NOP6eGkp2o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/4maEYdUk0TI" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/6046252379299734979?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/6046252379299734979?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/4maEYdUk0TI/jquery-cors-plugin.html" title="JQuery CORS plugin" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><feedburner:origLink>http://blog.mycila.com/2011/07/jquery-cors-plugin.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQBQ3gzeip7ImA9WhdSEU0.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-6743152914037637978</id><published>2011-07-19T16:12:00.004-04:00</published><updated>2011-07-19T16:12:32.682-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-19T16:12:32.682-04:00</app:edited><title>Reverse-Ajax, Part1</title><content type="html">My first article of a 5-articles series is alive on IBM Developer Works at:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.ibm.com/developerworks/web/library/wa-reverseajax1/index.html"&gt;http://www.ibm.com/developerworks/web/library/wa-reverseajax1/index.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-6743152914037637978?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/e6WNJyXg8JUJpF-4LxAyArMW2sw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/e6WNJyXg8JUJpF-4LxAyArMW2sw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/e6WNJyXg8JUJpF-4LxAyArMW2sw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/e6WNJyXg8JUJpF-4LxAyArMW2sw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/OPZ2S3S1YTI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/6743152914037637978/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/07/reverse-ajax-part1.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/6743152914037637978?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/6743152914037637978?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/OPZ2S3S1YTI/reverse-ajax-part1.html" title="Reverse-Ajax, Part1" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/07/reverse-ajax-part1.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUcGSXYzfyp7ImA9WhdTFUU.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-5821013161183266125</id><published>2011-07-13T15:53:00.005-04:00</published><updated>2011-07-13T15:57:08.887-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-13T15:57:08.887-04:00</app:edited><title>Ovea's CometD contributions</title><content type="html">We released yesterday version 1.1.ga of cometd-contrib. &lt;a href="https://github.com/Ovea/cometd-contrib"&gt;CometD Contrib&lt;/a&gt; is an extension to &lt;a href="http://cometd.org/"&gt;CometD&lt;/a&gt; which provide additional features:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://code.google.com/p/google-guice/"&gt;Goole Guice&lt;/a&gt; integration &lt;/li&gt;
&lt;li&gt;WebSocket support for &lt;a href="http://www.eclipse.org/jetty/"&gt;Jetty&lt;/a&gt; 8.0.0.M3&lt;/li&gt;
&lt;li&gt;Custom and J2ee security policies&lt;/li&gt;
&lt;/ul&gt;Version 1.0.ga supports Jetty 8.0.0.M2.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;GitHub:&lt;/b&gt;&lt;br /&gt;
&lt;a href="https://github.com/Ovea/cometd-contrib"&gt;https://github.com/Ovea/cometd-contrib&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Maven dependency:&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:xml"&gt;&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;com.ovea&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;ovea-cometd-contrib&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.1.ga&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;Sample:&lt;/b&gt;&lt;br /&gt;
You can find an example of a web application using Guice and CometD plus &lt;a href="http://ovea.com/"&gt;Ovea&lt;/a&gt;'s extensions in the &lt;a href="https://github.com/Ovea/js-eventbus"&gt;JS-EventBus&lt;/a&gt; project in &lt;a href="https://github.com/Ovea"&gt;Ovea'GitHub&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-5821013161183266125?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4F0ojFmdebE-56JW8T3Jw4Xh5eA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4F0ojFmdebE-56JW8T3Jw4Xh5eA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4F0ojFmdebE-56JW8T3Jw4Xh5eA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4F0ojFmdebE-56JW8T3Jw4Xh5eA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/MFoo6wPkTPs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/5821013161183266125/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/07/oveas-cometd-contributions.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/5821013161183266125?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/5821013161183266125?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/MFoo6wPkTPs/oveas-cometd-contributions.html" title="Ovea's CometD contributions" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/07/oveas-cometd-contributions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0IBSXg7eCp7ImA9WhZbEks.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-2088584977267087176</id><published>2011-06-16T17:59:00.000-04:00</published><updated>2011-06-16T17:59:18.600-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-16T17:59:18.600-04:00</app:edited><title>CLEAR 4G Internet Customer Reviews</title><content type="html">As you have no doubt noticed, wireless internet is becoming so widespread that seemingly everybody is connecting online from all kinds of places. People freely use their laptops in cafes, their smart tablets in offices and bookstores, and even their smart phones outside in parks or at ballgames. All of these are examples of the luxurious convenience offered by wireless internet technology. However, did you know that wireless internet is not just available through these devices and the companies that manufacture them? Many people tend to think that companies like Verizon or AT&amp;T are the only ones that provide wireless internet service, simply because these are the companies through which many people purchase their smart phones or cellular service. This is not the case; actually, there are also companies, such as Clear Wireless, that serve the sole purpose of providing you with wireless internet at reliable speeds and competitive prices. For more information and customer reviews on such a company, try looking up &lt;a href="http://www.clearwirelessinternet.com/clear-internet-reviews.html"&gt;Clear internet reviews&lt;/a&gt; to see what people have to say about their service. You can also look up specific comparison charts and comments that discuss the pros and cons of different wireless service providers. &lt;br/&gt;&lt;br /&gt;
If you are looking to switch wireless providers, or even if you are getting connected for the first time, you can find service from some providers as low as about $35 per month. Once you purchase the service, you will be sent a wireless router for your home, as well as a USB modem that you can plug into your laptop or smart tablet. This means that, first of all, your home can receive wireless service from the included router, meaning that even in your home you will no longer have to mess with chords and phone connections to get online, and you will not have to purchase an additional home wireless system. Second, with the USB modem, you will be able to get online from just about anywhere outside of your home, just the way that you see so many people do it these days. Just plug in the modem, and you will have instant access to your 4G network, allowing you to surf the Internet, send and receive emails, watch videos, and do anything else you would normally do online at the quick&lt;br /&gt;
 est speeds and with the clearest signal. Some companies even offer 4G/3G combination packages, which allow you even more certainty that you will remain connected no matter where you go, as your device will automatically pick up the nearest 4G or 3G signal. Because of these and many other benefits, it is worth researching wireless providers to find out which one might be best for you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-2088584977267087176?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-Ys4BD5S-ERA4m3aHmedv3z6zBQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-Ys4BD5S-ERA4m3aHmedv3z6zBQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-Ys4BD5S-ERA4m3aHmedv3z6zBQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-Ys4BD5S-ERA4m3aHmedv3z6zBQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/_-FkYl3x4QE" height="1" width="1"/&gt;</content><link rel="related" href="http://www.clearwirelessinternet.com/clear-internet-reviews.html" title="CLEAR 4G Internet Customer Reviews" /><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/2088584977267087176/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/06/clear-4g-internet-customer-reviews.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/2088584977267087176?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/2088584977267087176?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/_-FkYl3x4QE/clear-4g-internet-customer-reviews.html" title="CLEAR 4G Internet Customer Reviews" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://blog.mycila.com/2011/06/clear-4g-internet-customer-reviews.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYER307fyp7ImA9WhZbEUU.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-116073389207713536</id><published>2011-06-15T20:22:00.001-04:00</published><updated>2011-06-15T20:28:26.307-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-15T20:28:26.307-04:00</app:edited><title>Not dead</title><content type="html">It's been a while since I did't post anything ! I'm not dead - just very busy :-)&lt;br /&gt;
&lt;br /&gt;
I'm working on two interesting projects enveloped with no Web Framework: just plain REST services, HTML 5 pages and Javascript. I am focusing on the event-driven part (either on client-side and server-side). We are using JMS, &lt;a href="http://cometd.org/"&gt;CometD&lt;/a&gt;, &lt;a href="http://redis.io/"&gt;Redis&lt;/a&gt; (mainly for session clustering in Jetty), and developing for desktop and mobile platforms.&lt;br /&gt;
&lt;br /&gt;
We also contribute a lot in Open-Source: all the bricks we are using are available into &lt;a href="http://ovea.com/"&gt;Ovea&lt;/a&gt;'s &lt;a href="https://github.com/Ovea"&gt;GitHub&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
We've developed a CometD extension to use CometD bayeux in a Webapp powered by Google Guice and its Guice Servlet extension. We hope to release the module soon. It is currently in our &lt;a href="https://github.com/Ovea/cometd-fork"&gt;CometD fork&lt;/a&gt; in Ovea's GitHub.&lt;br /&gt;
&lt;br /&gt;
Here are some projects we've been very active in:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;CometD fork: &lt;a href="https://github.com/Ovea/cometd-fork"&gt;https://github.com/Ovea/cometd-fork&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Client-side EventBus and Remote bridge with CometD, and also Guice with CometD sample: &lt;a href="https://github.com/Ovea/js-eventbus"&gt;https://github.com/Ovea/js-eventbus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Web resource management: &lt;a href="https://github.com/Ovea/virtual-resources"&gt;https://github.com/Ovea/virtual-resources&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Synchronize async events: &lt;a href="https://github.com/Ovea/js-sync"&gt;https://github.com/Ovea/js-sync&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Session clustering with Redis and Jetty: &lt;a href="https://github.com/Ovea/jetty-session-redis"&gt;https://github.com/Ovea/jetty-session-redis&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;In my little spare time, I am also currently writing a series of 5 articles on Reverse-Ajax techniques for &lt;a href="http://www.ibm.com/developerworks/"&gt;IBM Developer Network&lt;/a&gt;. Keep in touch ! There will also be an insight of Event-Driven web development and some how-to and samples so that Reverse-Ajax techniques has no more secret for you !&lt;br /&gt;
&lt;ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-116073389207713536?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/hFWIu9MiYXDjhOHbRzXczGxghE0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hFWIu9MiYXDjhOHbRzXczGxghE0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/hFWIu9MiYXDjhOHbRzXczGxghE0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hFWIu9MiYXDjhOHbRzXczGxghE0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/HLehobw0C84" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/116073389207713536/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/06/not-dead.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/116073389207713536?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/116073389207713536?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/HLehobw0C84/not-dead.html" title="Not dead" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/06/not-dead.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUcBRXszcCp7ImA9WhZQEks.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-1092955381937996993</id><published>2011-04-19T22:36:00.001-04:00</published><updated>2011-04-19T22:37:34.588-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-19T22:37:34.588-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="websocket" /><category scheme="http://www.blogger.com/atom/ns#" term="eventbus" /><category scheme="http://www.blogger.com/atom/ns#" term="syncasync" /><category scheme="http://www.blogger.com/atom/ns#" term="event-driven" /><title>Synchronize asynchronous unordered events in JavaScript</title><content type="html">At &lt;a href="https://github.com/Ovea"&gt;Ovea&lt;/a&gt;, we are developing web applications in an Event-Driven way by using an asynchronous communication library plus an local/remote &lt;a href="https://github.com/Ovea/js-eventbus"&gt;EventBus&lt;/a&gt; system we open-sourced.&lt;br /&gt;
&lt;br /&gt;
The EventBus system enables components to publish and subscribe to events like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;bus.topic('/event/dom/loaded').subscribe(function() {
    // dom loaded
});
bus.topic('/event/member/loaded').subscribe(function(member) {
    // member loaded
});
bus.topic('/event/page/changed').subscribe(function() {
    // page changed
});&lt;/pre&gt;&lt;br /&gt;
Also, we have the usual DOM events, like:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#save-info').click(function(e) {
    // button clicked
    return false;
});&lt;/pre&gt;&lt;br /&gt;
when you are working in a component way client-side, components are totally independent and communicate through the Event Bus system. You often need to trigger or do some actions when two or more events have all occurred.&lt;br /&gt;
&lt;br /&gt;
In example, you might need to redraw the UI when the DOM is loaded and when the save-info button has been clicked and when the event '/event/member/loaded' is sent.&lt;br /&gt;
&lt;br /&gt;
With &lt;a href="https://github.com/Ovea/js-sync"&gt;SyncAsync&lt;/a&gt; you can do that, and more ! This is a library that can be used to synchronize asynchronous events and trigger some other.&lt;br /&gt;
&lt;br /&gt;
We can write:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var sync = new SyncAsync({
    name: 'test-to-redraw-ui',
    trigger: 'each'
});

jQuery.ready(sync.newCallback());
$('#save-info').click(sync.newCallback(false));
bus.topic('/event/member/loaded').subscribe(sync.newCallback());

sync.sync(function(domReady, save-info, memberLoaded) {
    // Function called when all events are resolved. The function receives all contexts and arguments of all callbacks
    // $ == domReady.arg[0]
    // e == save-info.arg[0] (jQuery event object received by the second callback)
    // Button 'save-info' == save-info.ctx
    // member == memberLoaded.arg[0] 
});&lt;/pre&gt;&lt;br /&gt;
The project is on GitHub at &lt;a href="https://github.com/Ovea/js-sync"&gt;https://github.com/Ovea/js-sync&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-1092955381937996993?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fEMc0PMAEp8yGu76XGBs-aSe6u4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fEMc0PMAEp8yGu76XGBs-aSe6u4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fEMc0PMAEp8yGu76XGBs-aSe6u4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fEMc0PMAEp8yGu76XGBs-aSe6u4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/GHinUc1wgAA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/1092955381937996993/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/04/synchronize-asynchronous-unordered.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/1092955381937996993?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/1092955381937996993?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/GHinUc1wgAA/synchronize-asynchronous-unordered.html" title="Synchronize asynchronous unordered events in JavaScript" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/04/synchronize-asynchronous-unordered.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUMRno9fSp7ImA9WhZTFEg.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-8090477761012294178</id><published>2011-03-18T09:51:00.000-04:00</published><updated>2011-03-18T09:51:27.465-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-18T09:51:27.465-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="streaming" /><category scheme="http://www.blogger.com/atom/ns#" term="websocket" /><category scheme="http://www.blogger.com/atom/ns#" term="socketio" /><category scheme="http://www.blogger.com/atom/ns#" term="long-polling" /><category scheme="http://www.blogger.com/atom/ns#" term="jetty" /><category scheme="http://www.blogger.com/atom/ns#" term="piggyback" /><category scheme="http://www.blogger.com/atom/ns#" term="atmosphere" /><category scheme="http://www.blogger.com/atom/ns#" term="ajax" /><category scheme="http://www.blogger.com/atom/ns#" term="cometd" /><category scheme="http://www.blogger.com/atom/ns#" term="polling" /><category scheme="http://www.blogger.com/atom/ns#" term="reverse-ajax" /><title>Reverse-Ajax techniques and libraries</title><content type="html">Conference I gave at &lt;a href="http://www.montreal-jug.org/"&gt;Montreal JUG&lt;/a&gt; Thursday March 17th 2011 on Reverse-Ajax techniques and libraries. Samples are available at &lt;a href="https://github.com/Ovea"&gt;Ovea's GitHub&lt;/a&gt; (links are on the slides).&lt;br /&gt;
&lt;center&gt;&lt;div style="width:425px" id="__ss_7306295"&gt;&lt;strong style="display:block;margin:12px 0 4px"&gt;&lt;a href="http://www.slideshare.net/mathieucarbou/reverse-ajax" title="Reverse Ajax"&gt;Reverse Ajax&lt;/a&gt;&lt;/strong&gt; &lt;object id="__sse7306295" width="425" height="355"&gt; &lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=reverse-ajax-110318081845-phpapp01&amp;stripped_title=reverse-ajax&amp;userName=mathieucarbou" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed name="__sse7306295" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=reverse-ajax-110318081845-phpapp01&amp;stripped_title=reverse-ajax&amp;userName=mathieucarbou" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt; &lt;/object&gt; &lt;div style="padding:5px 0 12px"&gt;View more &lt;a href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a href="http://www.slideshare.net/mathieucarbou"&gt;Mathieu Carbou&lt;/a&gt; &lt;/div&gt;&lt;/div&gt;&lt;/center&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-8090477761012294178?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZvQoITzrhQKix_qwovzKx_75HME/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZvQoITzrhQKix_qwovzKx_75HME/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ZvQoITzrhQKix_qwovzKx_75HME/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZvQoITzrhQKix_qwovzKx_75HME/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/JEJ8iO0s9Pw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/8090477761012294178/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/03/reverse-ajax-techniques-and-libraries.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/8090477761012294178?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/8090477761012294178?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/JEJ8iO0s9Pw/reverse-ajax-techniques-and-libraries.html" title="Reverse-Ajax techniques and libraries" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.mycila.com/2011/03/reverse-ajax-techniques-and-libraries.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYCSHw8cSp7ImA9Wx9aGEw.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-5264782810800060771</id><published>2011-03-10T22:12:00.000-05:00</published><updated>2011-03-10T22:12:49.279-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-10T22:12:49.279-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jetty" /><category scheme="http://www.blogger.com/atom/ns#" term="clustering" /><category scheme="http://www.blogger.com/atom/ns#" term="redis" /><title>Jetty Session Clustering with Redis - Released !</title><content type="html">We've released the first version of the "&lt;a href="http://blog.mycila.com/2011/02/jetty-session-clustering-with-redis.html"&gt;Jetty Session Clustering with Redis&lt;/a&gt;" plugin. It works very well :-)&lt;br /&gt;
&lt;br /&gt;
Downloads: &lt;a href="https://github.com/Ovea/jetty-session-redis/downloads"&gt;https://github.com/Ovea/jetty-session-redis/downloads&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-5264782810800060771?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DXWBQk9ki6SvWFzVx_7ENe_rYic/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DXWBQk9ki6SvWFzVx_7ENe_rYic/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DXWBQk9ki6SvWFzVx_7ENe_rYic/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DXWBQk9ki6SvWFzVx_7ENe_rYic/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/jEwFpM83L_s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/5264782810800060771/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/03/jetty-session-clustering-with-redis.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/5264782810800060771?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/5264782810800060771?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/jEwFpM83L_s/jetty-session-clustering-with-redis.html" title="Jetty Session Clustering with Redis - Released !" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/03/jetty-session-clustering-with-redis.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4CR3k8fyp7ImA9Wx9aF0U.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-8631723892029690159</id><published>2011-03-10T15:28:00.001-05:00</published><updated>2011-03-10T15:29:26.777-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-10T15:29:26.777-05:00</app:edited><title>Do we still need a web framework ?</title><content type="html">here are the slides of the conference I gave yesterday at &lt;a href="http://confoo.ca"&gt;Confoo.ca&lt;/a&gt;&lt;br /&gt;
&lt;center&gt;&lt;div style="width:425px" id="__ss_7222983"&gt;&lt;strong style="display:block;margin:12px 0 4px"&gt;&lt;a href="http://www.slideshare.net/mathieucarbou/do-we-still-need-a-web-framework" title="Do we still need a web framework ?"&gt;Do we still need a web framework ?&lt;/a&gt;&lt;/strong&gt;&lt;object id="__sse7222983" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=webframeworks-110310142435-phpapp01&amp;stripped_title=do-we-still-need-a-web-framework&amp;userName=mathieucarbou" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed name="__sse7222983" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=webframeworks-110310142435-phpapp01&amp;stripped_title=do-we-still-need-a-web-framework&amp;userName=mathieucarbou" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="padding:5px 0 12px"&gt;View more &lt;a href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a href="http://www.slideshare.net/mathieucarbou"&gt;Mathieu Carbou&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;/center&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-8631723892029690159?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mc_hHWyabtyAgMDmMrnxVSljAkw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mc_hHWyabtyAgMDmMrnxVSljAkw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mc_hHWyabtyAgMDmMrnxVSljAkw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mc_hHWyabtyAgMDmMrnxVSljAkw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/MAEqxlHYap8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/8631723892029690159/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/03/do-we-still-need-web-framework.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/8631723892029690159?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/8631723892029690159?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/MAEqxlHYap8/do-we-still-need-web-framework.html" title="Do we still need a web framework ?" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.mycila.com/2011/03/do-we-still-need-web-framework.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE4FQXk8fSp7ImA9Wx9aEUU.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-72536525548210520</id><published>2011-03-03T15:06:00.001-05:00</published><updated>2011-03-03T15:08:30.775-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-03T15:08:30.775-05:00</app:edited><title>Confoo.ca next week !</title><content type="html">&lt;div class="separator" style="text-align: center;"&gt;&lt;a href="https://lh3.googleusercontent.com/-Gq_wnukakJg/TW_zbF73DQI/AAAAAAAAAgE/l1b17lB28ic/s1600/WebFrameworks.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="text-align: center;"&gt;&lt;a href="https://lh4.googleusercontent.com/-KWmyrRWPPfM/TW_0mWD3C-I/AAAAAAAAAgI/cUfbECZunZc/s1600/WebFrameworks.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="https://lh4.googleusercontent.com/-KWmyrRWPPfM/TW_0mWD3C-I/AAAAAAAAAgI/cUfbECZunZc/s320/WebFrameworks.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-72536525548210520?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/e7aACkGwTOGdbYItqjrDcDtTkFU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/e7aACkGwTOGdbYItqjrDcDtTkFU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/e7aACkGwTOGdbYItqjrDcDtTkFU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/e7aACkGwTOGdbYItqjrDcDtTkFU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/oN1JJabZ9n0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/72536525548210520/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/03/confooca-next-week.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/72536525548210520?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/72536525548210520?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/oN1JJabZ9n0/confooca-next-week.html" title="Confoo.ca next week !" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh4.googleusercontent.com/-KWmyrRWPPfM/TW_0mWD3C-I/AAAAAAAAAgI/cUfbECZunZc/s72-c/WebFrameworks.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/03/confooca-next-week.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8AQXk7cCp7ImA9Wx9bGU8.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-231271944042248440</id><published>2011-02-28T14:54:00.000-05:00</published><updated>2011-02-28T14:54:00.708-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-28T14:54:00.708-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jetty" /><category scheme="http://www.blogger.com/atom/ns#" term="nosql" /><category scheme="http://www.blogger.com/atom/ns#" term="redis" /><title>Jetty Session Clustering with Redis</title><content type="html">We've open-sourced this week at &lt;a href="http://ovea.com/"&gt;Ovea&lt;/a&gt; a Jetty plugin to add Session Clustering to &lt;a href="https://github.com/xetorthio/jedis"&gt;Jetty&lt;/a&gt; by using &lt;a href="http://redis.io/"&gt;Redis&lt;/a&gt;.&lt;br /&gt;
Redis is a high-performance No-Sql database which is commonly used for key-value storage, caching, ... Redis has a lot of interesting features such as transactions and publish/subscribe.&lt;br /&gt;
&lt;br /&gt;
The Jetty module &lt;b&gt;jetty-session-redis&lt;/b&gt; uses &lt;a href="https://github.com/xetorthio/jedis"&gt;Jedis&lt;/a&gt;, the Java client of Redis.&lt;br /&gt;
&lt;br /&gt;
The configuration is completely transparent for a Webapp since you only need to modify the jetty.xml server configuration plus de webapp context files.&lt;br /&gt;
&lt;br /&gt;
We have also implemented several &lt;b&gt;serializers&lt;/b&gt; for your session attributes:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;XStream&lt;/li&gt;
&lt;li&gt;JSON&lt;/li&gt;
&lt;li&gt;JBoss Serializer&lt;/li&gt;
&lt;li&gt;JDK Serializer&lt;/li&gt;
&lt;/ul&gt;You can also implement you own by implementing a the &lt;b&gt;Serializer&lt;/b&gt; interface. &lt;b&gt;Gzip&lt;/b&gt; compression is also supported to reduce the length of serialized objects.&lt;br /&gt;
&lt;br /&gt;
The project can be found at &lt;a href="https://github.com/Ovea/jetty-session-redis"&gt;https://github.com/Ovea/jetty-session-redis&lt;/a&gt;, with an extensive README file to help you for the setup. It is currently in snapshot state (we plan to release a beta soon). All comments and bugs are welcomed !&lt;br /&gt;
&lt;br /&gt;
We also plan to implement for higher performance an asynchronous save system and support Redis key/value based on bytes to improve performance.&lt;br /&gt;
&lt;br /&gt;
Mathieu.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-231271944042248440?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/qVrWb-goVaupujvRwmdJaeIE1xg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qVrWb-goVaupujvRwmdJaeIE1xg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/qVrWb-goVaupujvRwmdJaeIE1xg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qVrWb-goVaupujvRwmdJaeIE1xg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/b1y0B7IXNc0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/231271944042248440/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/02/jetty-session-clustering-with-redis.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/231271944042248440?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/231271944042248440?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/b1y0B7IXNc0/jetty-session-clustering-with-redis.html" title="Jetty Session Clustering with Redis" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/02/jetty-session-clustering-with-redis.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUQBSH89fyp7ImA9Wx9bEks.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-1339385476677348734</id><published>2011-02-20T23:40:00.001-05:00</published><updated>2011-02-20T23:42:39.167-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-20T23:42:39.167-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="conference" /><title>Future conference I'll give at Confoo.ca</title><content type="html">&lt;b&gt;Do we still need a web framework ???&lt;/b&gt;&lt;br /&gt;
&lt;a href="http://2.bp.blogspot.com/-8ilJ5utJQe0/TWHtBoEo3GI/AAAAAAAAAbQ/ravXIJlOvf8/s1600/Selection_001.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="299" width="400" src="http://2.bp.blogspot.com/-8ilJ5utJQe0/TWHtBoEo3GI/AAAAAAAAAbQ/ravXIJlOvf8/s400/Selection_001.png" /&gt;&lt;/a&gt;&lt;a href="http://confoo.ca/en/2011/session/as-t-on-encore-besoin-d-un-framework-web"&gt;&lt;br /&gt;
http://confoo.ca/en/2011/session/as-t-on-encore-besoin-d-un-framework-web&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-1339385476677348734?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rCvzWLJ6zrEluo9spBhQApEfD3Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rCvzWLJ6zrEluo9spBhQApEfD3Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rCvzWLJ6zrEluo9spBhQApEfD3Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rCvzWLJ6zrEluo9spBhQApEfD3Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/dYryg1nApRc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/1339385476677348734/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/02/future-conference-ill-give-at-confooca.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/1339385476677348734?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/1339385476677348734?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/dYryg1nApRc/future-conference-ill-give-at-confooca.html" title="Future conference I'll give at Confoo.ca" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-8ilJ5utJQe0/TWHtBoEo3GI/AAAAAAAAAbQ/ravXIJlOvf8/s72-c/Selection_001.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2011/02/future-conference-ill-give-at-confooca.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYBQn04eSp7ImA9Wx9UF00.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-3666618126509642890</id><published>2011-01-11T23:17:00.001-05:00</published><updated>2011-02-14T11:15:53.331-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-14T11:15:53.331-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="logging" /><category scheme="http://www.blogger.com/atom/ns#" term="log4j" /><title>JDK Logging per Webapp</title><content type="html">&lt;b&gt;Logging&lt;/b&gt; in Java is probably the easier thing that has been made a lot complicated. In Java, you have plenty of logging libraries and wrappers amongst:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;commons logging&lt;/li&gt;
&lt;li&gt;log4j, log4j extras, jmx, mail&lt;/li&gt;
&lt;li&gt;slf4j (api, implementation, commons logging wrapper, jdk logging wrapper, ...)&lt;/li&gt;
&lt;li&gt;jdk logging (java.util.logging)&lt;/li&gt;
&lt;li&gt;and a lot and lot of others&lt;/li&gt;
&lt;/ul&gt;You aim to have in your web application at then end all of these stupid wrappers because libraries depends on them. &lt;br /&gt;
If you are concerned about performance, you already know that the best way to use those loggers are by testing then logging:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:java"&gt;private static final Logger LOGGER = Logger.getLogger(MyClass.class.getName());
[...]
if (LOGGER.isLoggable(Level.FINE))
    LOGGER.fine("Creating new connection...");
&lt;/pre&gt;&lt;br /&gt;
My frustration when I see libraries and applications developed is always the same: You are provided by the JDK with a common logging system available to anyone without the need of any external JAR. You also write the same code when you want to log something.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;So why the hell are people keep using libraries like SLF4J or commons-logging or even more !!!!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The JDK logging API, even if not as good as log4j, does everything you need. &lt;b&gt;A shortcoming was that the JDK logging system is not well designed to work in an application server&lt;/b&gt; and have each web application controlling its own logging configuration. This is mainly due to the fact that java.* classes are directly loaded from the system classloader.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;But this is not the case anymore !!!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I've written a very small JAR which you can put in your application server common libraries. This JAR enables your web applications to use the JDK logging system and have each different configurations.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;You will find all information here: &lt;a href="http://code.google.com/p/mycila/wiki/JdkLoggingPerWebapp"&gt;http://code.google.com/p/mycila/wiki/JdkLoggingPerWebapp&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;So now your don't need to use any logging wrapper anymore !!&lt;/b&gt; Just use the standard JDK Logging API.&lt;br /&gt;
&lt;br /&gt;
But wait !!!&lt;br /&gt;
&lt;br /&gt;
You can now develop libraries and code completely independent of any logging libraries. &lt;b&gt;But what if someone wants to use the JDK API but still want to output logs with log4j&lt;/b&gt; (log rotation, compression, ...) ?&lt;br /&gt;
&lt;br /&gt;
Writing a wrapper for the JDK Logging system is trivial ! Here is one that can redirect all JDK logging calls to log4j:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:java"&gt;import org.apache.log4j.Level;
import org.apache.log4j.Logger;

import java.util.HashMap;
import java.util.Map;
import java.util.logging.Handler;
import java.util.logging.LogManager;
import java.util.logging.LogRecord;

/**
 * @author Mathieu Carbou
 */
public final class JdkOverLog4j extends Handler {

    private static final Map&amp;lt;java.util.logging.Level, Level&amp;gt; LEVELS_JDK_TO_LOG4J = new HashMap&amp;lt;java.util.logging.Level, Level&amp;gt;() {
        {
            put(java.util.logging.Level.OFF, Level.OFF);
            put(java.util.logging.Level.SEVERE, Level.ERROR);
            put(java.util.logging.Level.WARNING, Level.WARN);
            put(java.util.logging.Level.INFO, Level.INFO);
            put(java.util.logging.Level.CONFIG, Level.INFO);
            put(java.util.logging.Level.FINE, Level.DEBUG);
            put(java.util.logging.Level.FINER, Level.DEBUG);
            put(java.util.logging.Level.FINEST, Level.DEBUG);
            put(java.util.logging.Level.ALL, Level.ALL);
        }
    };

    private static final Map&amp;lt;Level, java.util.logging.Level&amp;gt; LEVELS_LOG4J_TO_JDK = new HashMap&amp;lt;Level, java.util.logging.Level&amp;gt;() {
        {
            put(Level.OFF, java.util.logging.Level.OFF);
            put(Level.FATAL, java.util.logging.Level.SEVERE);
            put(Level.ERROR, java.util.logging.Level.SEVERE);
            put(Level.WARN, java.util.logging.Level.WARNING);
            put(Level.INFO, java.util.logging.Level.INFO);
            put(Level.DEBUG, java.util.logging.Level.FINE);
            put(Level.TRACE, java.util.logging.Level.FINE);
            put(Level.ALL, java.util.logging.Level.ALL);
        }
    };

    @Override
    public void publish(LogRecord record) {
        // normalize levels
        Logger log4jLogger = Logger.getLogger(record.getLoggerName());
        Level log4jLevel = log4jLogger.getEffectiveLevel();
        java.util.logging.Logger jdkLogger = java.util.logging.Logger.getLogger(record.getLoggerName());
        java.util.logging.Level expectedJdkLevel = LEVELS_LOG4J_TO_JDK.get(log4jLevel);
        if (expectedJdkLevel == null)
            throw new AssertionError(&amp;quot;Level not supported yet - have a bug !&amp;quot; + log4jLevel);
        if (!expectedJdkLevel.equals(jdkLogger.getLevel())) {
            jdkLogger.setLevel(expectedJdkLevel);
        }
        log4jLogger.log(record.getLoggerName(), LEVELS_JDK_TO_LOG4J.get(record.getLevel()), record.getMessage(), record.getThrown());
    }

    @Override
    public void flush() {
    }

    @Override
    public void close() throws SecurityException {
    }

    public static void install() {
        LogManager.getLogManager().reset();
        LogManager.getLogManager().getLogger(&amp;quot;&amp;quot;).addHandler(new JdkOverLog4j());
        LogManager.getLogManager().getLogger(&amp;quot;&amp;quot;).setLevel(java.util.logging.Level.ALL);
    }
}
&lt;/pre&gt;&lt;br /&gt;
Simply put this class in your webapp and at the startup of your webapp, run the code:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:java"&gt;JdkOverLog4j.install();
&lt;/pre&gt;&lt;br /&gt;
Now all calls to the JDK Logging system are redirected to Log4j !!!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;So now you have the best of both world:&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;You are using the standard &lt;b&gt;java.util.logging&lt;/b&gt; API &lt;/li&gt;
&lt;li&gt;You are not binding your code to any logging library or wrapper&lt;/li&gt;
&lt;li&gt;The client can decide which system he will use&lt;/li&gt;
&lt;li&gt;You can still use log4j at the very end, but your application and libraries will be even more loosely coupled to it&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-3666618126509642890?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/z3X3xWYAKZkILxkGwVLTbxsBTX8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/z3X3xWYAKZkILxkGwVLTbxsBTX8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/z3X3xWYAKZkILxkGwVLTbxsBTX8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/z3X3xWYAKZkILxkGwVLTbxsBTX8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/AnEWXoatb2g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/3666618126509642890/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2011/01/jdk-logging-per-webapp.html#comment-form" title="17 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/3666618126509642890?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/3666618126509642890?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/AnEWXoatb2g/jdk-logging-per-webapp.html" title="JDK Logging per Webapp" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>17</thr:total><feedburner:origLink>http://blog.mycila.com/2011/01/jdk-logging-per-webapp.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8CSHo_eyp7ImA9Wx9QEU0.&quot;"><id>tag:blogger.com,1999:blog-8347429717895274754.post-8875855539805469228</id><published>2010-12-23T07:54:00.000-05:00</published><updated>2010-12-23T07:54:29.443-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-23T07:54:29.443-05:00</app:edited><title>Compagnies de Design</title><content type="html">Rech. compagnies de design (industriel, produit ou intérieur) sur Montréal: en connaissez-vous ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8347429717895274754-8875855539805469228?l=blog.mycila.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lkpLz8s15Xa9kTmKcvNs0PFeYSY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lkpLz8s15Xa9kTmKcvNs0PFeYSY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lkpLz8s15Xa9kTmKcvNs0PFeYSY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lkpLz8s15Xa9kTmKcvNs0PFeYSY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/mycilablog/~4/B91lkWWj3Ag" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.mycila.com/feeds/8875855539805469228/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.mycila.com/2010/12/compagnies-de-design.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/8875855539805469228?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8347429717895274754/posts/default/8875855539805469228?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mycilablog/~3/B91lkWWj3Ag/compagnies-de-design.html" title="Compagnies de Design" /><author><name>Mathieu Carbou</name><uri>http://www.blogger.com/profile/00930474255299192020</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_t3Vsly_Uzx8/S4vnUPstjUI/AAAAAAAAAH4/eChzic7v7qU/S220/mathieu.carbou%40gmail.com_fee0de57.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.mycila.com/2010/12/compagnies-de-design.html</feedburner:origLink></entry></feed>

