« Return to Thread: Registry trouble in a cluster
private static final ThreadLocal _threadLocal = new ThreadLocal();
/**
* Returns the previously stored SSS.
*
* @throws ApplicationRuntimeException
* if no SSS has been stored.
*/
public static ServiceSerializationSupport getServiceSerializationSupport()
{
ServiceSerializationSupport result = null;
WeakReference reference = (WeakReference) _threadLocal.get();
if (reference != null)
result = (ServiceSerializationSupport) reference.get();
if (result == null)
throw new ApplicationRuntimeException(SerMessages.noSupportSet());
return result;
}
/**
* Stores the SSS instance for later access; if an existing SSS is already stored, then an error
* is logged (should be just one SSS per class loader).
*/
public static void setServiceSerializationSupport(
ServiceSerializationSupport serviceSerializationSupport)
{
WeakReference reference = new WeakReference(serviceSerializationSupport);
_threadLocal.set(reference);
}
I think we'll be able to use server affinity, still this shouldn't be required.
I still don't understand why is ServiceSerializationSupport not getting initialized in one of the cluster nodes.
That's right, Tapestry is handling all the serialization stuff.On 5/18/07, James Carman <james@...> wrote:Can you use server affinity for your application? Basically, HiveMind looks for a thread local variable to be set to deserialize your service proxies. The variable gets set on the initial server where the session is serialized first, but it's not set on the other server where it's deserialized. I'm assuming Tapestry is doing this behind the scenes for you and you have no control over what gets serialized?On 5/18/07, Hugo Palma <hugo.m.palma@...> wrote:I'm getting the following exception all over the logs in a clustered environment :
org.apache.hivemind.ApplicationRuntimeException: The ServiceSerializationSupport instance has not been set; this indicates that the HiveMind Registry has not been created within this JVM.
The application seems to work ok, but we are also having some session replication problems with the same application that might be related to this issue also.
Any ideas about might be causing this would be great. I'm using hivemind-1.1.1.
« Return to Thread: Registry trouble in a cluster
| Free embeddable forum powered by Nabble | Forum Help |