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