[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Sweet life on the journal...
by clebert.suconic@jboss.com
I was dealing with one of the most obscure bugs I had ever seen on my 20 years programming. After I found it, as aways it was a dumb and obvious bug, but it was a little hard to find this one:
When the journal was creating a byte buffer, it was sending it to the JNI layer and it was immediately releasing the reference to the ByteBuffer. As the write was being done asynchronously, the ByteBuffer could be eventually released (GC) at the same time it was being written, what was creating gargabe on the journal.
Well.. at least that was a good exercise during my tests, so I'm pretty sure the journal is loading data properly and dealing with holes on transactions. I have written a few Stress Tests to catch this bug. I can't reproduce this on a Unit Test.
I will write a few more tests on Reload and incomplete transactions, and maybe make few other improvements on the journal. (Maybe improve the collections on the journal making it use less memory. I have a few ideas that I will input on the forums tomorrow).
BTW: Most of the information is on the WIKI already. I have made a few modifications on the code regarding Transactions counter to deal with holes and I will put that on the WIKI tomorrow. (I'm writing the counter per journal file, as reclaiming could legally get part of a transaction).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166048#4166048
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166048
17 years, 8 months
[Design of JBoss Portal] - Coordination work
by julien@jboss.com
I worked a bit on the coordination:
I started to redo the samples to better reflect the various use cases, for now I have done explicit and implicit, fallback will be redone tomorrow probably
I have an initial impl for linking page parameters to bindings of a page. It is possible to try the implicit and explicit samples.
- in the explicit case, one need to use a binding name with values, like http://localhost:8080/portal/portal/default/Coordination+Samples/Paramete...
- in the implicit case, it only works with the empty namepaced parameters that are declared by a portlet and urls use the parameter name, like http://localhost:8080/portal/portal/default/Coordination+Samples/Paramete...
The trick is that bindings are stored as empty namespaced parameters in the Map<QName, String[]> per page. So on an explicit page, the binding is stored as QName(XMLConstants.DEFAULT_NS_PREFIX, "binding1") and in the implicit case the binding is stored as QName(XMLConstants.DEFAULT_NS_PREFIX, "foo").
The PortalObjectCommandFactory take any parameter in the page URL and will update the PageNS Map<QName, String[]> using the XMLConstants.DEFAULT_NS_PREFIX prefix when building the QName from the url parameters.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166037#4166037
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166037
17 years, 8 months