[ http://issues.apache.org/jira/browse/HIVEMIND-83?page=comments#action_61896 ] Howard M. Lewis Ship commented on HIVEMIND-83: ----------------------------------------------
This is a tricky issue to handle, since it relates to serialization of services. What really gets serialized is a token object containing the service id. When the token object is deserialized, it looks for a Registry and replaces itself with a service proxy from the Registry. The trick is finding the Registry. The current solution uses a single global static variable to store the Registry (well, really, it's a ServiceSerializationSupport interface, but the object is the RegistryInfrastructureImpl). I'm going to make a change so that the value is stored in a ThreadLocal instead, and will use a WeakReference. I'll need to add a new method to the Registry, threadBegin(), to ensure that the correct value is stored. It's still problematic; the specific use case here is storing objects that have a reference to a HiveMind service into the HttpSession in a cluster. We pretty much know when the serialization of such objects will occur, but don't know when the objects will be de-serialized. > Multiple Hivemind registries no longer supported > ------------------------------------------------ > > Key: HIVEMIND-83 > URL: http://issues.apache.org/jira/browse/HIVEMIND-83 > Project: HiveMind > Type: Bug > Components: framework > Versions: 1.1 > Reporter: Hal Hildebrand > Assignee: Howard M. Lewis Ship > > I just updated from CVS and now get a SEVERE error in the log: > SEVERE: Replacing ServiceSerializationSupport instance > RegistryInfrastructureImpl[locale=en_US] with > RegistryInfrastructureImpl[locale=en_US]; this indicates that multiple > HiveMind Registies have been created, and conflicts may occur. > This is caused by the use of a singleton in ServiceSerializationHelper. I > started poking around and started scratching my head over this one. > I have a need for multiple registries, and this puts a severe cramp in my > usage of Hivemind. Is this a feature which can be seperated? Can we get rid > of this singleton and move it to the RegistryImpl? > I'd really hate to have to run with a hacked version. . . -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
