You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by "Hal Hildebrand (JIRA)" <hi...@jakarta.apache.org> on 2005/01/08 19:22:13 UTC

[jira] Created: (HIVEMIND-83) Multiple Hivemind registries no longer supported

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


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: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


RE: [jira] Created: (HIVEMIND-83) Multiple Hivemind registries no longer supported

Posted by Hal Hildebrand <ha...@hellblazer.com>.
Thought about this some more and I have a pretty darn easy solution.  I
found that I can't use class loading to handle my problem with this.

As an aside, I think it's antithetical to have a framework which (in part)
is designed to get rid of singletons to rely on singletons - just seems dead
wrong to me.

The solution is as simple as naming the registries.  The replacement
ServiceTokens will have the name of the registry and just pull the
appropriately named registry from a class variable map.

Sound like a decent compromise?

Also, wouldn't it make more sense to add the serialization enhancement as a
separate interceptor rather than building it into the base?  It could then
be managed separately using the mechanisms we already have for managing
interceptors. . .  

Just a thought.  It seems like this would fit more into the hivemind
philosophy.

-----Original Message-----
From: Hal Hildebrand [mailto:hal.hildebrand@hellblazer.com]

I went searching around and found setting the singleton to null stopped the
error messages.  At issue in my usage is that these registries are around at
the same time, so it seems likely that this is going to break things.  I'm
not likely to use serialization of the objects in the registries, but I
can't restrict it either.

Perhaps I can deal with it through class loader manipulation.  Kind of ugly,
though.

-----Original Message-----
From: Howard Lewis Ship [mailto:hlship@gmail.com]  

Hm. This needs pondering.  It's related to serialization of objects
which contain referencesto services... i.e., object stored into
HttpSession.  Have to dig around the the servlet APIs to see if
there's a way to get a thread local initialized to the right value at
the right time; perhaps there's some kind of listener.


On Sat, 8 Jan 2005 19:22:13 +0100 (CET), Hal Hildebrand (JIRA)
<hi...@jakarta.apache.org> wrote:
> 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
> 
> 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: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


RE: [jira] Created: (HIVEMIND-83) Multiple Hivemind registries no longer supported

Posted by Hal Hildebrand <ha...@hellblazer.com>.
I went searching around and found setting the singleton to null stopped the
error messages.  At issue in my usage is that these registries are around at
the same time, so it seems likely that this is going to break things.  I'm
not likely to use serialization of the objects in the registries, but I
can't restrict it either.

Perhaps I can deal with it through class loader manipulation.  Kind of ugly,
though.

-----Original Message-----
From: Howard Lewis Ship [mailto:hlship@gmail.com]  

Hm. This needs pondering.  It's related to serialization of objects
which contain referencesto services... i.e., object stored into
HttpSession.  Have to dig around the the servlet APIs to see if
there's a way to get a thread local initialized to the right value at
the right time; perhaps there's some kind of listener.


On Sat, 8 Jan 2005 19:22:13 +0100 (CET), Hal Hildebrand (JIRA)
<hi...@jakarta.apache.org> wrote:
> 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
> 
> 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: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: [jira] Created: (HIVEMIND-83) Multiple Hivemind registries no longer supported

Posted by Howard Lewis Ship <hl...@gmail.com>.
Hm. This needs pondering.  It's related to serialization of objects
which contain referencesto services... i.e., object stored into
HttpSession.  Have to dig around the the servlet APIs to see if
there's a way to get a thread local initialized to the right value at
the right time; perhaps there's some kind of listener.


On Sat, 8 Jan 2005 19:22:13 +0100 (CET), Hal Hildebrand (JIRA)
<hi...@jakarta.apache.org> wrote:
> 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
> 
> 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: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Updated: (HIVEMIND-83) Multiple Hivemind registries no longer supported

Posted by "Howard M. Lewis Ship (JIRA)" <hi...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/HIVEMIND-83?page=history ]

Howard M. Lewis Ship updated HIVEMIND-83:
-----------------------------------------

    Fix Version: 1.1

> 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
>      Fix For: 1.1

>
> 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: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Assigned: (HIVEMIND-83) Multiple Hivemind registries no longer supported

Posted by "Howard M. Lewis Ship (JIRA)" <hi...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/HIVEMIND-83?page=history ]

Howard M. Lewis Ship reassigned HIVEMIND-83:
--------------------------------------------

    Assign To: Howard M. Lewis Ship

> 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: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Commented: (HIVEMIND-83) Multiple Hivemind registries no longer supported

Posted by "Hal Hildebrand (JIRA)" <hi...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/HIVEMIND-83?page=comments#action_62231 ]
     
Hal Hildebrand commented on HIVEMIND-83:
----------------------------------------

Indeed, this fixes things for me.

Ship it.

> 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
>      Fix For: 1.1

>
> 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: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Commented: (HIVEMIND-83) Multiple Hivemind registries no longer supported

Posted by "Howard M. Lewis Ship (JIRA)" <hi...@jakarta.apache.org>.
     [ 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: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Commented: (HIVEMIND-83) Multiple Hivemind registries no longer supported

Posted by "James Carman (JIRA)" <hi...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/HIVEMIND-83?page=comments#action_62235 ]
     
James Carman commented on HIVEMIND-83:
--------------------------------------

Is all of this really that necessary?  What, again, is the use case for serializing a reference to a service proxy?

> 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
>      Fix For: 1.1

>
> 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: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Resolved: (HIVEMIND-83) Multiple Hivemind registries no longer supported

Posted by "Howard M. Lewis Ship (JIRA)" <hi...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/HIVEMIND-83?page=history ]
     
Howard M. Lewis Ship resolved HIVEMIND-83:
------------------------------------------

    Resolution: Fixed

I've checked in the changes described (the ThreadLocal + WeakReference, etc.).  Please verify that this addresses your issues.

If you are using serialization of service proxies, there is still an issue (that I'm not sure how to resolve!) concerning which Registry, if you have multiple active Registries, will be the one to provide the service proxies corresponding to the serialized tokens.

Please get back to me on your success so that I can close this issue.

> 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
>      Fix For: 1.1

>
> 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: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org