On Jul 27, 2010, at 0:05 PM, Manik Surtani wrote:
On 27 Jul 2010, at 10:12, Galder Zamarreño wrote:
> Hi,
>
> Re:
https://jira.jboss.org/browse/ISPN-552
>
> This came from the user forum (
http://community.jboss.org/message/554531#554531). I
had originally thought of removing the if statement in MV ctor but that's not a good
idea since it can delay discovery and in single node envs it won't detect the problem.
Instead of hardcoding what the marshaller can do in MV ctor, I suggest adding a
isMarshallable method to Marshaller interface. More details in JIRA.
Why the Marshaller interface? Every impl would essentially answer isMarshallable() in
the same way, regardless of the implementation, right?
Not all. GenericJBossMarshaller + TestObjectStreamMarshaller would reply with:
return (o instanceof Serializable || o instanceof Externalizable);
However, JBossMarshaller needs to take in account @Marshallable objects that it learns
from the ConstantObjectTable, so its impl would be:
return (o instanceof Serializable || o instanceof Externalizable || ||
ReflectionUtil.isAnnotationPresent(o.getClass(), Marshallable.class));
--
Manik Surtani
manik(a)jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache