[jboss-user] [JBossCache] - Re: PojoCache 2.0 (replicate method execution)
mleur
do-not-reply at jboss.com
Mon Oct 30 03:51:02 EST 2006
Hi,
Thanks for your reply...
But I didn't succeed to do RPC. I execute the code above
PojoCache cache = PojoCacheFactory.createInstance("cache-config.xml");
| CacheSPI cacheSPI = (CacheSPI)cache.getCache();
| RPCManager rpcManager = cacheSPI.getRPCManager();
|
| TimerSessionValidity timer = new TimerSessionValidity("maxime","id");
| Method method = timer.getClass().getMethod("pingSession2",new Class[]{String.class});
| cache.attach("timer", timer);
|
| timer = (TimerSessionValidity)cache.find("timer");
|
| MethodCall methodCall = MethodCallFactory.create(method,"maxime");
| System.out.println("callRemoteMethods "+methodCall.getMethodId());
| rpcManager.callRemoteMethods(cacheSPI.getMembers(), methodCall,1,false,(long) 1000);
And I get an Exception :
java.lang.RuntimeException: failure to marshal argument(s)
at org.jgroups.blocks.RpcDispatcher.callRemoteMethods(RpcDispatcher.java:174)
I look at the pojocache & treecache code, and I see that MethodCallFactory call a class named MethodDeclarations which contains all methods names.
How Can I put my method name in this classes ??
Or I am not on the good way.. and can you help me please..
Maxime
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981678#3981678
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981678
More information about the jboss-user
mailing list