<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6795025412704837336</id><updated>2011-07-30T12:18:26.588-07:00</updated><category term='JBossMessaging'/><title type='text'>Clebert Suconic 's Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://clebertsuconic.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://clebertsuconic.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Clebert Suconic</name><uri>http://www.blogger.com/profile/05972640198013851304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6795025412704837336.post-2047411129377379216</id><published>2010-05-14T14:56:00.000-07:00</published><updated>2010-05-14T15:04:02.593-07:00</updated><title type='text'>Pointers in JNI / C++</title><content type='html'>When writing native code for Java (JNI), It's a common behaviour to store the pointer as long in a field in Java, and do a type-cast conversion on the native code back to the original pointer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I did that on the native module on HornetQ, however this seems to eventually fail.&lt;br /&gt;&lt;br /&gt;when using different bit sets as the target compilation (32 bits for instance) this seems to fail when you move back and forth.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The best way for that would be to use a Native Byte Buffer. This way you don't need to worry about conversions. You can just use a pointer back and forth:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In your Java class, you create this signature:&lt;br /&gt;&lt;br /&gt;public class SomeClass&lt;br /&gt;{&lt;br /&gt;   public native ByteBuffer initPointer();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And in your C++ code:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;JNIEXPORT jobject JNICALL Java_SomeClass_initPointer&lt;br /&gt;  (JNIEnv * env, jobject obj)&lt;br /&gt;{&lt;br /&gt;    return env-&gt;NewDirectByteBuffer(myPointer, 0); // size = 0, you don't want anyone to change it&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Later, any C++ code can get back the pointer by doing:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;return (MyClass *) env-&gt;GetDirectBufferAddress(myPointer);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I know the word pointer makes this a bit sour, but maybe it will be helpful to someone some day :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6795025412704837336-2047411129377379216?l=clebertsuconic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clebertsuconic.blogspot.com/feeds/2047411129377379216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6795025412704837336&amp;postID=2047411129377379216' title='22 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/2047411129377379216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/2047411129377379216'/><link rel='alternate' type='text/html' href='http://clebertsuconic.blogspot.com/2010/05/pointers-in-jni-c.html' title='Pointers in JNI / C++'/><author><name>Clebert Suconic</name><uri>http://www.blogger.com/profile/05972640198013851304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>22</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6795025412704837336.post-9207375933481631197</id><published>2009-09-02T09:18:00.000-07:00</published><updated>2009-09-02T09:20:38.682-07:00</updated><title type='text'>HornetQ and Maven</title><content type='html'>Andy Taylor has written a nice blog on how to use HornetQ on Maven. Very nice article:&lt;br /&gt;&lt;a href="http://hornetq.blogspot.com/2009/09/hornetq-simple-example-using-maven.html"&gt;&lt;br /&gt;&lt;br /&gt;http://hornetq.blogspot.com/2009/09/hornetq-simple-example-using-maven.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6795025412704837336-9207375933481631197?l=clebertsuconic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clebertsuconic.blogspot.com/feeds/9207375933481631197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6795025412704837336&amp;postID=9207375933481631197' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/9207375933481631197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/9207375933481631197'/><link rel='alternate' type='text/html' href='http://clebertsuconic.blogspot.com/2009/09/hornetq-and-maven.html' title='HornetQ and Maven'/><author><name>Clebert Suconic</name><uri>http://www.blogger.com/profile/05972640198013851304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6795025412704837336.post-6223152060834841275</id><published>2009-08-11T16:56:00.001-07:00</published><updated>2009-08-11T18:12:08.930-07:00</updated><title type='text'>Best Practice on Junit: Always set your fields to null on tearDown</title><content type='html'>This was a surprise to me today. Just wanted to share it thourgh a small blog entry, so maybe others are also going through the same thing.&lt;br /&gt;&lt;br /&gt;Say you have this test:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;public class MyTest extends TestCase&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;    Server server;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;public void setUp()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;        &lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;server&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span style="color: rgb(204, 0, 0);"&gt; = new Server();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span style="color: rgb(204, 0, 0);"&gt; public void testOne() throws Exception&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt; {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;        System.gc();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;        Thread.sleep(1000);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;code&gt;&lt;span style="color: rgb(204, 0, 0);"&gt; public void testSecond() throws Exception&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt; {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;        System.gc();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;        Thread.sleep(1000);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt; &lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;public void testThird() throws Exception&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt; {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;        System.gc();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;        Thread.sleep(1000);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;   &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;JUnit will hold one instance of MyTest for every method being executed. So if Server is a heavy weight object you will end up with three instances in the memory, until all the test methods on this class are executed.&lt;br /&gt;&lt;br /&gt;So, as a best practice on unit tests aways set big objects such as server, connections or anything lilke that to null on a junit test.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6795025412704837336-6223152060834841275?l=clebertsuconic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clebertsuconic.blogspot.com/feeds/6223152060834841275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6795025412704837336&amp;postID=6223152060834841275' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/6223152060834841275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/6223152060834841275'/><link rel='alternate' type='text/html' href='http://clebertsuconic.blogspot.com/2009/08/best-practice-on-junit-always-set-your.html' title='Best Practice on Junit: Always set your fields to null on tearDown'/><author><name>Clebert Suconic</name><uri>http://www.blogger.com/profile/05972640198013851304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6795025412704837336.post-1731004478112978299</id><published>2009-07-27T12:16:00.000-07:00</published><updated>2009-07-27T12:22:17.643-07:00</updated><title type='text'>JBoss Messaging 2.0 beta 4 is released</title><content type='html'>We just released Messaging 2.0 beta 4, and it' s ready to &lt;a href="http://www.jboss.org/jbossmessaging/downloads/"&gt;download&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I' m pleased with the progress we are making, and we are excited about what we are doing.&lt;br /&gt;&lt;br /&gt;We still have work to do but we are very confident about the quality of the work we are doing.&lt;br /&gt;&lt;br /&gt;Look at the &lt;a href="http://labs.jboss.com/file-access/default/members/jbossmessaging/freezone/docs/usermanual-2.0.0.beta4/html_single/index.html"&gt;documentation&lt;/a&gt; and you will know what I' m talking about.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6795025412704837336-1731004478112978299?l=clebertsuconic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clebertsuconic.blogspot.com/feeds/1731004478112978299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6795025412704837336&amp;postID=1731004478112978299' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/1731004478112978299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/1731004478112978299'/><link rel='alternate' type='text/html' href='http://clebertsuconic.blogspot.com/2009/07/jboss-messaging-20-beta-4-is-released.html' title='JBoss Messaging 2.0 beta 4 is released'/><author><name>Clebert Suconic</name><uri>http://www.blogger.com/profile/05972640198013851304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6795025412704837336.post-2335593221323689072</id><published>2009-07-17T08:12:00.000-07:00</published><updated>2009-07-17T08:17:11.978-07:00</updated><title type='text'>Fedora 11 finally got me...</title><content type='html'>I have been using a competitor distribution for very long (about 2 years) even though I work for RedHat / JBoss, just because it was easier. I couldn' t figure out how to do a few things.&lt;br /&gt;&lt;br /&gt;I have tried to come to Fedora a few times.. and I could never feel comfortable.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But Fedora 11.. that' s really nice. I would say I don't even feel I'm on Linux. I'm feeling very comfortable like using my wife's Mac OS X :-)&lt;br /&gt;&lt;br /&gt;The WebCam works, wireless... video resolution.. even Skype... everything smooth.&lt;br /&gt;&lt;br /&gt;It could be also the Lenovo T500 behaves really well with Linux.. but still... Fedora 11 has got me.&lt;br /&gt;&lt;br /&gt;I' m a Fedora user from now on :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6795025412704837336-2335593221323689072?l=clebertsuconic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clebertsuconic.blogspot.com/feeds/2335593221323689072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6795025412704837336&amp;postID=2335593221323689072' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/2335593221323689072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/2335593221323689072'/><link rel='alternate' type='text/html' href='http://clebertsuconic.blogspot.com/2009/07/fedora-11-finally-got-me.html' title='Fedora 11 finally got me...'/><author><name>Clebert Suconic</name><uri>http://www.blogger.com/profile/05972640198013851304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6795025412704837336.post-615693481254992222</id><published>2009-06-26T16:05:00.000-07:00</published><updated>2009-06-30T18:24:58.227-07:00</updated><title type='text'>Everybody Loves Lula!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_OmWxLcQF4sU/SkVUdgl43wI/AAAAAAAAAG0/Hmhoxrx_e7E/s1600-h/Lula_RH.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_OmWxLcQF4sU/SkVUdgl43wI/AAAAAAAAAG0/Hmhoxrx_e7E/s320/Lula_RH.jpg" alt="" id="BLOGGER_PHOTO_ID_5351776598141492994" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I just love my president! Maybe he is also wearing a JBoss shirt?&lt;br /&gt;&lt;br /&gt;This picture was taken at &lt;a href="http://www.fisl.org.br/"&gt;FISL&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Speaking as a brazilian citizen, we had so many highly educated presidents before him, however this government as far as I know has promoted open source in a much better scale than any other previous government.&lt;br /&gt;&lt;br /&gt;It is really nice seeing the government promoting open source there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6795025412704837336-615693481254992222?l=clebertsuconic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clebertsuconic.blogspot.com/feeds/615693481254992222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6795025412704837336&amp;postID=615693481254992222' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/615693481254992222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/615693481254992222'/><link rel='alternate' type='text/html' href='http://clebertsuconic.blogspot.com/2009/06/everybody-loves-lula.html' title='Everybody Loves Lula!'/><author><name>Clebert Suconic</name><uri>http://www.blogger.com/profile/05972640198013851304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_OmWxLcQF4sU/SkVUdgl43wI/AAAAAAAAAG0/Hmhoxrx_e7E/s72-c/Lula_RH.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6795025412704837336.post-8628423159289874457</id><published>2009-02-20T14:07:00.000-08:00</published><updated>2009-02-20T14:11:14.290-08:00</updated><title type='text'>Performance comparisson on JBoss Remoting and Serialization</title><content type='html'>Afonso Olias just made a &lt;a href="http://www.theserverlabs.com/blog/2009/02/19/jboss-remoting-jboss-serialization-kills-javarmi-and-spring-remoting/"&gt;Nice Post&lt;/a&gt; regarding JBoss Remoting and Serialization performance.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6795025412704837336-8628423159289874457?l=clebertsuconic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clebertsuconic.blogspot.com/feeds/8628423159289874457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6795025412704837336&amp;postID=8628423159289874457' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/8628423159289874457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/8628423159289874457'/><link rel='alternate' type='text/html' href='http://clebertsuconic.blogspot.com/2009/02/performance-comparisson-on-jboss.html' title='Performance comparisson on JBoss Remoting and Serialization'/><author><name>Clebert Suconic</name><uri>http://www.blogger.com/profile/05972640198013851304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6795025412704837336.post-60403790507158818</id><published>2008-09-01T08:00:00.000-07:00</published><updated>2008-09-01T09:19:52.995-07:00</updated><title type='text'>JBM2 Getting bigger, JBM2 Getting smaller</title><content type='html'>I have aways been posting about how great &lt;a href="http://www.jboss.org/jbossmessaging/"&gt;JBM2&lt;/a&gt; is getting, how &lt;a href="http://clebertsuconic.blogspot.com/2008/07/jbm-2-is-getting-even-faster-and-better.html"&gt;fast&lt;/a&gt; and how good it will be to support very &lt;a href="http://clebertsuconic.blogspot.com/2008/05/speeding-up-io-on-files.html"&gt;high performance demands&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;But today I want to talk about another aspect. What about small computers? Who knows, maybe you want to distribute messages to and from an ATM. &lt;br /&gt;&lt;br /&gt;We have developed a way to page messages to disk, what will avoid the server from running out of memory by storing messages on disk when the memory is low. &lt;br /&gt;&lt;br /&gt;There is probably nothing new with that, as JBM 1.4 and JBoss MQ already have it. (Well.. some products out there dont :-) )&lt;br /&gt;&lt;br /&gt;The great news here is, this is really fast, and the deployment is really simple.. no RDBMS. We have developed a system where the producers will write directly to NIO files when the memory is low, and the server will start depaging those messages as soon as you have more memory available. (i.e. as soon as you consume some messages).&lt;br /&gt;&lt;br /&gt;I have sent 500K messages to a server with only 64M on the JVM without any consumers, and it ran as fast as if they were being consumed. Later when the consumer connected, it started getting the messages as nothing special was happening.&lt;br /&gt;&lt;br /&gt;JBM2 just buffered the messages on file protecting the server from running out of memory.&lt;br /&gt;&lt;br /&gt;So if you have some hardware with low memory and a hard disk JBM2 still your best choice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6795025412704837336-60403790507158818?l=clebertsuconic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clebertsuconic.blogspot.com/feeds/60403790507158818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6795025412704837336&amp;postID=60403790507158818' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/60403790507158818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/60403790507158818'/><link rel='alternate' type='text/html' href='http://clebertsuconic.blogspot.com/2008/09/jbm2-getting-bigger-jbm2-getting.html' title='JBM2 Getting bigger, JBM2 Getting smaller'/><author><name>Clebert Suconic</name><uri>http://www.blogger.com/profile/05972640198013851304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6795025412704837336.post-4386452951640472626</id><published>2008-08-20T15:23:00.000-07:00</published><updated>2008-08-20T15:40:45.693-07:00</updated><title type='text'>Redeployment leaks fixed on Apache BeanUtils</title><content type='html'>I'm really glad as I could use some of my spare time to help this project. Especially because I found a lot of people with redeployment problems, not only on JBAS but in several other projects. Just &lt;a href="http://www.google.com/search?source=ig&amp;amp;hl=en&amp;amp;rlz=&amp;amp;=&amp;amp;q=BeanUtils+leak+classLoader+&amp;amp;btnG=Google+Search"&gt;google it&lt;/a&gt; and you will see what I mean.&lt;br /&gt;&lt;br /&gt;We have identified some hard to solve memory leaks on BeanUtils caused by very complex circular references on the Reflection metadata which is now fixed.&lt;br /&gt;&lt;br /&gt;The use of the jvmti library from jboss-profiler (the same library we use to chase memory leaks on the JBAS testsuite) simplified the process a lot, and even better we have added some testcases preventing regressions, using the same techniques we have applied to solve our own redeployment leakages on JBAS.&lt;br /&gt;&lt;br /&gt;You can find more information about what was done here:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://issues.apache.org/jira/browse/BEANUTILS-291"&gt;BEANUTILS-291&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6795025412704837336-4386452951640472626?l=clebertsuconic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clebertsuconic.blogspot.com/feeds/4386452951640472626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6795025412704837336&amp;postID=4386452951640472626' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/4386452951640472626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/4386452951640472626'/><link rel='alternate' type='text/html' href='http://clebertsuconic.blogspot.com/2008/08/redeployment-leaks-fixed-on-apache.html' title='Redeployment leaks fixed on Apache BeanUtils'/><author><name>Clebert Suconic</name><uri>http://www.blogger.com/profile/05972640198013851304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6795025412704837336.post-624075089270907564</id><published>2008-07-30T15:21:00.000-07:00</published><updated>2008-07-30T15:40:15.045-07:00</updated><title type='text'>JBM 2 is getting even faster and better</title><content type='html'>When we released JBM 2 Alpha1, we released some &lt;a href="http://www.jboss.org/file-access/default/members/jbossmessaging/freezone/docs/userguide-2.0.0.alpha1/html/performance.html#performance.results"&gt; performance results &lt;/a&gt; and we thought they were already great.&lt;br /&gt;&lt;br /&gt;I have recently spent a lot of time working on the journal, testing and improving it, making it as reliable as possible, and because of one of the improvements we achieved the Journal is at least 40% faster on persistent messages than it was on JBM 2 alpha. Depending how you configured Alpha that could mean 100% improvement.&lt;br /&gt;&lt;br /&gt;We are aways reusing files on the journal, putting them back as fast as we can. Because of the &lt;a href="http://wiki.jboss.org/wiki/JBossMessaging2Journal"&gt;data format&lt;/a&gt; we are now using we don't need to refill the file, and that saved a lot of time on I/O as records were being added on the journal.&lt;br /&gt;&lt;br /&gt;And what's great is, we still have room for improvements in performance.&lt;br /&gt;&lt;br /&gt;JBoss Messaging 2 rocks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6795025412704837336-624075089270907564?l=clebertsuconic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clebertsuconic.blogspot.com/feeds/624075089270907564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6795025412704837336&amp;postID=624075089270907564' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/624075089270907564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/624075089270907564'/><link rel='alternate' type='text/html' href='http://clebertsuconic.blogspot.com/2008/07/jbm-2-is-getting-even-faster-and-better.html' title='JBM 2 is getting even faster and better'/><author><name>Clebert Suconic</name><uri>http://www.blogger.com/profile/05972640198013851304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6795025412704837336.post-4102269373432065545</id><published>2008-06-02T08:46:00.000-07:00</published><updated>2008-06-02T09:02:52.602-07:00</updated><title type='text'>Playing Music, Coding and JBoss Messaging :-)</title><content type='html'>Probably not many people know that but I'm also a musician, a Jazz and Bossa Nova piano player and if I invested just a little bit more of my time (which I don't have now :-) ) I could become a professional musician. Some of the feelings I have while playing in a band I'm also getting this week after the &lt;a href="http://www.jboss.org/feeds/post/jbm_2_0_0_alpha_released_with_blistering_performance"&gt;JBoss Messaging Alpha release&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;I - It's cool to improvise: You feel great by inventing new things and you got that feeling! I have been part of writing a totally cool &lt;a href="http://clebertsuconic.blogspot.com/2008/05/speeding-up-io-on-files.html"&gt;Asynchronous IO module&lt;/a&gt; and helped improving the Persistent of JBoss Messaging. I totally get that feeling here.&lt;br /&gt;&lt;br /&gt;II - It's cool when a band (or team) member also improvise: When Jeff Mesnil was working on the new transport, Andy Taylor doing a lot of hard work or Tim Fox orchestrating or playing the whip.. it's all the same... I'm part of the band, and we are jazzing a &lt;a href="http://www.jboss.org/file-access/default/members/jbossmessaging/freezone/docs/userguide-2.0.0.alpha1/html/performance.html#performance.results"&gt;beautiful song&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;III - Applauses! Yeah... musician needs that.. and we are getting that this week.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And the main point is: &lt;a href="http://www.jboss.org/feeds/post/jbm_2_0_0_alpha_released_with_blistering_performance"&gt;JBoss Messaging Alpha&lt;/a&gt; it's just a rehearsal. It will be much better when we are in concert :-)&lt;br /&gt;&lt;br /&gt;It is really cool to be part of this Messaging revolution :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6795025412704837336-4102269373432065545?l=clebertsuconic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clebertsuconic.blogspot.com/feeds/4102269373432065545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6795025412704837336&amp;postID=4102269373432065545' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/4102269373432065545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/4102269373432065545'/><link rel='alternate' type='text/html' href='http://clebertsuconic.blogspot.com/2008/06/playing-music-coding-and-jboss.html' title='Playing Music, Coding and JBoss Messaging :-)'/><author><name>Clebert Suconic</name><uri>http://www.blogger.com/profile/05972640198013851304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6795025412704837336.post-3980911926182565656</id><published>2008-05-14T16:40:00.000-07:00</published><updated>2008-05-21T06:45:45.296-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JBossMessaging'/><title type='text'>Speeding UP IO with Asynchronous IO</title><content type='html'>Have you ever wondered how to make IO faster?&lt;br /&gt;&lt;br /&gt;We have this dilemma on the messaging world where we need to provide a framework where users are able to send thousands messages per second and we have found our way on doing it, and we are quite excited about it.&lt;br /&gt;&lt;br /&gt;In our tests we have been able to send 25,000 persistent messages per second being very close to the the limits of the disk not consuming a lot of CPU on this process, on a computer with 2 QuadCores and a SAS/SCSI disk which is a very modest workstation.  And about 10,000 messages/sec on my crappy Laptop because of my slow disk.&lt;br /&gt;&lt;br /&gt;We have implemented a very generic JNI layer in top of AIO where you send a Java Callback Interface on every write, and you get informed when the data is on the disk.&lt;br /&gt;&lt;br /&gt;With that we avoided requiring to send a sync on every commit we perform. We can just wait for the commit completion so a transaction commit will not affect other transactions.&lt;br /&gt;&lt;br /&gt;This JNI layer is also using DMA (Direct Memory Access) when sending the data to the disk, so the CPU will be free doing other things while the data is being written.&lt;br /&gt;&lt;br /&gt;At this point we are focusing on making this libaio layer very performatic and stable on JBoss Messaging and depending on the demand we might do it as a separate project very easily since it is ready.&lt;br /&gt;&lt;br /&gt;Consider this blog just a teaser. I can't wait the release of JBoss Messaging Alpha showing these numbers so everyone will be able to produce these numbers, and we are almost there. It's amazing to be part of this!&lt;br /&gt;&lt;br /&gt;If you want a very fast and reliable Java Messaging System, JBoss Messaging 2 will be your only choice :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6795025412704837336-3980911926182565656?l=clebertsuconic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clebertsuconic.blogspot.com/feeds/3980911926182565656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6795025412704837336&amp;postID=3980911926182565656' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/3980911926182565656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6795025412704837336/posts/default/3980911926182565656'/><link rel='alternate' type='text/html' href='http://clebertsuconic.blogspot.com/2008/05/speeding-up-io-on-files.html' title='Speeding UP IO with Asynchronous IO'/><author><name>Clebert Suconic</name><uri>http://www.blogger.com/profile/05972640198013851304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
