[infinispan-dev] @Marshallable as an option for end user externalizers?

David M. Lloyd david.lloyd at redhat.com
Thu Mar 17 10:16:03 EDT 2011


On 03/17/2011 05:43 AM, Manik Surtani wrote:
>
> On 17 Mar 2011, at 08:30, Galder Zamarreño wrote:
>
>>>
>>> Is it to do with classloader leaks?  If so, a weak map could be
>>> used for this table...
>>
>> You misunderstood what I meant. By annotation scanning I meant that
>> we won't be scanning the entire classpath for user classes that
>> have @Marshaller, right? I mean, we don't do like an EJB container
>> that goes through deployments checking for all @EJB classes, cos
>> that would be very expensive and it's not our business. So, back to
>> my question, the users will still need to give us the list of user
>> defined externalizers. Sure, we can do annotation scanning on that
>> specific list of classes.
>
> Ah I see what you mean.  Initially I thought you'd only need to
> register the externaliser when you first encounter a new type (i.e.,
> when a user defined type is first encountered with a put()), but this
> may not be the case since on the remote node it may see the a new
> magic number which may not be registered, and then you have a
> problem.

Marshalling will send Externalizers across the wire too, so the
receiving side need not know about it in advance.  The sending side can
then do this kind of discovery safely.  In addition, JBMAR already has
the @org.jboss.marshalling.Externalize annotation which does just this.

Unless you're talking about your own mechanism, anyway.  Just thought 
I'd throw this bit out there.

>
>> My point is that it might look nice that users can use annotations
>> to define some externalizer properties (id and typeClasses) but
>> they're not getting as much out of it as they'd with @EJBs in an
>> EJB container cos they have to list the externalizers somehow.
>> Again, unless you wanna get into classpath annotation search...
>
> Yeah CP scanning does suck, but it is something to think about.
> Maybe follow a SEAM-like approach and only scan jars that have a
> certain file present in its META-INF?  WDYT?
>
> Cheers Manik
>
> -- Manik Surtani manik at jboss.org twitter.com/maniksurtani
>
> Lead, Infinispan http://www.infinispan.org
>
>
>
>
> _______________________________________________ infinispan-dev
> mailing list infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


-- 
- DML


More information about the infinispan-dev mailing list