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

Galder Zamarreño galder at redhat.com
Thu Mar 17 13:02:27 EDT 2011


I was meant to post this earlier but got side-tracked by something else.

On Mar 17, 2011, at 11: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.

Yeah and it's interesting that you raise this cos it kinda links with a comment Eduardo made a few weeks ago, see http://lists.jboss.org/pipermail/infinispan-dev/2011-February/007414.html

We're currently forced to know the Externalizers in advance, so they need to be given to us at startup. This causes problem to Eduardo & co.

> 
>> 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

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache




More information about the infinispan-dev mailing list