[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[ecf-dev] OOM Error using custom RegistrySharedObject and HostContainerSelector - Full Post
|
Hi all,
sorry for double posting - hotkeys are evil sometimes...
for custom error handling on server side (please see previous discussion
on this list as of 27.06.2014 with the subject "Exception Handling of
Remote Calls") we use a derived HostContainerSelector and a derived
RegistrySharedObject. See code below.
The problem seems to be that we create a instance of
RegistrySharedObject (P4RegistrySharedObject()) wich gets added to
org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject.localRegistryUnregistrationTargets
but "no one" calls
org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject.sendUnregister(RemoteServiceRegistrationImpl)
when the remote client disconnects.
So the Map grows over time and finally the server run's into an
OutOfMemory Exception after some time.
Any suggestions where the Problem is or what is missing from the
implementation?
thanks in advance!
Best Regards, Peter
BTW: we are running ECF 3.13.1.v20160405-1820
extended HostContainerSelector:
@Override
protected IRemoteServiceContainer createRSContainer(
@SuppressWarnings("rawtypes") final ServiceReference
serviceReference, final Map<String, Object> properties,
final ContainerTypeDescription containerTypeDescription)
throws SelectContainerException {
final ISharedObjectContainer container =
(ISharedObjectContainer) createContainer(serviceReference, properties,
containerTypeDescription);
final ID adapterID =
IDFactory.getDefault().createStringID(IRemoteServiceContainerAdapter.class.getName());
final ISharedObjectManager manager =
container.getSharedObjectManager();
ISharedObject so = manager.getSharedObject(adapterID);
if (so == null) {
so = new P4RegistrySharedObject();
try {
manager.addSharedObject(adapterID, so, null);
} catch (final SharedObjectAddException e) {
throw new P4ServerException(e);
}
}
return new RemoteServiceContainer(container,
(IRemoteServiceContainerAdapter) so);
}
P4RegistrySharedObject extends RegistrySharedObject and just implements
a custom getSerializableException method - since the original one is
private, it's a copy of the executeRequest method.