Hi Raghu,

It keeps changing. Sometimes, it is 40, 50 or some other number.

Thanks,
Saroj

>-----Original Message-----
>From: Raghuram SM [mailto:[EMAIL PROTECTED]]
>Sent: Monday, January 06, 2003 2:14 PM
>To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
>Subject: RE: java.rmi.ConnectException: Connection refused to host
>
>
>
>Hi saroj,
>  Are you getting the exception every time at 45th or it is varying.??
>
>
> M.Raghu Rama Sarma
> Virtusa India Pvt.Ltd.
> Hyderabad
> Phone : 91 40 2341 4200
>
>*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
>an attempt may be failure,
>but there should not be failure in an attempt
>
>  - Albert Einstein
>
>-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>
>
>-----Original Message-----
>From: saroj kumar [mailto:[EMAIL PROTECTED]]
>Sent: Sunday, January 05, 2003 10:44 PM
>To: [EMAIL PROTECTED]
>Subject: java.rmi.ConnectException: Connection refused to host
>
>
>Hi,
>
>I am trying to call 1 method on a SLSB remotely.
>I am running the method call in a thread which are being created
>In a loop.
>
>BASIC idea is to simulate 50 Users concurrently accessing
>
>If I create 40 threads then everything goes fine. But, the moment
>I cross 45, I start getting this error:
>
>java.rmi.ConnectException: Connection refused to host: 192.168.146.134;
>nested exception is:
>        java.net.ConnectException: Connection refused: connect
>        at
>sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
>        at
>sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
>        at
>sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
>        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
>        at
>org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknow
>n Source)
>        at
>org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JR
>MPInvoker
>Proxy.java:129)
>        at
>org.jboss.invocation.InvokerInterceptor.invoke(InvokerIntercept
>or.java:1
>08)
>        at
>org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterc
>eptor.jav
>a:77)
>        at
>org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
>        at
>org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
>        at
>org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
>        at $Proxy4.create(Unknown Source)
>        at TestQE$Tester.run(TestQE.java:310)
>Caused by: java.net.ConnectException: Connection refused: connect
>        at java.net.PlainSocketImpl.socketConnect(Native Method)
>        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
>        at
>java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
>        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
>        at java.net.Socket.connect(Socket.java:425)
>        at java.net.Socket.connect(Socket.java:375)
>        at java.net.Socket.<init>(Socket.java:290)
>        at java.net.Socket.<init>(Socket.java:118)
>        at
>sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMI
>DirectSoc
>ketFactory.java:22)
>        at
>sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMI
>MasterSoc
>ketFactory.java:122)
>        at
>sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
>        ... 12 more
>
>================================
>Code Implementation
>================================
>private void threadedTesting() throws Exception
>{
>          Context jndiContext=getInitialContext();
>         Object obj = jndiContext.lookup(JndiNames.QUERY_ENGINE);
>          qeHome =
>(QueryEngineHome)javax.rmi.PortableRemoteObject.narrow( obj,
>                        QueryEngineHome.class );
>       QueryEngine qe = (QueryEngine)qeHome.create();
>                for (int i=0; i <retry; i++)
>                {
>
>                        Tester t = new Tester(qe,i);
>                        t.start();
>                }
>        }
>
>        class Tester extends Thread
>        {
>                QueryEngine qe =  null;
>                int i;
>                public Tester(QueryEngine qe, int i)
>
>                {
>                        this.qe = qe;
>                        this.i = i;
>                }
>                public void run()
>                {
>                        try
>                        {
>
>                        System.out.println("Running Tester " + (i+1));
>                        Collection c = qe.getInboxDetails(new
>UserPK(12), 1,"1");
>                        System.out.println("Collection Size is =" +
>c.size());
>                        }
>                        catch(Exception e)
>                        {
>                                System.err.println("Error in iter " +
>i);
>                                e.printStackTrace();
>                        }
>
>                }
>        }
>
>If I call home.create() in run then I get this error at retry = 15-20.
>======
>Stats
>======
>
>Jboss 3.0.3
>JDK 1.4
>Win2k
>
>Any ideas???
>
>TIA
>-Saroj
>
>===============================================================
>============
>To unsubscribe, send email to [EMAIL PROTECTED] and
>include in the body
>of the message "signoff EJB-INTEREST".  For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to