activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Snyder" <bruce.sny...@gmail.com>
Subject Re: thread is stuck is activemq is not started
Date Fri, 07 Nov 2008 06:43:48 GMT
On Thu, Nov 6, 2008 at 10:54 PM, Robin Nagpal
<robin.nagpal@globallogic.com> 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)U8V4\@4VYY9&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/

Mime
View raw message