I've been having a pretty in-depth look at the JBoss Cache code, and have found a number of small problems that I've fixed. I'm wasn't quite sure whether I should be using Jira or the forum to distribute patches, so I'll give the forum a go to start with.
When a new cache starts and retrieves the transient state, Node objects are created--by the serialisation process--using the no-arg constructor. This constructor calls init(), which creates the IdentityLock object using "new IdentityLock(cache_,fqn)". The problem is that the fqn is never set on the IdentityLock (as the Node doesn't know the fqn at this point), which means that all IdentityLock messages show "null" as the fqn. Here's a patch on revision 1.60 that fixes the problem by creating the lock in readExternal() rather than in the constructor. *** Node.java.#.1.60 Thu Jan 20 10:45:55 2005 | --- Node.java Thu Jan 20 10:46:04 2005 | *************** | *** 66,73 **** | | protected static final int INDENT=4; | | public Node() { | ! init(); | } | | public Node(TreeCache cache) { | --- 66,76 ---- | | protected static final int INDENT=4; | | + /** | + * This constructor is only to be used by serialization. | + */ | public Node() { | ! // No operation as the object is initialised by readExternal() | } | | public Node(TreeCache cache) { | *************** | *** 494,501 **** | parent=(Node)in.readObject(); | children=(Map)in.readObject(); | data=(Map)in.readObject(); | - } | | | } | - | --- 497,505 ---- | parent=(Node)in.readObject(); | children=(Map)in.readObject(); | data=(Map)in.readObject(); | | + // Perform default initialisation now that we have all of the required data | + init(); | + } | | } Tim. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3863022#3863022 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3863022 ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development