[prev in list] [next in list] [prev in thread] [next in thread] 

List:       esb-java-dev
Subject:    Re: [Carbon-dev] How to shutdown RMI registry created in synapse
From:       Milinda Pathirage <milinda () wso2 ! com>
Date:       2009-11-30 6:38:30
Message-ID: e95cae600911292226m41673dd1v996297af835cbbbc () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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 <milinda@wso2.com> 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


[Attachment #5 (text/html)]

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&#39;t provide way to clean or shutdown. \
Also this exception is not there in ESB because synapse is handling RMI registry \
shutdown in it&#39;s shutdown hooks. This problem only occurs when we use data \
sources component in other products.<br> \
<br>WDYT?<br><br>Thanks<br>Milinda<br><br><div class="gmail_quote">On Mon, Nov 30, \
2009 at 8:34 AM, Milinda Pathirage <span dir="ltr">&lt;<a \
href="mailto:milinda@wso2.com">milinda@wso2.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> Hi Devs,<br><br>I am using data source component in \
BPS and when I did a graceful restart following exception is \
thrown.<br><br>[2009-11-30 08:24:51,079] ERROR -  Couldn&#39;t create a local \
registry(RMI) : port 2199 already in use.<br>

java.rmi.server.ExportException: internal error: ObjID already in use<br>    at \
sun.rmi.transport.ObjectTable.putTarget(ObjectTable.java:169)<br>    at \
sun.rmi.transport.Transport.exportObject(Transport.java:74)<br>    at \
sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:229)<br>

    at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)<br>    at \
sun.rmi.transport.LiveRef.exportObject(LiveRef.java:129)<br>    at \
sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:190)<br>

    at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)<br>    at \
sun.rmi.registry.RegistryImpl.&lt;init&gt;(RegistryImpl.java:78)<br>    at \
java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:186)<br>

    at org.apache.synapse.commons.util.RMIRegistryController.createLocalRegistry(RMIRegistryController.java:53)<br> \
at org.apache.synapse.commons.datasource.JNDIBasedDataSourceRepository.createJNDIEnvironment(JNDIBasedDataSourceRepository.java:483)<br>


    at org.apache.synapse.commons.datasource.JNDIBasedDataSourceRepository.init(JNDIBasedDataSourceRepository.java:63)<br> \
at org.apache.synapse.commons.datasource.DataSourceRepositoryManager.reConfigure(DataSourceRepositoryManager.java:95)<br>


    at org.apache.synapse.commons.datasource.DataSourceInformationRepository.setConfigurationProperties(DataSourceInformationRepository.java:49)<br> \
at org.apache.synapse.commons.datasource.factory.DataSourceInformationRepositoryFactor \
y.setupDatasourceInformationRepository(DataSourceInformationRepositoryFactory.java:85)<br>


    at org.apache.synapse.commons.datasource.factory.DataSourceInformationRepositoryFa \
ctory.createDataSourceInformationRepository(DataSourceInformationRepositoryFactory.java:68)<br> \
at org.apache.synapse.commons.datasource.factory.DataSourceInformationRepositoryFactor \
y.createDataSourceInformationRepository(DataSourceInformationRepositoryFactory.java:44)<br>


    at org.wso2.carbon.datasource.internal.DataSourceServiceComponent.getDSFromCarbonDSConfig(DataSourceServiceComponent.java:119)<br> \
at org.wso2.carbon.datasource.internal.DataSourceServiceComponent.activate(DataSourceServiceComponent.java:82)<br>


    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>    at \
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>    \
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>


<br>Any idea on resolving this issue by closing the registry instance in graceful \
restart. Do anyone know how this is handle in ESB \
restart?<br><br>thanks<br>Milinda<br clear="all"><font color="#888888"><br>-- \
<br>Milinda Pathirage<br> Product Manager, Business Process Server - WSO2 Inc<br>
Blog: <a href="http://blog.mpathirage.com" \
target="_blank">http://blog.mpathirage.com</a><br> </font></blockquote></div><br><br \
clear="all"><br>-- <br>Milinda Pathirage<br>Product Manager, Business Process Server \
- WSO2 Inc<br>Blog: <a \
href="http://blog.mpathirage.com">http://blog.mpathirage.com</a><br>



_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic