Thank you very much for your responses. Here's what I've found based on your
suggestions (sorry for the verboseness of the log statements I've included).
I start ServerA first and add a MerchantDailyAccount object to it with a
'dailySpend' value of 128.00 (I know it gets added successfully because I have
debug logging to print out its values immediately after it gets added to
cache). I then start ServerB and add a MerchantDailyAccount object also with a
'dailySpend' value of 128.00.
This is what I see in the logs on ServerA (192.168.1.174) - the server being
replicated to:
26 Jun 2006 20:14:37,165 DEBUG[]
org.jboss.cache.interceptors.PessimisticLockInterceptor -
PessimisticLockInterceptor invoked for method
prepare(GlobalTransaction:<192.168.1.184:33302>:1,
[_put(GlobalTransaction:<192.168.1.184:33302>:1, /test/dailySpend, dummy,
dummy, true), _put(GlobalTransaction:<192.168.1.184:33302>:1, /test/dailySpend,
AOPInstance, [EMAIL PROTECTED], true),
_put(GlobalTransaction:<192.168.1.184:33302>:1, /test/dailySpend,
__jboss:internal:class__, class com.gifts.business.MerchantDailyAccount, true),
_put(GlobalTransaction:<192.168.1.184:33302>:1, /test/dailySpend,
{dailySpend=128.0}, true), _remove(GlobalTransaction:<192.168.1.184:33302>:1,
/test/dailySpend, dummy, true)], 192.168.1.184:33302, false)
26 Jun 2006 20:14:37,165 DEBUG[]
org.jboss.cache.interceptors.PessimisticLockInterceptor - bypassed locking as
method prepare() doesn't require locking
26 Jun 2006 20:14:37,166 DEBUG[] org.jboss.cache.interceptors.CallInterceptor -
Suppressing invocation of method
prepare(GlobalTransaction:<192.168.1.184:33302>:1,
[_put(GlobalTransaction:<192.168.1.184:33302>:1, /test/dailySpend, dummy,
dummy, true), _put(GlobalTransaction:<192.168.1.184:33302>:1, /test/dailySpend,
AOPInstance, [EMAIL PROTECTED], true),
_put(GlobalTransaction:<192.168.1.184:33302>:1, /test/dailySpend,
__jboss:internal:class__, class com.gifts.business.MerchantDailyAccount, true),
_put(GlobalTransaction:<192.168.1.184:33302>:1, /test/dailySpend,
{dailySpend=128.0}, true), _remove(GlobalTransaction:<192.168.1.184:33302>:1,
/test/dailySpend, dummy, true)], 192.168.1.184:33302, false) on cache.
Seems like the object is being passed correctly across the network, right?
However, when I look at the objects on ServerA and ServerB, I see:
ServerA: MerchantDailyAccount.dailySpend = 1.00 (I should see 128.00, but
instead I see this which is the default value)
ServerB: MerchantDailyAccount.dailySpend = 128.00 (This is what I expect to
see)
I then run a test to modify the 'dailySpend' value of the object on ServerB.
When I update its value to 128.55 on ServerB, this is what I see
in the logs on both servers:
ServerB (192.168.1.184) - the server being updated directly
26 Jun 2006 20:18:08,115 DEBUG[]
org.jboss.cache.interceptors.ReplicationInterceptor - invoking method
_put(null, /test/dailySpend, dailySpend, 128.55, true),
members=[192.168.1.174:33961, 192.168.1.184:33302], mode=REPL_SYNC,
exclude_self=true, timeout=20000
26 Jun 2006 20:18:08,115 DEBUG[] org.jboss.cache.TreeCache -
callRemoteMethods(): valid members are [192.168.1.174:33961] methods:
_put(null, /test/dailySpend, dailySpend, 128.55, true)
26 Jun 2006 20:18:08,131 DEBUG[] org.jboss.cache.TreeCache -
(192.168.1.184:33302): responses for method _replicate:
[sender=192.168.1.174:33961, retval=128.0, received=true, suspected=false]
26 Jun 2006 20:18:08,131 DEBUG[]
org.jboss.cache.interceptors.ReplicationInterceptor - responses=[128.0]
ServerA (192.168.1.174) - the server being replicated to
26 Jun 2006 20:18:08,122 DEBUG[] org.jboss.cache.interceptors.TxInterceptor -
(192.168.1.174:33961) call on method [_put(null, /test/dailySpend, dailySpend,
128.55, true)]
26 Jun 2006 20:18:08,123 DEBUG[]
org.jboss.cache.interceptors.ReplicationInterceptor -
IsLocalCommitOrRollback=false
26 Jun 2006 20:18:08,123 DEBUG[]
org.jboss.cache.interceptors.PessimisticLockInterceptor -
PessimisticLockInterceptor invoked for method _put(null, /test/dailySpend,
dailySpend, 128.55, true)
26 Jun 2006 20:18:08,123 DEBUG[]
org.jboss.cache.interceptors.PessimisticLockInterceptor - Attempting to lock
node /test/dailySpend for owner Thread[Thread-14,5,main]
26 Jun 2006 20:18:08,123 DEBUG[] org.jboss.cache.Node - acquiring RL:
fqn=/test, caller=Thread[Thread-14,5,main], lock=
26 Jun 2006 20:18:08,123 DEBUG[] org.jboss.cache.Node - acquired RL: fqn=/test,
caller=Thread[Thread-14,5,main], lock=read owners=[Thread[Thread-14,5,main]]
26 Jun 2006 20:18:08,123 DEBUG[] org.jboss.cache.Node - acquiring WL:
fqn=/test/dailySpend, caller=Thread[Thread-14,5,main], lock=
26 Jun 2006 20:18:08,123 DEBUG[] org.jboss.cache.Node - acquired WL:
fqn=/test/dailySpend, caller=Thread[Thread-14,5,main], lock=write
owner=Thread[Thread-14,5,main]
26 Jun 2006 20:18:08,123 DEBUG[] org.jboss.cache.interceptors.CallInterceptor -
Invoking method _put(null, /test/dailySpend, dailySpend, 128.55, true) on cache.
26 Jun 2006 20:18:08,123 DEBUG[] org.jboss.cache.TreeCache - _put(null,
"/test/dailySpend", dailySpend, 128.55)
26 Jun 2006 20:18:08,123 DEBUG[] org.jboss.cache.eviction.RegionManager -
nodeModified(): redirecting to node visited. fqn- /test/dailySpend
26 Jun 2006 20:18:08,123 DEBUG[] org.jboss.cache.eviction.RegionManager -
nodeVisited(): fqn- /test/dailySpend
So, from these logs, it looks like ServerB is sending a value of dailySpend =
128.55 to ServerA, and ServerA is sending a response back indicating it updated
the value (meaning that my object is instrumented correctly, right?). I'm not
sure why ServerA is sending back a return value of 128.0 except that this is
the value that should have existed prior to the replication attempt? This is
odd since when I got the object out of ServerA cache prior to running this
update test, it told me the value was 1.0.
So now, when I now look at the objects on the two servers, I see:
ServerA: MerchantDailyAccount.dailySpend = 1.00 (still stuck at 1.00)
ServerB: MerchantDailyAccount.dailySpend = 128.55 (correct value)
I can't seem to correlate what I'm seeing in the logs with what I'm not seeing
in the objects. It seems like the values are being
replicated between the two servers but not actually persisted in the object
being replicated to.
Is there anything else I could be looking for in the logs? I don't see any
errors or anything that says an action failed. Any reason why these
values are being replicated but aren't actually persisting in the objects
themselves?
For your reference, the class I'm caching is:
@org.jboss.cache.aop.annotation.PojoCacheable
| public class MerchantDailyAccount implements Serializable {
|
| protected float dailySpend = 1.0F;
|
|
| /**
| * Default constructor
| */
| public MerchantDailyAccount() { }
|
|
| public float getDailySpend() {
| return dailySpend;
| }
|
| public void setDailySpend(float dailySpend) {
| this.dailySpend = dailySpend;
| }
| }
Thanks,
Michael
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953590#3953590
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953590
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user