We can fix this by calling RMIRegistryController.getInstance().shutDown();
in DataSourceInformationManager#shutdown method. But I think we should do it
via synapse DataSourceInformationRepository, but it doesn't provide way to
clean or shutdown. Also this exception is not there in ESB because synapse
is handling RMI registry shutdown in it's shutdown hooks. This problem only
occurs when we use data sources component in other products.

WDYT?

Thanks
Milinda

On Mon, Nov 30, 2009 at 8:34 AM, Milinda Pathirage <[email protected]> wrote:

> Hi Devs,
>
> I am using data source component in BPS and when I did a graceful restart
> following exception is thrown.
>
> [2009-11-30 08:24:51,079] ERROR -  Couldn't create a local registry(RMI) :
> port 2199 already in use.
> java.rmi.server.ExportException: internal error: ObjID already in use
>     at sun.rmi.transport.ObjectTable.putTarget(ObjectTable.java:169)
>     at sun.rmi.transport.Transport.exportObject(Transport.java:74)
>     at
> sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:229)
>     at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)
>     at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:129)
>     at
> sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:190)
>     at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
>     at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:78)
>     at
> java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:186)
>     at
> org.apache.synapse.commons.util.RMIRegistryController.createLocalRegistry(RMIRegistryController.java:53)
>     at
> org.apache.synapse.commons.datasource.JNDIBasedDataSourceRepository.createJNDIEnvironment(JNDIBasedDataSourceRepository.java:483)
>     at
> org.apache.synapse.commons.datasource.JNDIBasedDataSourceRepository.init(JNDIBasedDataSourceRepository.java:63)
>     at
> org.apache.synapse.commons.datasource.DataSourceRepositoryManager.reConfigure(DataSourceRepositoryManager.java:95)
>     at
> org.apache.synapse.commons.datasource.DataSourceInformationRepository.setConfigurationProperties(DataSourceInformationRepository.java:49)
>     at
> org.apache.synapse.commons.datasource.factory.DataSourceInformationRepositoryFactory.setupDatasourceInformationRepository(DataSourceInformationRepositoryFactory.java:85)
>     at
> org.apache.synapse.commons.datasource.factory.DataSourceInformationRepositoryFactory.createDataSourceInformationRepository(DataSourceInformationRepositoryFactory.java:68)
>     at
> org.apache.synapse.commons.datasource.factory.DataSourceInformationRepositoryFactory.createDataSourceInformationRepository(DataSourceInformationRepositoryFactory.java:44)
>     at
> org.wso2.carbon.datasource.internal.DataSourceServiceComponent.getDSFromCarbonDSConfig(DataSourceServiceComponent.java:119)
>     at
> org.wso2.carbon.datasource.internal.DataSourceServiceComponent.activate(DataSourceServiceComponent.java:82)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> Any idea on resolving this issue by closing the registry instance in
> graceful restart. Do anyone know how this is handle in ESB restart?
>
> thanks
> Milinda
>
> --
> Milinda Pathirage
> Product Manager, Business Process Server - WSO2 Inc
> Blog: http://blog.mpathirage.com
>



-- 
Milinda Pathirage
Product Manager, Business Process Server - WSO2 Inc
Blog: http://blog.mpathirage.com
_______________________________________________
Carbon-dev mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to