Problems with tnameserv.exe in J2SDK 1.4.2_05

Discussion in 'Java' started by Jan Persson, Aug 18, 2004.

  1. Jan Persson

    Jan Persson Guest

    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);
    }
    }
     
    Jan Persson, Aug 18, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bradley E. Rintoul

    util.concurrent in J2SDK 1.5?

    Bradley E. Rintoul, Jul 23, 2003, in forum: Java
    Replies:
    1
    Views:
    378
    Jon Skeet
    Jul 23, 2003
  2. Holger (David) Wagner
    Replies:
    5
    Views:
    2,949
    Steve
    Nov 5, 2003
  3. Cheok Yan Cheng
    Replies:
    1
    Views:
    2,168
    Ashwin
    Jun 17, 2004
  4. Roedy Green

    JDK 1.4..2_05 is ready

    Roedy Green, Jul 5, 2004, in forum: Java
    Replies:
    2
    Views:
    2,387
    Roedy Green
    Jul 5, 2004
  5. Storm
    Replies:
    2
    Views:
    907
    Storm
    Oct 16, 2004
Loading...

Share This Page