[infinispan-dev] [ISPN-125] Reading part of dynamic externalizer mappings
Galder Zamarreno
galder.zamarreno at redhat.com
Fri Jul 17 04:50:57 EDT 2009
On 07/16/2009 06:20 PM, David M. Lloyd wrote:
> On 07/16/2009 11:10 AM, Galder Zamarreno wrote:
>> Hi,
>>
>> Re: https://jira.jboss.org/jira/browse/ISPN-125
>>
>> I've been thinking more about this and I don't have the reading part
>> very clear. At runtime, it's very easy to check the externalizer map
>> to see if there's externalizer for class A and if there isn't any,
>> inspect the class for @Marshallable annotation, instantiate the A's
>> Externalizer class and add it to the map.
>>
>> However, the reading part is a fairly difficult problem to crack cos
>> all you'd get would be an Id which you'd need to map back to an
>> Externalizer that will be used for reading. However, how does the
>> reader know what's the mapping Id to Externalizer mapping?
>
> Crazy idea from Ignoramus Park here, but how about storing the
> Externalizer class in the cache itself? Then if an endpoint gets an ID
> it doesn't know, it can hit the cache to ask for it.
At the marshaller level, we don't have access to the cache itself, we
just marshall stuff. Such option would lead to a reentrant call to the
cache which could get things complicated...
>
> - DML
>
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache
More information about the infinispan-dev
mailing list