[infinispan-dev] @Marshallable as an option for end user externalizers?
Manik Surtani
manik at jboss.org
Thu Mar 17 06:43:33 EDT 2011
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.
> 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
More information about the infinispan-dev
mailing list