geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arunanthisivam Vimalathithen" <vimalathit...@gmail.com>
Subject Re: Failure when looking up an EJB consecutively
Date Tue, 26 Sep 2006 08:10:12 GMT
Hi Lasantha,

I had a look at your example and it differs in the following. Setting up the
initial context and lookup, narrowing, creation as well as the remote bean
method invocation are all within the same loop, and also the home object is
narrowed using PortableRemoteObject.narrow. I am providing you with some
sample code below. I suggest you modify your code as below to reproduce this
error. (if it works the first time which I doubt, please run again it will
throw up the error). We are currently testing this on Geronimo 1.1.1.

     for(int i=0;i<1000;i++){
     Properties properties = new Properties();
     properties.setProperty("java.naming.factory.initial","
org.openejb.client.RemoteInitialContextFactory");
        properties.setProperty("java.naming.provider.url","127.0.0.1:4201");
        properties.setProperty("java.naming.security.principal","system");
        properties.setProperty("java.naming.security.credentials
","manager");
        try {
            InitialContext ic = new InitialContext(properties);
            Object o = ic.lookup("SessionTestBean");
            SessionTestRemoteHome sessionTestRemoteHome =
(SessionTestRemoteHome)PortableRemoteObject.narrow(o,
SessionTestRemoteHome.class);
            SessionTestRemote sessionTestRemote =
sessionTestRemoteHome.create();
            sessionTestRemote.display();
        }catch(NamingException e) {
            e.printStackTrace();
        } catch (RemoteException e) {
            e.printStackTrace();
        } catch (CreateException e) {
            e.printStackTrace();
        }
     }


On 9/26/06, Lasantha Ranaweera <lasantha@opensource.lk> wrote:
>
> Hi Vimalan,
>
> I tested this problem with a 2000 consecutive requests in Geronimo v 1.1.1.
> But it doesn't happen to me at all. You can test it with the EJB samples
> application in
> http://cwiki.apache.org/GMOxDOC11/ejb-sample-application.html replacing
> following files. We might able to help you if you are more specific and
> share your code with us.
>
> Regards,
> Lasantha Ranaweera
>
> Arunanthisivam Vimalathithen wrote:
>
> Hi,
>
> I am having a problem in an application I am trying to port to WebSphere
> community edition which basically uses Geronimo 1.0 (This problem exists
> in the latest version of Geronimo (1.1.1) as well). The client I am using
> looks up the service numerous times consecutively and invokes the services.
> The problem happens when this has gone past more than 630 times, the client
> simply fails to look up and produces the following error:
>
> *java.rmi.RemoteException*: Cannot access server: /127.0.0.1:*4201*Exception: ; nested
exception is:
> *java.io.IOException*: Cannot access server: /127.0.0.1:4201 *Exception*:
> *java.net.BindException* : Address already in use: connect
>
> The same error can be produced by looking up and invoking a simple hello
> world EJB in a loop of 700 times. This happens in the latest release of
> Geronimo (sometimes the loop might need to be increased to 1000). Any work
> arounds to this?
>
> Thanks and regards,
>
> Vimalan
>
>
>
>
>

Mime
View raw message