Hi,<br><br>On start the root node is created with an empty map. I&#39;ve changed it to be created with a sql null value rather than an empty map.<br>This way we&#39;ll stay consistent with the nodes added indirectly(as they are parents of nodes that are specifically added).
<br>I also hope this will solve extending JDBCacheLoader problem, as I think that for deserializaion the TransformingJDBCCacheLoader knows how to handle DB nulls.<br><br>Cheers,<br>Mircea<br><br><div><span class="gmail_quote">
On 3/4/07, <b class="gmail_sendername">Galder Zamarreno</b> &lt;<a href="mailto:galder.zamarreno@redhat.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
galder.zamarreno@redhat.com
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I&#39;ve got this working, including some basic unit tests and manual
<br>
examples to transform entired cache stores from 1.x data to 2.x. These<br>last manual examples include source code, 1.x cache stores (file and<br>jdbc derby db) and sample cache configurations.<br><br>Apart from the MV issue referred earlier, I have realised that
<br>TransformingJDBCCacheLoader will have to extend JDBCCacheLoaderOld<br>instead of JDBCCacheLoader.<br><br>The reason is because when JDBCCacheLoader starts, if the root does not<br>exist, it&#39;ll create it, which in the TransformingJDBCCacheLoader will
<br>mean creating it in 2.x format.<br><br>This wouldn&#39;t be a problem if the root node didn&#39;t need querying again,<br>but if customers want to migrate their data, they will start looping<br>from the node (cache.getRoot


()) and the first thing they&#39;ll get its<br>children. This results in trying to load the root node from the cache<br>store which breaks, as we&#39;re reading from db in 1.x format.<br><br>Remember that the TransformingJDBCCacheLoader reads in 
1.x format and<br>stores in 2.x format.<br><br>This has a very easy resolution which is extending JDBCCacheLoaderOld.<br>After that, it works like a treat :).<br><br>Manik, assuming you&#39;re happy with the original idea, would extending
<br>JDBCCacheLoaderOld for this one off cache loader be ok with you?<br><br>Galder Zamarreno wrote:<br>&gt; I haven&#39;t touched this issue for a couple of weeks and over the last<br>&gt; couple of days I had the chance to get back into it.
<br>&gt;<br>&gt; After discussions with Brian we came up with a different approach for this.<br>&gt;<br>&gt; My previous approach (don&#39;t need to read all below) relied on<br>&gt; introducing legacy code into the main source code that would be able to
<br>&gt; read 1.x serialization. As I started doing it, I realised that it would<br>&gt; need a lot of changes and it would clutter the 2.0 codebase.<br>&gt;<br>&gt; Instead, with the help of Brian, we came up with a different idea, which
<br>&gt; is creating two one-off cache loaders, TransformingJDBCCacheLoader and<br>&gt; TransformingFileCacheLoader. They extend the existing cache loaders, but<br>&gt; they differentiate by unmarshall stuff in the 1.x way.
<br>&gt;<br>&gt; This way, we have cache loaders that can read in 1.x way and write in<br>&gt; 2.x way. Now, a customer just needs to write a program that uses a cache<br>&gt; configured to use any of these two cache loaders above and all it has to
<br>&gt; do is loop through the tree reading all nodes and putting them back, and<br>&gt; voila! you have your data store format changed (I&#39;ll be writing an<br>&gt; example of this).<br>&gt;<br>&gt; It&#39;s a pretty clean solution to transforming data without making changes
<br>&gt; to main o.j.cache tree.<br>&gt;<br>&gt; But, there&#39;s always a but :), 1.4.x used<br>&gt; org.jboss.invocation.MarshalledValue so there&#39;s no way of getting around<br>&gt; the need of having this class to do this. This is because
<br>&gt; JDBCCacheLoader stored instances of MarshalledValue, so even the MV<br>&gt; class in AOP would not work cos it&#39;s a different package (it&#39;d result in<br>&gt; CCE)<br>&gt;<br>&gt; One thing Brian suggested is that these two cache loaders and
<br>&gt; jboss-minimal are kept in a separate dir structure to the main one and<br>&gt; when we distribute, we provide an extra jar containing these that can be<br>&gt; used to transform data and that&#39;s it. After that, you get rid of it, you
<br>&gt; go back to the standard libraries.<br>&gt;<br>&gt; It&#39;s pretty hard to find a neater way of dealing with this but the<br>&gt; benefits are worth it, customer&#39;s data stays alive!<br>&gt;<br>&gt; Manik and the rest, thoughts?
<br>&gt;<br>&gt; Galder Zamarreno wrote:<br>&gt;&nbsp;&nbsp;&gt; Manik Surtani wrote:<br>&gt;&nbsp;&nbsp;&gt;&gt; On 5 Feb 2007, at 19:57, Galder Zamarreno wrote:<br>&gt;&nbsp;&nbsp;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Quick (but a bit lengthy :( ) update on this:
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; - I&#39;ve created a new Marshaller called Legacy1xMarshaller (anyone&#39;s<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; got a better name?) which extends o.j.c.m.AsbtractMarshaller that<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; would do the job of marshalling stuff in the 
1.x fashion. This is to<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; be used by JDBCCacheLoader and FileCacheLoader if configured to use<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; 1.x marshalling. This has the benefit that the code in these cache<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; loaders only have to do getMarshaller().whatever... , making it very
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; simple to switch from VAM to Legacy Marshaller.<br>&gt;&nbsp;&nbsp;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt; I presume the VAM would transparently flip between marshallers, based<br>&gt;&nbsp;&nbsp;&gt;&gt; on the version short at the head of the stream?
<br>&gt;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&gt; The problem is that 1.x marshalling for cache loaders did not have<br>&gt;&nbsp;&nbsp;&gt; version numbers at the start, it was plain java serialization. Can you<br>&gt;&nbsp;&nbsp;&gt; expect VAM to detect that? That&#39;s why I thought of a Marshaller instance
<br>&gt;&nbsp;&nbsp;&gt;&nbsp;&nbsp;in AbstractCacheLoader that would either use VAM or the Legacy one. We<br>&gt;&nbsp;&nbsp;&gt; could however assume that if VAM does not find version number, it tries<br>&gt;&nbsp;&nbsp;&gt; to use Legacy one.<br>&gt;&nbsp;&nbsp;&gt;<br>


&gt;&nbsp;&nbsp;&gt; As you said later in the email, it seems like 1.4.x dealt with this<br>&gt;&nbsp;&nbsp;&gt; similar situation. I&#39;ll look at it.<br>&gt;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; - In order to do this, I need to add a new method to
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; o.j.c.m.Marshaller called objectToStream(OutputStream). The reason<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; for doing is so that FileCacheLoader just needs to call<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; getMarshaller().objectToStream() when it&#39;s trying to store data. This
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; will avoid having an if statement in storeAttributes() checking which<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Marshaller is used, and calling objectToObjectStream with the<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; corresponding ObjectOutpuStream.
<br>&gt;&nbsp;&nbsp;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt; Again, isn&#39;t this already in the VAM?<br>&gt;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&gt; Not for OutputStream. You have objectToObjectStream(Object obj,<br>&gt;&nbsp;&nbsp;&gt; ObjectOutputStream out) and objectFromStream(InputStream is), but not
<br>&gt;&nbsp;&nbsp;&gt; objectToStream for OutputStreams such as FileOutputStream.<br>&gt;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; - The decision maker for which Marshaller to use is to be done in<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; AbstractCacheLoader which will store the Marshaller used by
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; CacheLoader. getMarshaller() would decide upon configuration, which<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Marshaller to use, whether the default cache.getMarshaller() which is<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; VAM or the legacy one, making it quite clean to switch from to
<br>&gt; another.<br>&gt;&nbsp;&nbsp;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt; Look at the VAM in the 1.4.x tree - it deals with &quot;legacy support&quot; to<br>&gt;&nbsp;&nbsp;&gt;&gt; deal with JBC 1.2.x and 1.3.x for RPC calls.&nbsp;&nbsp;(removed in 2.x since<br>


&gt;&nbsp;&nbsp;&gt;&gt; the legacy support was no longer needed).&nbsp;&nbsp;Could easily be<br>&gt;&nbsp;&nbsp;&gt;&gt; re-introduced if needed to supportr legacy marshalling for CLs.<br>&gt;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&gt; Ok, i&#39;ll definitely have a look at that.
<br>&gt;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; - Configuration wise, I created Legacy1xMarshallingCacheLoaderConfig<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; (I couldn&#39;t come up with a better name!) which extends
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; IndividualCacheLoaderConfig. JDBCCacheLoaderConfig and<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; FileCacheLoaderConfig will extend<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Legacy1xMarshallingCacheLoaderConfig instead.<br>&gt;&nbsp;&nbsp;&gt;&gt;<br>


&gt;&nbsp;&nbsp;&gt;&gt; Could drop the 1x in the name, I suppose?&nbsp;&nbsp;:-)<br>&gt;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&gt; No probs :)<br>&gt;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; - Inside Legacy1xMarshallingCacheLoaderConfig, I search for
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; cache.loader.marshalling.1.x (name again!) boolean property in the<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; &lt;properties&gt; section. If true, it uses legacy marshalling, and if<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; false, which is default value, VAM.
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; - I have extended CacheLoaderTestsBase to create<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; FileCacheLoaderLegacyMarshallingTest which tests the FileCacheLoader<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; with legacy marshalling. I&#39;ll be doing the same for JDBCCacheLoader.
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; - Finally and one of the most important aspects, previous marhalling<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; relies on these classes:<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; org.jboss.invocation.MarshalledValue


;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; org.jboss.invocation.MarshalledValueInputStream;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Which used to be located in jboss-minimal.jar in 1.x. There&#39;s v<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; similar classes in AOP but not the same, so I&#39;m gonna be creating a
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; legacy directory in lib with this library. To avoid compile time<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; dependency, Legacy1xMarshaller will be instantiated via reflection,<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; so only people who actually use this will need this library. The
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; library has no conflicts with existing 2.x libraries.<br>&gt;&nbsp;&nbsp;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt; Look at the jboss-common-core jar and particularly JBCOMMON-8 in JIRA.<br>&gt;&nbsp;&nbsp;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&gt; So, did you test whether you could read data written with
<br>&gt;&nbsp;&nbsp;&gt; JDBCCacheLoader wiht MV classes with a JDBCCacheLoader not using MV<br>&gt;&nbsp;&nbsp;&gt; classes? That&#39;s one of the tests I wanted to do to see whether this<br>&gt;&nbsp;&nbsp;&gt; classes were necessary.<br>&gt;&nbsp;&nbsp;&gt;
<br>
&gt;&nbsp;&nbsp;&gt; jboss-common-core.jar contains MarshalledValueOutputStream and<br>&gt;&nbsp;&nbsp;&gt; MarshalledValueInputStream so that wouldn&#39;t be a problem for FCL.<br>&gt;&nbsp;&nbsp;&gt; JDBCCacheLoader on the contrary, wrapped the node in MarshalledValue and
<br>&gt;&nbsp;&nbsp;&gt; the wrote it as an ObjectOutputStream. I&#39;ll look at the commons code to<br>&gt;&nbsp;&nbsp;&gt; see whether it&#39;s the same which I guess might be.<br>&gt;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&gt; There&#39;s a MarshalledValue in aop libraries but quick glance at the code
<br>&gt;&nbsp;&nbsp;&gt; showed that it&#39;s slightly different.<br>&gt;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; The last problem is that these two classes access<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; org.jboss.logging.Logger that used to be in 
jboss-common.jar. Now<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; this jar certainly classes with jboss-common-core.jar in 2.x, so<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; what&#39;s I&#39;ve done is get jboss-logging-spi.jar <a href="http://2.0.2.GA" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

2.0.2.GA</a>
 and put it in<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; the legacy directory.<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; So, we end up having two legacy libraries in lib/legacy but they&#39;re<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; only needed at runtime if using 
1.x marhalling. I guess it&#39;s the<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; price to pay to make customer&#39;s life a bit easier.<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt; Trying to avoid a legacy jar dir ... like I said, see if the MV and
<br>&gt;&nbsp;&nbsp;&gt;&gt; MVIS can be in jboss-common-core (without JBoss Logging deps!)<br>&gt;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&gt; Yeah defo, we wanna avoid any legacy jars.<br>&gt;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; The other alternative would be for 
1.x marshaller not to use this<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; org.jboss.invocation.* classes and just write to Object streams but I<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; think these classes have an impact in the format of the marshalled<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; data. Brian, do you know a bit more about the role of these classes?
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; A bit more complicated than initially expected but I can&#39;t see any<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; easier way of providing backwards compatibility. Hopefully we should<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; be able to phase it out asap, 
3.x? :)<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; What this has shown as well is how different CacheLoaders marshalled<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; things in a slightly different way which makes having a common<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; framework for this even more necessary, 
i.e. VAM. :D<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Hope you&#39;re not snoring by now ;)<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; If you have better ideas for the naming I used, speak up :)<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;
<br>
&gt;&nbsp;&nbsp;&gt;&gt;&gt; Galder Zamarre�o<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Sr. Software Maintenance Engineer<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; JBoss, a division of Red Hat<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; -----Original Message-----<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; From: 
<a href="mailto:jbosscache-dev-bounces@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">jbosscache-dev-bounces@lists.jboss.org</a><br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; [mailto:<a href="mailto:jbosscache-dev-bounces@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

jbosscache-dev-bounces@lists.jboss.org
</a>] On Behalf Of Galder<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Zamarreno<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Sent: 31 January 2007 01:01<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; To: Manik Surtani<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Cc: <a href="mailto:jbosscache-dev@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">


jbosscache-dev@lists.jboss.org</a><br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Subject: RE: [jbosscache-dev] migrating data stored in 1.x format to<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; VAM format<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; +1, VAM should be the default.
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Only people who are resilient to change their existing stores to VAM<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; should use the 1.x option, which would need explicitly definition.<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Galder Zamarre�o<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Sr. Software Maintenance Engineer<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; JBoss, a division of Red Hat<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; -----Original Message-----
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; From: Manik Surtani [mailto:<a href="mailto:manik@jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">manik@jboss.org</a>]<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Sent: 30 January 2007 22:55
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; To: Galder Zamarreno<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Cc: 
<a href="mailto:jbosscache-dev@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">jbosscache-dev@lists.jboss.org</a><br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Subject: Re: [jbosscache-dev] migrating data stored in 
1.x format to<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; VAM format<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; I see what you mean, although I would like the default to be to use<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; the VAM.<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; --<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Manik Surtani<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Lead, JBoss Cache<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; JBoss, a division of Red Hat<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Email: <a href="mailto:manik@jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

manik@jboss.org</a><br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Telephone: +44 7786 702 706
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; MSN: <a href="mailto:manik@surtani.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">manik@surtani.org</a><br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; Yahoo/AIM/Skype: maniksurtani<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; On 30 Jan 2007, at 20:45, Galder Zamarreno wrote:
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; Actually, the more I think about this, the less I like the idea of<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; switching the marshalling from 1.x to 2.x at the CacheLoaders<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; level, or at least forcing them to do so.
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; Customers that want to use JBossCache 2.x might be reluctant to<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; migrate their data from one format to the other. I can see how an<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; existing customer might think this is a proper pain in the ass,
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; independent of the benefits, and might reduce adoption among them.<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; We want to remove barriers upgrading, but at the same time, we want<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; new customer to use new marshalling, so I&#39;d actually implement the
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; possibility to use 1.x marshalling which is plan java serialization<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; at the CacheLoader level. This could easily achieved adding a<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; property to the &lt;properties&gt; section.
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; Just note that this does not apply to the marshalling done at<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; replication level as there&#39;s no hard data that needs migrating.<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; Galder Zamarre�o<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; Sr. Software Maintenance Engineer<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; JBoss, a division of Red Hat<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; -----Original Message-----
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; From: <a href="mailto:jbosscache-dev-bounces@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">jbosscache-dev-bounces@lists.jboss.org</a> [mailto:<a href="mailto:jbosscache-dev-" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

jbosscache-dev-</a><br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; <a href="mailto:bounces@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
bounces@lists.jboss.org</a>] On Behalf Of Galder Zamarreno<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; Sent: 25 January 2007 13:07<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; To: <a href="mailto:jbosscache-dev@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

jbosscache-dev@lists.jboss.org
</a><br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; Subject: [jbosscache-dev] migrating data stored in 1.x format to<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; VAM format<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; Hi all,<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>


&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; I&#39;m deferring <a href="http://jira.jboss.com/jira/browse/JBCACHE-879" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://jira.jboss.com/jira/browse/JBCACHE-879</a> to
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; BETA2 because I still need to write this: <a href="http://jira.jboss.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://jira.jboss.com/</a><br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; jira/browse/JBCACHE-882<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; The reason I&#39;m deferring it is because I can&#39;t see a<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; straightforward way of doing such thing right now. Ideally, you
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; should be able run a 1.x version (cache1) and a 2.x version<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; (cache2) of JBC in the same VM so that you can do a loop of<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; cache1.get() and call 
cache2.put(). However, I have doubts that<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; that this approach will be free of class loading issues. What do<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; you think?<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; I was wondering whether Region based could help here, but I can&#39;t
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; see right now how this could be done.<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; Something I had in mind is having the capability of to start a<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; cache with either 
1.x marshalling or VAM marshalling, but oriented<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; at being used only at the cache loader level. It wouldn&#39;t make much<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; sense for replication because there&#39;s no hard data there.
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; I thought that you could start two instances of cache 2.x, first<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; with 1.x. marshalling and the other one with VAM both pointing to
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; different JDBCCacheLoader stores. You could then get from the first<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; using normal mmarshalling and put in the second one which has VAM<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; marshalling active, what do you think?
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; If you like the approach, I should be have it ready by BETA2.<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; This last approach looks simpler to me, what do you think?
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; Galder Zamarre�o<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; Sr. Software Maintenance Engineer<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; JBoss, a division of Red Hat<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; _______________________________________________<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; jbosscache-dev mailing list<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; <a href="mailto:jbosscache-dev@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">


jbosscache-dev@lists.jboss.org</a><br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/jbosscache-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.jboss.org/mailman/listinfo/jbosscache-dev
</a><br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; _______________________________________________
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; jbosscache-dev mailing list<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; <a href="mailto:jbosscache-dev@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">jbosscache-dev@lists.jboss.org
</a><br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/jbosscache-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
https://lists.jboss.org/mailman/listinfo/jbosscache-dev</a><br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; _______________________________________________<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; jbosscache-dev mailing list
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; <a href="mailto:jbosscache-dev@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">jbosscache-dev@lists.jboss.org</a><br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/jbosscache-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

https://lists.jboss.org/mailman/listinfo/jbosscache-dev
</a><br>&gt;&nbsp;&nbsp;&gt;&gt;<br>&gt;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&gt;<br>&gt;<br><br>--<br>Galder Zamarre�o<br>Sr. Software Maintenance Engineer<br>JBoss, a division of Red Hat<br><br>_______________________________________________<br>jbosscache-dev mailing list
<br><a href="mailto:jbosscache-dev@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">jbosscache-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/jbosscache-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

https://lists.jboss.org/mailman/listinfo/jbosscache-dev</a><br></blockquote>
</div><br>