Problems with tnameserv.exe in J2SDK 1.4.2_05

J

Jan Persson

Hi,

We recently upgraded our system from JDK 1.3.1 to 1.4.2_05 and now we are
experiencing strange problems in the CORBA layer connected to tnameserv.exe.

If I start a blank tnameserv.exe and run the following test program
(which basicly only connects to the naming service and then quits, in a loop)
it will only be able to do this 240 times. This means that our application
can only accept about 240 incoming connections before it crashes.

However, if I run the same code against a tnameserv.exe from JDK 1.3.1
it seems to be able to run forever.

Is this a known issue? Does anyone have a workaround?

Best Regards
//Jan Persson (Bitmine AB, Sweden)


---- code ahead ------------------------------------------------------------

import org.omg.CORBA.ORB;
import org.omg.CORBA.ORBPackage.InvalidName;
import org.omg.CosNaming.NamingContext;
import org.omg.CosNaming.NamingContextHelper;

public class TestNamingService
{

public static void main(String[] args)
{
int i=0;
for(;;i++)
{
connect();
System.out.println(i);
}
}

private static void connect()
{
System.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
System.setProperty("org.omg.CORBA.ORBInitialPort", "900");

ORB orb = ORB.init(new String[] {}, null);

// get the root naming context
org.omg.CORBA.Object objRef = null;
try
{
objRef = orb.resolve_initial_references("NameService");
}
catch (InvalidName e)
{
e.printStackTrace();
}

NamingContext ncRef = NamingContextHelper.narrow(objRef);
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top