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 {}
}
> 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
Andy Piper <an...@beasys.com> schreef in berichtnieuws
85ae4af...@beasys.com...
> ????
> 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
Andy Piper <an...@beasys.com> schreef in berichtnieuws
85zoc6e...@beasys.com...