Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What's causing the timeout of remote objects of session beans?

0 views
Skip to first unread message

K.J. van der Bent

unread,
May 18, 2001, 3:31:54 PM5/18/01
to
I wrote a small program to reproduce the timeout I receive on my remote
objects. After 3 minutes I can't connect anymore to the server through my
remote object. I'll have to create a new InitialContext, lookup the home
interface and create the remote interface again.
What properties are causing this behaviour. Orb properties? Deployment
properties? Weblogic properties?
Thanks,
K.J. van der Bent

Used: Weblogic 6.0, Windows NT, JDK 1.3


The program waits some time and then calls a simple void-method of a
deployed EJB. After a succesfull call to the EJB I increase the time by one
minute and repeat the method call. It was started from the command line as
shown below:

C:\iioptest>java -classpath
c:\jdk1.3\lib\tools.jar;.;d:\bea\wlserver6.0sp1\lib\weblogic_sp.jar;d:\bea\w
lserver6.0sp1\lib\weblogic.jar;d:\j2sdkee1.2\lib\j2ee.jar;d:\bea\wlserver6.0
sp1\config\mydomain\applications\iiopBean.jar -Djava.naming.factory.initial=
"com.sun.jndi.cosnaming.CNCtxFactory" -Djava.naming.provider.url="iiop://hvt
est09:80" myiiopClient


**** The output is as follows:

Waiting 0 millis
Waiting 60000 millis
Waiting 120000 millis
Waiting 180000 millis
Exception in thread "main" java.rmi.MarshalException: CORBA COMM_FAILURE 1
Maybe
; nested exception is:
org.omg.CORBA.COMM_FAILURE: minor code: 1 completed: Maybe
org.omg.CORBA.COMM_FAILURE: minor code: 1 completed: Maybe
at com.sun.corba.se.internal.iiop.IIOPConnection.purge_calls(Unknown
Sou
rce)
at com.sun.corba.se.internal.iiop.ReaderThread.run(Unknown Source)

**** This exception occured at the client side. The server showed nothing
(Only the previous output of the succesful method calls).

**** The source code of the client:

public class myiiopClient {
public static void main(String[] args) throws Exception {
iiopHome home = null;
iiopRemote remote = null;

try {
Context ctx = new InitialContext();
home =
(iiopHome)PortableRemoteObject.narrow(ctx.lookup("iiopBeanEJB"),
iiopHome.class);
remote = (iiopRemote) PortableRemoteObject.narrow(home.create(),
iiopRemote.class);

} catch(Exception e) {
e.printStackTrace();
}

int time = 0;
while(time < 600000 ) {
System.out.println("Waiting " + time + " millis");
Thread.currentThread().sleep(time);
remote.test();
time += 60000;
}
}

**** remote interface:
public interface iiopRemote extends EJBObject {
public void test() throws RemoteException;
}

**** home interface:
public interface iiopHome extends EJBHome

iiopRemote create() throws CreateException, RemoteException;
}

**** ejb
public class iiopBean implements SessionBean {

public void test() { System.out.println("iiopBean.test() is
lled"); }

public void ejbCreate () throws CreateException {}
public void ejbActivate() throws java.rmi.RemoteException {}
public void ejbRemove() throws java.rmi.RemoteException {}
public void ejbPassivate() throws java.rmi.RemoteException {}
public void setSessionContext(final SessionContext p1) throws
java.rmi.RemoteException {}

}

Andy Piper

unread,
May 18, 2001, 6:44:12 PM5/18/01
to
"K.J. van der Bent" <klaas.jan.v...@hta.nl> writes:

> I wrote a small program to reproduce the timeout I receive on my remote
> objects. After 3 minutes I can't connect anymore to the server through my
> remote object. I'll have to create a new InitialContext, lookup the home
> interface and create the remote interface again.
> What properties are causing this behaviour. Orb properties? Deployment
> properties? Weblogic properties?

You shouldn't be using the J2EE SDK or the weblogic jar's on the
client in this instance. Trying taking them out.

andy

K.J. van der Bent

unread,
May 19, 2001, 4:01:12 AM5/19/01
to
????
Where to get javax.ejb.* (EJBObject, EJBhome etc.) from then?
They are not part of the JDK1.3.
I think it;s hard using a remote interface, that extends another interface,
on the client without having the extended interface in the classpath.
KJ

Andy Piper <an...@beasys.com> schreef in berichtnieuws
85ae4af...@beasys.com...

Andy Piper

unread,
May 21, 2001, 12:33:08 PM5/21/01
to
"K.J. van der Bent" <klaas.jan.v...@hta.nl> writes:

> ????
> Where to get javax.ejb.* (EJBObject, EJBhome etc.) from then?
> They are not part of the JDK1.3.
> I think it;s hard using a remote interface, that extends another interface,
> on the client without having the extended interface in the classpath.

Oops. These used to be in weblogicaux.jar - but you are right you do
now need weblogic.jar, (but still not j2ee.jar).

andy

K.J. van der Bent

unread,
May 21, 2001, 5:18:04 PM5/21/01
to
OK, back on track.
Using the weblogic.jar is what I did. Since I only needed the javax.ejb.*
classes I extracted them from weblogic.jar and created a client_j2ee.jar.
The application functions properly, if it wasn't for those painfull
timeouts.
I still don't know, what times out or where it can be configured??
KJ


Andy Piper <an...@beasys.com> schreef in berichtnieuws

85zoc6e...@beasys.com...

0 new messages