[JBossCache] - Re: Updating the data model for a distributed cache
by jorgemoralespou
I´ll extend further on my question.
I have a class:
| public class User implements Serializable{
| private static final long serialVersionUID = 1L;
| private String name;
| private String password;
| ...
| // getters and setters ommited
| }
|
This class is in my clustered cache.
Now I want to update my class to this:
| public class User implements Serializable{
| private static final long serialVersionUID = 2L;
| private String name;
| private String password;
| private String email;
| ...
| // getters and setters ommited
| }
|
Which is not compatible with my previous class.
Now, I want to do the update in such a way that my clustered app don´t loose service, so I shutdown node A, update class, start node A. Shutdown node B, update class, start node B.
My question is, what can happen if I do this, because of the incompatible classes?
Can I inactivate region where this classes are stored. To the updates and activate the region again? Then if there are updates in the cache while any of the nodes is down, what will it happen?
Thanks,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989747#3989747
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989747
19Â years, 5Â months
[JBossCache] - Re: Error starting cache with TCP and TCPPING
by urisherman
I also get this error when trying to remove a cache entry (using the example given at http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheAndWebLogic ) -
This is the code:
Node n = cache.get( node );
|
| // for some reason, calling n.remove( name ) only removes the object
| // in a local copy of the cache, and does not replicate this change.
| // the only way I've found to replicate the change is to remove the
| // entire node, make changes to it, and add it again.
| n.remove( name );
|
| // this map contains all the orig data, minus the object just removed above.
| Map data = n.getData();
|
| // remove the entire node from cache
| cache.remove( node );
|
| // and add it again with the updated data.
| cache.put( node, data ); // <---- It fails here
|
| logger.debug("Removed item from node");
This is the exception:
java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: registerNatives
at org.jboss.cache.TreeCache.invokeMethod(Lorg.jgroups.blocks.MethodCall;)Ljava.lang.Object;(TreeCache.java:5526)
at org.jboss.cache.TreeCache.put(Lorg.jboss.cache.Fqn;Ljava.util.Map;)V(TreeCache.java:3601)
at org.jboss.cache.TreeCache.put(Ljava.lang.String;Ljava.util.Map;)V(TreeCache.java:3585)
at org.jboss.cache.example.servlet.ManipulateCache.doGet(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(ManipulateCache.java:94)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:996)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989739#3989739
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989739
19Â years, 5Â months