Why connecting to remote JMS glassfish server is soooo slow?

Discussion in 'Java' started by askdolphin@gmail.com, May 20, 2008.

  1. Guest

    Dear All,

    I'm trying to set up the communication between the client and the
    topic/queue located on a glassfish server remotely.

    Here is the code I use:

    *************************************************
    props = new Properties();
    props.put( Context.PROVIDER_URL, "iiop://173.24.56.356:3700" );
    props.put( Context.INITIAL_CONTEXT_FACTORY,"com.sun.appserv.naming.S1ASCtxFactory" );

    jndi = new InitialContext(props);
    connectionFactory =
    (ConnectionFactory)jndi.lookup( "myonnectionFactory" );
    requestQueue = (Queue) jndi.lookup( "myRequestQueue" );
    *************************************************

    The problem is that whenever the client the launched, it takes about 2
    mins to connect. At first, it shows sth such as:

    ************************************************
    com.sun.appserv.naming.RoundRobinPolicy
    setClusterInstanceInfo
    WARNING: NAM1005 : No Endpoints selected. Please specify using system
    property com.sun.appserv.iiop.endpoints.
    Apr 23, 2008 11:43:00 AM com.sun.appserv.naming.RoundRobinPolicy
    getEndpointForProviderURL
    WARNING: NAM1001: No Endpoints selected in
    com.sun.appserv.iiop.endpoints property. Using JNDI Provider URL
    iiop://localhost:3700 instead
    Apr 23, 2008 11:43:01 AM com.sun.appserv.naming.RoundRobinPolicy
    setClusterInstanceInfo
    INFO: endpoint.weight after checking isWeight = 10
    Apr 23, 2008 11:43:01 AM com.sun.appserv.naming.RoundRobinPolicy
    setClusterInstanceInfo
    INFO: sumOfAllWeights = 10
    ************************************************

    And then it just stuck there for 2 minutes before it continues.

    Any ideas why it takes so long and how to fix it?

    Thanks,

    dolphin
    , May 20, 2008
    #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. Thomas Stein
    Replies:
    0
    Views:
    746
    Thomas Stein
    Oct 18, 2004
  2. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,666
    Smokey Grindel
    Dec 2, 2006
  3. Replies:
    0
    Views:
    407
  4. Arved Sandstrom
    Replies:
    0
    Views:
    1,221
    Arved Sandstrom
    Dec 29, 2008
  5. JMS + glassfish

    , Feb 3, 2009, in forum: Java
    Replies:
    0
    Views:
    1,744
Loading...

Share This Page