[infinispan-issues] [JBoss JIRA] Resolved: (ISPN-125) Switching to Externalizers to hardcoded indexes and @Marshallable annotation
Galder Zamarreno (JIRA)
jira-events at lists.jboss.org
Tue Jul 21 10:28:29 EDT 2009
[ https://jira.jboss.org/jira/browse/ISPN-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Galder Zamarreno resolved ISPN-125.
-----------------------------------
Resolution: Done
> Switching to Externalizers to hardcoded indexes and @Marshallable annotation
> ----------------------------------------------------------------------------
>
> Key: ISPN-125
> URL: https://jira.jboss.org/jira/browse/ISPN-125
> Project: Infinispan
> Issue Type: Bug
> Components: RPC
> Affects Versions: 4.0.0.ALPHA5
> Reporter: Galder Zamarreno
> Assignee: Galder Zamarreno
> Fix For: 4.0.0.BETA1
>
> Attachments: mylyn-context.zip
>
> Original Estimate: 0 minutes
> Remaining Estimate: 0 minutes
>
> Currently, ConstantObjectTable uses an indexed List to figure out which Externalizer it needs to read.
> This index is calculated based on the order EXTERNALIZERS.entrySet() but this order could vary depending
> on the JDK and hence, different nodes could apply a different order. This would cause ISPN to malfunction.
> Therefore, there's a need to hardcode these indexes somehow.
> On the other hard, the way Externalizers and classes externalized are linked is not ideal since this is hardcoded.
> Instead, a suggestion was made to create an annotation, i.e. @Mashallable? that is applied to classes that have
> Externalizers associated to them. This annotation would also take a hardcoded index for it, i.e.
> @Marshallable(externalizer=JGroupsAddressExternalizer.class, id=2)
> public class JGroupsAddress implements Address {
> ...
> The idea here is that instead of scanning for @Marshallable annotations at startup, instead,
> ConstantObjectTable.getObjectWriter() would be enhanced to writers map and if the target type not present,
> scan the object for Marshallable annotation and add it to the map accordingly.
> Finally, ConstantObjectTable.objects list needs to be switched to something else, possibly a identity hashmap
> so that free spaces are allowed. In the future, we could remove certain externalizers and hence that should leave
> empty spots.
> Note: We'd need some place where the next available index number for @Marshallable so that implementers can use it?
> How would we make sure this is kept up 2 date? Idea: The indexes could be maintained in a separate class that
> only contains indexes (as public static final) and @Marshallable annotations could just use them. That would give a global
> view of the available indexes.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list