On Thu, Nov 6, 2008 at 10:54 PM, Robin Nagpal <[EMAIL PROTECTED]> wrote: > > Hi I am using this code to create a session > > private ConnectionFactory cf=new ActiveMQConnectionFactory(AMQ_USER, > AMQ_PASSWORD, this.AMQ_URL); > private Connection connection = cf.createConnection(); > session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); > > now if I have not started activemq, the thread is stuck at the third line > I want either I should get an exception of I can configure a time out for > creation of session
It seems that you forgot to call connection.start(). See the following FAQ: http://activemq.apache.org/i-am-not-receiving-any-messages-what-is-wrong.html Bruce -- perl -e 'print unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*" );' Apache ActiveMQ - http://activemq.org/ Apache Camel - http://activemq.org/camel/ Apache ServiceMix - http://servicemix.org/ Blog: http://bruceblog.org/