REST Interface StdAlone VS Clustered

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

REST Interface StdAlone VS Clustered

z94joma
This post was updated on .
See question below. It got lost in the servers.


--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: REST Interface StdAlone VS Clustered

brusdev
Hi Magnus,

I guess some parts of your message has been lost:

z94joma wrote

> ...
> Config for our working StdAlone:
>
> In broker.xml we added:
>    
> In rest-messaging.xml
>    
> In web.xml
>
> This works fine (when including below class)
> ...

Regards,
Domenico



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: REST Interface StdAlone VS Clustered

z94joma
Parts of my message was lost. Here comes again:

Hi

We are trying to setup a REST-interface as stated in the documentation:
https://activemq.apache.org/components/artemis/documentation/latest/rest.html

We have got it to work in versions 2.10.1 and 2.9.0. BUT only in standalone
versions. A clustered 2.9.0 is our current PROD-environment that we are
trying to setup to use REST.

We have a Clustered Active/Passive solution running File journaling. We have
a Netscaler in front of our Active/passive solution. We found this Bugreport
which is what we see in our system:
https://issues.apache.org/jira/browse/ARTEMIS-1320
This bug is solved in 2.3.0. And I guess we should run TCP instead of in-vm?
How do we set that up?

Config for our working StdAlone:
   <web bind=" http://lxappqmanv01:8161 " path="web">
       <app url="activemq-branding" war="activemq-branding.war"/>
       <app url="artemis-plugin" war="artemis-plugin.war"/>
       <app url="console" war="console.war"/>
       <app url="rest" war="artemis-rest-1.0-SNAPSHOT.war"/>
   </web>

In broker.xml we added:
   <acceptor name="in-vm">vm://0</acceptor>
   
In rest-messaging.xml
<rest-messaging>
   <server-in-vm-id>0</server-in-vm-id>
   <use-link-headers>false</use-link-headers>
   <default-durable-send>false</default-durable-send>
   <dups-ok>true</dups-ok>
   <topic-push-store-dir>topic-push-store</topic-push-store-dir>
   <queue-push-store-dir>queue-push-store</queue-push-store-dir>
   <producer-time-to-live>0</producer-time-to-live>
   <producer-session-pool-size>10</producer-session-pool-size>
   <session-timeout-task-interval>1</session-timeout-task-interval>
   <consumer-session-timeout-seconds>300</consumer-session-timeout-seconds>
   <consumer-window-size>-1</consumer-window-size>
   <url>vm://0</url>
</rest-messaging>
   
In web.xml
<web-app>
   <listener>
      <listener-class>com.myapp.artemis.MyResteasyBootstrap</listener-class>
   </listener>

   <listener>
     
<listener-class>org.apache.activemq.artemis.rest.integration.RestMessagingBootstrapListener</listener-class>
   </listener>

   <filter>
      <filter-name>Rest-Messaging</filter-name>
     
<filter-class>org.jboss.resteasy.plugins.server.servlet.FilterDispatcher</filter-class>
   </filter>

   <filter-mapping>
      <filter-name>Rest-Messaging</filter-name>
      <url-pattern>/*</url-pattern>
   </filter-mapping>
</web-app>  

This works fine (when including below class)
package com.myapp.artemis;

import javax.servlet.ServletContextEvent;
import org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap;
import org.jboss.resteasy.spi.Registry;


public class MyResteasyBootstrap extends ResteasyBootstrap {
    @Override
    public void contextInitialized(ServletContextEvent event)
    {
        super.contextInitialized(event);
        event.getServletContext().setAttribute(Registry.class.getName(),
deployment.getRegistry());
    }
}

*How can I get this working in a clusterd environment? How can we use TCP
instead of in-vm?*



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html