[ http://jira.jboss.com/jira/browse/JBCACHE-82?page=history ]

twundke updated JBCACHE-82:
---------------------------

    Attachment: NodeIssue.txt

> Deserialized Node object doesn't have the FQN set
> -------------------------------------------------
>
>          Key: JBCACHE-82
>          URL: http://jira.jboss.com/jira/browse/JBCACHE-82
>      Project: JBoss Cache
>         Type: Patch
>     Versions: 1.2
>     Reporter: twundke
>     Assignee: Bela Ban
>     Priority: Minor
>  Attachments: NodeIssue.txt
>
> Original Estimate: 5 minutes
>         Remaining: 5 minutes
>
> 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();
> +    }
>   
>   }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to