[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Artemis setup with REST on Jetty

I am trying to run Artemis with REST support but I am missing the step that links the war file from my jetty container to my existing Artemis instance. Here are the steps I have taken:

First I created a simple broker instance:

bin/artemis create mybroker

In “etc/bootstrap.xml”, I changed <web bind="http://localhost:8161"; …> to my IP address in order to make the web UI accessible from my network. The same I did inside of “etc/jolokia-access.xml” for the <allow-origin> tag. So far, everything seems to be working fine.

I then installed a jetty servlet container using the default configuration. Next I followed the instructions from the Artemis manual on how to create a war file required to configure REST support:

Instructions were taken from, chapter “Installing Within Pre-configured Environment”. The required jar files I took from building an example rest project. The project structure is like this:

|-- pom.xml
`-- src
   `-- main
       `-- webapp
           `-- WEB-INF
                `-- lib (contains all my RESTEasy jar files)
               `-- web.xml

I then went ahead and build the war with maven: mvn install
Now I dropped the resulting war file into the jetty webapps folder, started my broker instance and started jetty.

Jetty now is throwing an exception:
java.lang.RuntimeException: ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ119007: Cannot connect to server(s). Tried with all available servers.]

I think that the missing piece is to tell jetty about my broker instance, but I do not know how and where to do so. What am I missing?

Thanks for your help!