You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by vezee <ar...@yahoo.com> on 2009/09/02 21:51:31 UTC

Re: Example using REST interface with http post and get

If i am adding the below content to activemq.xml .. is it not exposing the
REST interface?
-------
<transportConnector name="http" uri="http://server1.com:61333"/>
<servlet>
                <servlet-name>MessageServlet</servlet-name>
               
<servlet-class>org.apache.activemq.web.MessageServlet</servlet-class>
                 <load-on-startup>1</load-on-startup>
                 <init-param>
                        <param-name>destinationOptions</param-name>
                        <param-value>consumer.prefetchSize=1</param-value>
                </init-param>
        </servlet>
        <servlet-mapping>
                <servlet-name>MessageServlet</servlet-name>
                <url-pattern>/queue/*</url-pattern>
        </servlet-mapping>
-----
WHY DO WE HAVE TO USE THE "DEMO" FOR REST I/F?

-vezee


James.Strachan wrote:
> 
> On 19/12/2007, Rob Davies <ra...@gmail.com> wrote:
>>
>> On Dec 19, 2007, at 12:34 AM, marlet wrote:
>>
>> >
>> > Hi,
>> >
>> > I was using the ActiveMQ's REST interface for a project and wrote
>> > about that
>> > in a blog, so if you are interested:
>> >
>> > http://p-st.blogspot.com/2007/12/activemq-and-rest.html
> 
> Great stuff - I've added a link to the articles page...
> http://cwiki.apache.org/ACTIVEMQ/articles.html
> 
> its a wiki so if you wanna add more articles feel free to edit the page...
> http://activemq.apache.org/how-do-i-edit-the-website.html
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://open.iona.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Example-using-REST-interface-with-http-post-and-get-tp14408902p25264552.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Example using REST interface with http post and get

Posted by Dejan Bosanac <de...@nighttale.net>.
I contribute here and there when I can :) Although I used and loved Postgres
and Slony, I haven't been active there

Cheers
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Tue, Sep 8, 2009 at 3:03 PM, Knight, Doug <dk...@mitre.org> wrote:

> Awesome Dejan, thank you! By the way, do you participate in other Open
> Source projects? Your name sounds familiar, and I have worked with the
> PostgreSQL and Slony groups prior. Just curious.
>
> Thanks again,
> Doug
>
>
> -----Original Message-----
> From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan
> Bosanac
> Sent: Tuesday, September 08, 2009 8:17 AM
> To: users@activemq.apache.org
> Subject: Re: Example using REST interface with http post and get
>
> Hi Doug,
>
> you can take it in an ebook form using Manning Early Access Program
> http://www.manning.com/snyder/
>
> Cheers
> --
> Dejan Bosanac
>
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
>
>
> On Tue, Sep 8, 2009 at 2:09 PM, Knight, Doug <dk...@mitre.org> wrote:
>
> > Arun,
> > A quick question, where did you find the book ActiveMQ in Action? Amazon
> > shows the title has not been released yet.
> >
> > Thanks,
> > Doug
> >
> > -----Original Message-----
> > From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan
> > Bosanac
> > Sent: Friday, September 04, 2009 8:49 AM
> > To: users@activemq.apache.org
> > Subject: Re: Example using REST interface with http post and get
> >
> > Glad that book helped :)
> >
> > Cheers
> > --
> > Dejan Bosanac
> >
> > Open Source Integration - http://fusesource.com/
> > ActiveMQ in Action - http://www.manning.com/snyder/
> > Blog - http://www.nighttale.net
> >
> >
> > On Thu, Sep 3, 2009 at 7:47 PM, vezee <ar...@yahoo.com> wrote:
> >
> > >
> > > Correct. Late yesterday, got some clues from "ActiveMQ In Action" and
> > > configured a new webapp and on new port instead of 8161. Works now.
> > >
> > > -vezee
> > >
> > > --------------------------------------
> > >
> > > Just saw your other email ... You cannot configure servlet directly in
> > > activemq.xml file ... You can use activemq.xml file to configure Jetty
> > and
> > > set web applications it will use. Then you can configure your servlet
> in
> > > appropriate web.xml of your application. Take a look at default
> > > activemq.xml
> > > and demo application in the distribution for an example of how to do
> it.
> > >
> > > Cheers
> > > --
> > > Dejan Bosanac
> > > --
> > > View this message in context:
> > >
> >
> http://www.nabble.com/Example-using-REST-interface-with-http-post-and-get-tp14408902p25280888.html
> > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > >
> > >
> >
>

RE: Example using REST interface with http post and get

Posted by "Knight, Doug" <dk...@mitre.org>.
Awesome Dejan, thank you! By the way, do you participate in other Open Source projects? Your name sounds familiar, and I have worked with the PostgreSQL and Slony groups prior. Just curious.

Thanks again,
Doug


-----Original Message-----
From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan Bosanac
Sent: Tuesday, September 08, 2009 8:17 AM
To: users@activemq.apache.org
Subject: Re: Example using REST interface with http post and get

Hi Doug,

you can take it in an ebook form using Manning Early Access Program
http://www.manning.com/snyder/

Cheers
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Tue, Sep 8, 2009 at 2:09 PM, Knight, Doug <dk...@mitre.org> wrote:

> Arun,
> A quick question, where did you find the book ActiveMQ in Action? Amazon
> shows the title has not been released yet.
>
> Thanks,
> Doug
>
> -----Original Message-----
> From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan
> Bosanac
> Sent: Friday, September 04, 2009 8:49 AM
> To: users@activemq.apache.org
> Subject: Re: Example using REST interface with http post and get
>
> Glad that book helped :)
>
> Cheers
> --
> Dejan Bosanac
>
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
>
>
> On Thu, Sep 3, 2009 at 7:47 PM, vezee <ar...@yahoo.com> wrote:
>
> >
> > Correct. Late yesterday, got some clues from "ActiveMQ In Action" and
> > configured a new webapp and on new port instead of 8161. Works now.
> >
> > -vezee
> >
> > --------------------------------------
> >
> > Just saw your other email ... You cannot configure servlet directly in
> > activemq.xml file ... You can use activemq.xml file to configure Jetty
> and
> > set web applications it will use. Then you can configure your servlet in
> > appropriate web.xml of your application. Take a look at default
> > activemq.xml
> > and demo application in the distribution for an example of how to do it.
> >
> > Cheers
> > --
> > Dejan Bosanac
> > --
> > View this message in context:
> >
> http://www.nabble.com/Example-using-REST-interface-with-http-post-and-get-tp14408902p25280888.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
> >
>

Re: Example using REST interface with http post and get

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi Doug,

you can take it in an ebook form using Manning Early Access Program
http://www.manning.com/snyder/

Cheers
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Tue, Sep 8, 2009 at 2:09 PM, Knight, Doug <dk...@mitre.org> wrote:

> Arun,
> A quick question, where did you find the book ActiveMQ in Action? Amazon
> shows the title has not been released yet.
>
> Thanks,
> Doug
>
> -----Original Message-----
> From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan
> Bosanac
> Sent: Friday, September 04, 2009 8:49 AM
> To: users@activemq.apache.org
> Subject: Re: Example using REST interface with http post and get
>
> Glad that book helped :)
>
> Cheers
> --
> Dejan Bosanac
>
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
>
>
> On Thu, Sep 3, 2009 at 7:47 PM, vezee <ar...@yahoo.com> wrote:
>
> >
> > Correct. Late yesterday, got some clues from "ActiveMQ In Action" and
> > configured a new webapp and on new port instead of 8161. Works now.
> >
> > -vezee
> >
> > --------------------------------------
> >
> > Just saw your other email ... You cannot configure servlet directly in
> > activemq.xml file ... You can use activemq.xml file to configure Jetty
> and
> > set web applications it will use. Then you can configure your servlet in
> > appropriate web.xml of your application. Take a look at default
> > activemq.xml
> > and demo application in the distribution for an example of how to do it.
> >
> > Cheers
> > --
> > Dejan Bosanac
> > --
> > View this message in context:
> >
> http://www.nabble.com/Example-using-REST-interface-with-http-post-and-get-tp14408902p25280888.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
> >
>

Simple example and setup using ActiveMQ from JavaScript

Posted by "Knight, Doug" <dk...@mitre.org>.
Hi all,
Does anyone have a simple example of how to connect to and read from a topic from JavaScript? I've looked at the Chat example, which I cannot get to work. There is also some disconnect in my knowledge as to how to configure the JavaScript "app" and ActiveMQ. I've seen some examples that talk about using servlets and Jetty, but I don't know how to set these up. What I'd like to be able to do is access a web page with JavaScript in it that reads some text data (eventually XML from a web service) from a topic. Any help would be appreciated.

Thanks,
Doug Knight
MITRE Corp


RE: Example using REST interface with http post and get

Posted by "Knight, Doug" <dk...@mitre.org>.
Arun,
A quick question, where did you find the book ActiveMQ in Action? Amazon shows the title has not been released yet.

Thanks,
Doug

-----Original Message-----
From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan Bosanac
Sent: Friday, September 04, 2009 8:49 AM
To: users@activemq.apache.org
Subject: Re: Example using REST interface with http post and get

Glad that book helped :)

Cheers
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Thu, Sep 3, 2009 at 7:47 PM, vezee <ar...@yahoo.com> wrote:

>
> Correct. Late yesterday, got some clues from "ActiveMQ In Action" and
> configured a new webapp and on new port instead of 8161. Works now.
>
> -vezee
>
> --------------------------------------
>
> Just saw your other email ... You cannot configure servlet directly in
> activemq.xml file ... You can use activemq.xml file to configure Jetty and
> set web applications it will use. Then you can configure your servlet in
> appropriate web.xml of your application. Take a look at default
> activemq.xml
> and demo application in the distribution for an example of how to do it.
>
> Cheers
> --
> Dejan Bosanac
> --
> View this message in context:
> http://www.nabble.com/Example-using-REST-interface-with-http-post-and-get-tp14408902p25280888.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: Example using REST interface with http post and get

Posted by Dejan Bosanac <de...@nighttale.net>.
Glad that book helped :)

Cheers
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Thu, Sep 3, 2009 at 7:47 PM, vezee <ar...@yahoo.com> wrote:

>
> Correct. Late yesterday, got some clues from "ActiveMQ In Action" and
> configured a new webapp and on new port instead of 8161. Works now.
>
> -vezee
>
> --------------------------------------
>
> Just saw your other email ... You cannot configure servlet directly in
> activemq.xml file ... You can use activemq.xml file to configure Jetty and
> set web applications it will use. Then you can configure your servlet in
> appropriate web.xml of your application. Take a look at default
> activemq.xml
> and demo application in the distribution for an example of how to do it.
>
> Cheers
> --
> Dejan Bosanac
> --
> View this message in context:
> http://www.nabble.com/Example-using-REST-interface-with-http-post-and-get-tp14408902p25280888.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: Example using REST interface with http post and get

Posted by vezee <ar...@yahoo.com>.
Correct. Late yesterday, got some clues from "ActiveMQ In Action" and
configured a new webapp and on new port instead of 8161. Works now. 

-vezee

--------------------------------------

Just saw your other email ... You cannot configure servlet directly in
activemq.xml file ... You can use activemq.xml file to configure Jetty and
set web applications it will use. Then you can configure your servlet in
appropriate web.xml of your application. Take a look at default activemq.xml
and demo application in the distribution for an example of how to do it.

Cheers
--
Dejan Bosanac
-- 
View this message in context: http://www.nabble.com/Example-using-REST-interface-with-http-post-and-get-tp14408902p25280888.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Example using REST interface with http post and get

Posted by Dejan Bosanac <de...@nighttale.net>.
Just saw your other email ... You cannot configure servlet directly in
activemq.xml file ... You can use activemq.xml file to configure Jetty and
set web applications it will use. Then you can configure your servlet in
appropriate web.xml of your application. Take a look at default activemq.xml
and demo application in the distribution for an example of how to do it.

Cheers
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Thu, Sep 3, 2009 at 1:51 PM, Dejan Bosanac <de...@nighttale.net> wrote:

> Hi you don't have to use demo if you want to use Rest API (although it's
> already configured there). Not sure from your snippet what are you trying to
> achieve? And what error are you getting?
>
> Cheers
> --
> Dejan Bosanac
>
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
>
>
>
> On Wed, Sep 2, 2009 at 9:51 PM, vezee <ar...@yahoo.com> wrote:
>
>>
>> If i am adding the below content to activemq.xml .. is it not exposing the
>> REST interface?
>> -------
>> <transportConnector name="http" uri="http://server1.com:61333"/>
>> <servlet>
>>                <servlet-name>MessageServlet</servlet-name>
>>
>> <servlet-class>org.apache.activemq.web.MessageServlet</servlet-class>
>>                 <load-on-startup>1</load-on-startup>
>>                 <init-param>
>>                        <param-name>destinationOptions</param-name>
>>                        <param-value>consumer.prefetchSize=1</param-value>
>>                </init-param>
>>        </servlet>
>>        <servlet-mapping>
>>                <servlet-name>MessageServlet</servlet-name>
>>                <url-pattern>/queue/*</url-pattern>
>>        </servlet-mapping>
>> -----
>> WHY DO WE HAVE TO USE THE "DEMO" FOR REST I/F?
>>
>> -vezee
>>
>>
>> James.Strachan wrote:
>> >
>> > On 19/12/2007, Rob Davies <ra...@gmail.com> wrote:
>> >>
>> >> On Dec 19, 2007, at 12:34 AM, marlet wrote:
>> >>
>> >> >
>> >> > Hi,
>> >> >
>> >> > I was using the ActiveMQ's REST interface for a project and wrote
>> >> > about that
>> >> > in a blog, so if you are interested:
>> >> >
>> >> > http://p-st.blogspot.com/2007/12/activemq-and-rest.html
>> >
>> > Great stuff - I've added a link to the articles page...
>> > http://cwiki.apache.org/ACTIVEMQ/articles.html
>> >
>> > its a wiki so if you wanna add more articles feel free to edit the
>> page...
>> > http://activemq.apache.org/how-do-i-edit-the-website.html
>> >
>> > --
>> > James
>> > -------
>> > http://macstrac.blogspot.com/
>> >
>> > Open Source Integration
>> > http://open.iona.com
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Example-using-REST-interface-with-http-post-and-get-tp14408902p25264552.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
>

Re: Example using REST interface with http post and get

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi you don't have to use demo if you want to use Rest API (although it's
already configured there). Not sure from your snippet what are you trying to
achieve? And what error are you getting?

Cheers
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Wed, Sep 2, 2009 at 9:51 PM, vezee <ar...@yahoo.com> wrote:

>
> If i am adding the below content to activemq.xml .. is it not exposing the
> REST interface?
> -------
> <transportConnector name="http" uri="http://server1.com:61333"/>
> <servlet>
>                <servlet-name>MessageServlet</servlet-name>
>
> <servlet-class>org.apache.activemq.web.MessageServlet</servlet-class>
>                 <load-on-startup>1</load-on-startup>
>                 <init-param>
>                        <param-name>destinationOptions</param-name>
>                        <param-value>consumer.prefetchSize=1</param-value>
>                </init-param>
>        </servlet>
>        <servlet-mapping>
>                <servlet-name>MessageServlet</servlet-name>
>                <url-pattern>/queue/*</url-pattern>
>        </servlet-mapping>
> -----
> WHY DO WE HAVE TO USE THE "DEMO" FOR REST I/F?
>
> -vezee
>
>
> James.Strachan wrote:
> >
> > On 19/12/2007, Rob Davies <ra...@gmail.com> wrote:
> >>
> >> On Dec 19, 2007, at 12:34 AM, marlet wrote:
> >>
> >> >
> >> > Hi,
> >> >
> >> > I was using the ActiveMQ's REST interface for a project and wrote
> >> > about that
> >> > in a blog, so if you are interested:
> >> >
> >> > http://p-st.blogspot.com/2007/12/activemq-and-rest.html
> >
> > Great stuff - I've added a link to the articles page...
> > http://cwiki.apache.org/ACTIVEMQ/articles.html
> >
> > its a wiki so if you wanna add more articles feel free to edit the
> page...
> > http://activemq.apache.org/how-do-i-edit-the-website.html
> >
> > --
> > James
> > -------
> > http://macstrac.blogspot.com/
> >
> > Open Source Integration
> > http://open.iona.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Example-using-REST-interface-with-http-post-and-get-tp14408902p25264552.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>