You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by pandi79 <pa...@wipro.com> on 2007/02/26 10:29:39 UTC

Re: [Spam: 5.0] java client program for Web Demo

Thanks for your response.

Once I sent the message through html page (webdemo example), I tried the
link http://localhost:8080/activemq-web-demo/queueBrowse/myqueue?view=xml to
browse all the messages.  I am able to see (it is browse option) all the
messaages which I posted.

Then I ran my jms program to fetch all the messages available in myqueue.
But didn't get the  result.

Moreover, if I start jconsole, it's not connecting ot the broker .





James.Strachan wrote:
> 
> On 2/26/07, pandi79 <pa...@wipro.com> wrote:
>>
>> Using ActiveMQ 4.0.2 Web demo sample. Able to send & browse the message
>> via
>> internet explorer as per the instruction provided by Apache.
>>
>> But my requirement to receive the message by using JMS stand alone
>> program..
>>
>> The following steps I have done.
>>
>> 1. Sent the xml message via Html form (queue name is 'myqueue'
>> 2. Able to browse the same in IE
>> 3. Written jms program and connection details are
>>
>>         ActiveMQConnectionFactory factory = new
>> ActiveMQConnectionFactory("vm://localhost");
>>         ActiveMQQueue subQueue = new ActiveMQQueue("myqueue");
>>
>> and then tried to receive the message, but not got the posive result.
>>
>> Then changed the connection detaisl as follows
>>
>>         ActiveMQConnectionFactory factory = new
>> ActiveMQConnectionFactory("tcp://localhost:61616");
>>         ActiveMQQueue subQueue = new ActiveMQQueue("myqueue");
>>
>> Still there is no result.
>>
>> Does anyone have an idea about how to receive the message through my
>> standalone jms program (but messaes are sending through html form given
>> by
>> Web-demo example)
> 
> The latter should work. When you look at the web console do you see a
> number of messages on the queue "myqueue" ready to be consumed? Are
> you running any other consumers at the time? You might want to look at
> the JMX console.
> 
> This might help...
> http://activemq.apache.org/i-am-not-receiving-any-messages-what-is-wrong.html
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/java-client-program-for-Web-Demo-tf3291170s2354.html#a9155773
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: [Spam: 5.0] java client program for Web Demo

Posted by James Strachan <ja...@gmail.com>.
That sounds fine. The web console and web demos's usually have a
broker embedded inside them that you can talk to via TCP so there's no
absolute reason to disable vm:// transport in the web demo/console and
explicitly use TCP.

On 2/26/07, pandi79 <pa...@wipro.com> wrote:
>
> Finally my Jms program is able to receve messages from the queue.. I'ave
> updated the web.xml
>
> lThe <context-name> paragraph ine in web.xml
> <param-value>vm://localhost</param-value>
>
> is replaced by
> <param-value>tcp://localhost:61616</param-value>
>
> 1. started web demo example by the coomand  mvn jetty6:run
> 2. started the activemq broker by the command 'activemq'
> (<activemqHome>/bin/activemq)
>
> Now if start my jms program, able to receive the messages.
>
> Can anyone validate my approach was a correct one? i.e, started both jeety
> server (webdemo) and started activemq broker . Why I am asking this question
> is, as per my understanding if we start webdemo examply by jetty server, it
> would internally create broker. So we don't need to create another borker by
> the command 'activemq' in <activemqhome>/bin directory. But I started
> activemq broker explicitely.
>
> Is this apprach correct?
>
>
>
>
>
>
> pandi79 wrote:
> >
> > Thanks for your response.
> >
> > Once I sent the message through html page (webdemo example), I tried the
> > link http://localhost:8080/activemq-web-demo/queueBrowse/myqueue?view=xml
> > to browse all the messages.  I am able to see (it is browse option) all
> > the messaages which I posted.
> >
> > Then I ran my jms program to fetch all the messages available in myqueue.
> > But didn't get the  result.
> >
> > Moreover, if I start jconsole, it's not connecting ot the broker .
> >
> >
> >
> >
> >
> > James.Strachan wrote:
> >>
> >> On 2/26/07, pandi79 <pa...@wipro.com> wrote:
> >>>
> >>> Using ActiveMQ 4.0.2 Web demo sample. Able to send & browse the message
> >>> via
> >>> internet explorer as per the instruction provided by Apache.
> >>>
> >>> But my requirement to receive the message by using JMS stand alone
> >>> program..
> >>>
> >>> The following steps I have done.
> >>>
> >>> 1. Sent the xml message via Html form (queue name is 'myqueue'
> >>> 2. Able to browse the same in IE
> >>> 3. Written jms program and connection details are
> >>>
> >>>         ActiveMQConnectionFactory factory = new
> >>> ActiveMQConnectionFactory("vm://localhost");
> >>>         ActiveMQQueue subQueue = new ActiveMQQueue("myqueue");
> >>>
> >>> and then tried to receive the message, but not got the posive result.
> >>>
> >>> Then changed the connection detaisl as follows
> >>>
> >>>         ActiveMQConnectionFactory factory = new
> >>> ActiveMQConnectionFactory("tcp://localhost:61616");
> >>>         ActiveMQQueue subQueue = new ActiveMQQueue("myqueue");
> >>>
> >>> Still there is no result.
> >>>
> >>> Does anyone have an idea about how to receive the message through my
> >>> standalone jms program (but messaes are sending through html form given
> >>> by
> >>> Web-demo example)
> >>
> >> The latter should work. When you look at the web console do you see a
> >> number of messages on the queue "myqueue" ready to be consumed? Are
> >> you running any other consumers at the time? You might want to look at
> >> the JMX console.
> >>
> >> This might help...
> >> http://activemq.apache.org/i-am-not-receiving-any-messages-what-is-wrong.html
> >> --
> >>
> >> James
> >> -------
> >> http://radio.weblogs.com/0112098/
> >>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/java-client-program-for-Web-Demo-tf3291170s2354.html#a9158926
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: [Spam: 5.0] java client program for Web Demo

Posted by pandi79 <pa...@wipro.com>.
Finally my Jms program is able to receve messages from the queue.. I'ave
updated the web.xml  

lThe <context-name> paragraph ine in web.xml 
<param-value>vm://localhost</param-value>

is replaced by 
<param-value>tcp://localhost:61616</param-value>

1. started web demo example by the coomand  mvn jetty6:run
2. started the activemq broker by the command 'activemq'
(<activemqHome>/bin/activemq)

Now if start my jms program, able to receive the messages. 

Can anyone validate my approach was a correct one? i.e, started both jeety
server (webdemo) and started activemq broker . Why I am asking this question
is, as per my understanding if we start webdemo examply by jetty server, it
would internally create broker. So we don't need to create another borker by
the command 'activemq' in <activemqhome>/bin directory. But I started
activemq broker explicitely. 

Is this apprach correct?






pandi79 wrote:
> 
> Thanks for your response.
> 
> Once I sent the message through html page (webdemo example), I tried the
> link http://localhost:8080/activemq-web-demo/queueBrowse/myqueue?view=xml
> to browse all the messages.  I am able to see (it is browse option) all
> the messaages which I posted.
> 
> Then I ran my jms program to fetch all the messages available in myqueue.
> But didn't get the  result.
> 
> Moreover, if I start jconsole, it's not connecting ot the broker .
> 
> 
> 
> 
> 
> James.Strachan wrote:
>> 
>> On 2/26/07, pandi79 <pa...@wipro.com> wrote:
>>>
>>> Using ActiveMQ 4.0.2 Web demo sample. Able to send & browse the message
>>> via
>>> internet explorer as per the instruction provided by Apache.
>>>
>>> But my requirement to receive the message by using JMS stand alone
>>> program..
>>>
>>> The following steps I have done.
>>>
>>> 1. Sent the xml message via Html form (queue name is 'myqueue'
>>> 2. Able to browse the same in IE
>>> 3. Written jms program and connection details are
>>>
>>>         ActiveMQConnectionFactory factory = new
>>> ActiveMQConnectionFactory("vm://localhost");
>>>         ActiveMQQueue subQueue = new ActiveMQQueue("myqueue");
>>>
>>> and then tried to receive the message, but not got the posive result.
>>>
>>> Then changed the connection detaisl as follows
>>>
>>>         ActiveMQConnectionFactory factory = new
>>> ActiveMQConnectionFactory("tcp://localhost:61616");
>>>         ActiveMQQueue subQueue = new ActiveMQQueue("myqueue");
>>>
>>> Still there is no result.
>>>
>>> Does anyone have an idea about how to receive the message through my
>>> standalone jms program (but messaes are sending through html form given
>>> by
>>> Web-demo example)
>> 
>> The latter should work. When you look at the web console do you see a
>> number of messages on the queue "myqueue" ready to be consumed? Are
>> you running any other consumers at the time? You might want to look at
>> the JMX console.
>> 
>> This might help...
>> http://activemq.apache.org/i-am-not-receiving-any-messages-what-is-wrong.html
>> -- 
>> 
>> James
>> -------
>> http://radio.weblogs.com/0112098/
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/java-client-program-for-Web-Demo-tf3291170s2354.html#a9158926
Sent from the ActiveMQ - User mailing list archive at Nabble.com.