users@glassfish.java.net

Re: JMS performance issue - need help

From: Jacob Kessler <Jacob.Kessler_at_Sun.COM>
Date: Wed, 27 Aug 2008 10:35:13 -0700

I'll admit that I don't really understand the systems involved here, but
almost all of your lookup time in both tests is in looking up the
ConnectionFactory (~1.5 seconds each time vs. ~.14 seconds for
PhysicalQueueName), so that seems like a good place to start looking for
the problem. I'm not sure if the subsequent lookup is fast because it's
already found the right place, or if there is something wrong with the
pathing to the QueueConnectionFactory, or some other issue. But that's
definitely where I would start looking to figure out why it is taking so
long. Perhaps it has been configured to look in the wrong place first
and is waiting for that to time out before moving on to its actual location?

glassfish_at_javadesktop.org wrote:
> thanks for your reply. Here I am sending my code and debug logs using System.currentTimeMillis(). It is taking approx 2 seconds to execute these lines for every request. Please can you suggest any thing incorrect here? Appreciate your time on this.
>
> try {
> System.out.println("Start Lookup ConnectionFactory " + System.currentTimeMillis());
> cf = (QueueConnectionFactory) ic.lookup("jms/ConnectionFactory");
> System.out.println("Start Lookup QueueName " + System.currentTimeMillis());
> pQueue = (Queue) ic.lookup("jms/PhysicalQueueName");
> System.out.println("After Lookup QueueName " + System.currentTimeMillis());
>
> } catch (NamingException e) {
> System.err.println("JNDI API lookup failed: " + e.toString());
> e.printStackTrace();
> System.exit(1);
> }
>
> LOGS: (1st Attempt)
> Start Lookup ConnectionFactory 1219849296160
> Start Lookup QueueName 1219849297640
> After Lookup QueueName 1219849297791
>
> LOGS: (2nd Attempt)
>
> Start Lookup ConnectionFactory 1219849535060
> Start Lookup QueueName 1219849536551
> After Lookup QueueName 1219849536681
> [Message sent by forum member 'banther' (banther)]
>
> http://forums.java.net/jive/thread.jspa?messageID=295681
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>