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

SunORB in Java 1.5.0 buggy?

7 views
Skip to first unread message

Ole Streicher

unread,
Jun 20, 2006, 3:45:30 AM6/20/06
to
Hi Group,

after switching to Java 1.5.0 I observe a lot of problems in using
Corba (SUN Orb) between different machines. If both end are on the
same machine, everything seems OK.

One of the problems what I see is that a very simple call sometimes
does not return at all; one of my calls is just an (IDL)

boolean ping();

which is implemented in Java as

public boolean ping() {
return true;
}

If this method is called with server and client being on different
machines, I see sometimes the following lines on stdout of the server
side (the side that implements ping()):

19.06.2006 14:12:27 com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl readFully
WARNUNG: "IOP00410215: (COMM_FAILURE) Read of full message failed : bytes requested = 1.012 bytes read = 700 max wait time = 3.000 total time spent waiting
= 3.190"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 215 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.transportReadTimeoutExceeded(Unknown Source)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.transportReadTimeoutExceeded(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.readFully(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.read(Unknown Source)
at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.readGIOPBody(Unknown Source)
at com.sun.corba.se.impl.transport.CorbaContactInfoBase.finishCreatingMessageMediator(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelAcceptorImpl.finishCreatingMessageMediator(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.finishReadingBits(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(Unknown Source)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(Unknown Source)

The client side blocks here completely. The network connection between
server and client is ideal: no switches etc. between them -- a direct
100 MBit connection. Testing the connection with standard tools shows
zero package loss.

The ORB used here is the SUN Orb tha comes with 1.5.0, the OS is Linux
on server and on client.

What is the cause of the problem and how it can be solved? Is the Sun
ORB really that bad or do I something wrong?

Ciao

Ole

Ole Streicher

unread,
Jun 20, 2006, 5:46:31 AM6/20/06
to
Hi again,

I made a small example that shows the problem. When running server and
client on different computers, there are exceptions observed after a
while; sometimes connected with a lock on server side.

The example consists of 3 files, the IDL, the server and the client:

MyT.idl:
----------------------------------------------------------------
interface MyT {
long ping(in wstring s);
};
----------------------------------------------------------------

MyTServer.java:
----------------------------------------------------------------
import org.omg.CORBA.ORB;
import org.omg.CosNaming.*;
import org.omg.PortableServer.*;

class MyTServer extends MyTPOA {
int i = 0;
public int ping(String s) {
return ++i;
}

public static void main(String[] args) {
try {
ORB orb = ORB.init(args, System.getProperties());
POA rootPOA= POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
rootPOA.the_POAManager().activate();
org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
MyTServer m = new MyTServer();
MyT href = MyTHelper.narrow(rootPOA.servant_to_reference(m));
NameComponent path[] = {new NameComponent("MyT", "MyT")};
ncRef.rebind(path, href);
Object o = new Object();
synchronized (o) { o.wait(); }
} catch (Throwable e) {
e.printStackTrace();
}
}
}
----------------------------------------------------------------

MyTClient.java:
----------------------------------------------------------------
import org.omg.CORBA.ORB;
import org.omg.CosNaming.*;

class MyTClient {
public static void main(String[] args) {
try {
ORB orb = ORB.init(args, System.getProperties());
org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
NameComponent path[] = { new NameComponent("MyT", "MyT") };
MyT m = MyTHelper.narrow(ncRef.resolve(path));
StringBuffer sb = new StringBuffer();
for (long i = 0; true; i++) {
sb.append(".");
System.out.println("ping("+i+")="+m.ping(s.toString()));
}
} catch (Throwable e) {
e.printStackTrace();
}
}
}
----------------------------------------------------------------

0 new messages