On 03/17/2011 10:57 AM, Manik Surtani wrote: > > On 17 Mar 2011, at 10:52, Mircea Markus wrote: > >> Pluggable .toString() - can't believe I've just said that!!! :-)
lol. JBossTS does not make it pluggable, but does use an implementation specific rendering for Xids it created itself and thus knows how to decode the bytes for. Where the Xid was generated externally and passed in we just render the binary in some reasonable way. Note that the general case is that the TM is creating the Xids and the RM only working with them. If you're going for full compatibility you can copy the TS code that knows how to handle 'native' JBossTS Xids (risky, as we change for structure from from time to time), or at minimum just use the same generic binary rendering that we do. In most non-recovery cases you'll have an Xid Object created by JBossTS anyhow and it will handle the toString itself. Another possibility is to have your code test for Serializability of Xid and serialize it if possible or use its own path if not. That way you probably have native toString behaviour at recovery time too as the JBossTS impl is Serializable. Does make your code a bit more convoluted though. Jonathan. -- Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in UK and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA), Matt Parsons (USA) and Brendan Lane (Ireland). _______________________________________________ infinispan-dev mailing list [email protected] https://lists.jboss.org/mailman/listinfo/infinispan-dev
