external ActiveMQ 5.13.2 + WildFly 9.0.2

2016-03-18 Thread zappee
Hi,
 
I am preparing my first ActiveMQ environment with WildFly App Server.
I would like to use ActiveMQ as a stand-alone server / external message
broker.
 
So I downloaded the latest version of ActiveMQ and ActiveMQ RAR, which is
5.13.2. According to the docs and guides what I have read I did that:
 
*Install ActiveMQ as an external messaging broker:*
1) Unpack the downloaded apache-activemq-5.13.2-bin.tar.gz package
2) Start a broker:/activemq start
3) Testing the installation: http://127.0.0.1:8161/admin
 
*Install the WildFly Application Server*
1) Set up WildFly Application Server
1.1) Download WildFly Application Server
1.2) Unpack the downloaded wildfly-9.0.2.Final.tar.gz package
1.3) Create an administrator user
 
2) Install ActiveMQ
2.1) Copy activemq-rar-5.13.2.rar to /standalone/deployments/
directory
2.2) Configure the WildFly resource adapter subsystem
Edit /standalone/configuration/standalone-full.xml file and
add this snippet into the subsystem :
 

 
 
/   
activemq-rar-5.13.2.rar
   
XATransaction
false
defaultPassword
defaultUser
tcp://localhost:61616?jms.rmIdFromConnectionId=true



   
1
   
20
   
false
   
false





jms/queue/test-queue





/ 
2.3) Start server: /bin/standalone.sh -c standalone-full.xml
2.4) Configure EJB3 container to use ActiveMQ resource adapter:
Configuration > Subsystems > EJB 3 > View > Container > Edit > Default
resource adapter: activemq
 
The communication protocol between WildFly and ActiveMQ is tcp (this is the
default setting). WildFly is starting properly without any exception.

WildFly log:
/...
[org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0027:
Starting deployment of "activemq-rar-5.13.2.rar" (runtime-name:
"activemq-rar-5.13.2.rar")
[org.jboss.as.connector.deployment] (MSC service thread 1-2) WFLYJCA0007:
Registered connection factory java:/ActiveMQConnectionFactory
[org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-2)
IJ020016: Missing  element. XA recovery disabled for:
java:/ActiveMQConnectionFactory
[org.jboss.as.connector.deployment] (MSC service thread 1-2) WFLYJCA0006:
Registered admin object at java:/jms/queue/test-queue
[org.jboss.as.connector.deployment] (MSC service thread 1-1) WFLYJCA0002:
Bound JCA AdminObject [java:/jms/queue/test-queue]
[org.jboss.as.connector.deployment] (MSC service thread 1-4) WFLYJCA0002:
Bound JCA ConnectionFactory [java:/ActiveMQConnectionFactory]
[org.jboss.as.server] (ServerService Thread Pool -- 36) WFLYSRV0010:
Deployed "activemq-rar-5.13.2.rar" (runtime-name :
"activemq-rar-5.13.2.rar")
[org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management
interface listening on http://127.0.0.1:9990/management
[org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening
on http://127.0.0.1:9990
[org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full
9.0.2.Final (WildFly Core 1.0.2.Final) started in 6246ms - Started 278 of
458 services (220 services are lazy, passive or on-demand)
/

My expectation was that the jms/queue/test-queue (which is configured in the
standalone-full.xml) will appear on the activemq web console after WildFly
is started. But the queue list is totally empty on ActiveMQ web console. So
I suppose that the communication between wildfly and activemq does not work.

What is the problem here?
Is there any way to check how fine the tcp://localhost:61616 communication
works?


What is the best way to add a new queue? Can i use activemq concole to add a
new queue? Or I need to add new jms queue definition into the
standalone-full.xml file? Or booth have to work?





--
View this message in context: 
http://activemq.2283324.n4.nabble.com/external-ActiveMQ-5-13-2-WildFly-9-0-2-tp4709579.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Cannot receive message via REST

2016-03-18 Thread Alexander Sviridov
Hello!
I'm beginner user of ActiveMQ, and I use it via REST interface. 
I have no problem with posting messages in queues, but  I'm probably missing
something when receiving.
I have 1 message in queue Site.Incoming, and I cannot receive it — getting
204 no content:

15:02 $ curl --raw -v -XGET
"http://localhost:8161/api/message?destination=queue://Site.Incoming;
* About to connect() to localhost port 8161 (#0)
*   Trying ::1...
* connected
* Connected to localhost (::1) port 8161 (#0)
> GET /api/message?destination=queue://Site.Incoming HTTP/1.1
> Host: localhost:8161
> Accept: */*
> 
< HTTP/1.1 204 No Content
< Set-Cookie: JSESSIONID=pitjw15c1xhz1j9t1th2bmsll;Path=/api
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Server: Jetty(8.1.16.v20140903)

What I am doing wrong? What 



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Cannot-receive-message-via-REST-tp4709551.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Message not redirected to DLQ when exception thrown by MDB

2016-03-18 Thread THMayr
Well, it's not my job to figure out who is responsibe for this error, as long
as it is not my fault. I have to evaluate products for my customer.

Consider also there is another difference between the WildFly/ActiveMQ and
WebLogic/ActiveMQ configuration. In the Wildfly configuration, the ActiveMQ
resource adapter is involved and with WebLogic the connection is made by the
ActiveMQ JNDI connection factory.

I have no idea how to turn on logging or tracing. But what I can see on the
WildFliy console is, that WildFly throws an exception and afterwards the
ActiveMQSession throws an exception caused by the first one. In this case I
configured the MDB so, that the container is not allowed to invoke the
method /onMessage()/:

08:31:53,279 ERROR [org.jboss.as.ejb3.invocation] (default-threads - 7)
WFLYEJB0034: EJB Invocation failed on component TestMessageBeanLow for
method public void de.adesso.tma.test.ejb.
ic void de.adesso.tma.test.ejb.TestMessageBean.onMessage(javax.jms.Message)
of bean: TestMessageBeanLow is not allowed
at
org.jboss.as.ejb3.security.AuthorizationInterceptor.processInvocation(AuthorizationInterceptor.java:134)
at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at
org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at
org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at
org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:53)
at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at
org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:66)
at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at
org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at
org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at
org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentDescription$5$1.processInvocation(MessageDrivenComponentDescription.java:239)
at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at
org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at
org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
at
org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)
at
org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at
org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
at
org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at
org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at
org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:195)
at
org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)
at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at
org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at
org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)
at de.adesso.tma.test.ejb.TestMessageBean$$$view10.onMessage(Unknown
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.jboss.as.ejb3.inflow.MessageEndpointInvocationHandler.doInvoke(MessageEndpointInvocationHandler.java:139)
at
org.jboss.as.ejb3.inflow.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:73)
at
de.adesso.tma.test.ejb.TestMessageBean$$$endpoint5.onMessage(Unknown Source)
at

Re: [ANNOUNCE] CVE-2016-0782: ActiveMQ Web Console - Cross-Site Scripting

2016-03-18 Thread Derek Mahar
The security advisory announcement claims that ActiveMQ 5.13.1 and
older versions are affected and that ActiveMQ 5.13.2 fixes the issues.

On 10 March 2016 at 07:45, Christopher Shannon
 wrote:
> There following security vulnerability was reported against Apache
> ActiveMQ 5.13.0 and older versions.
>
> Please check the following document and see if you’re affected by the issue.
>
> http://activemq.apache.org/security-advisories.data/CVE-2016-0782-announcement.txt
>
> Apache ActiveMQ 5.13.1 and newer with appropriate fixes was released and
> available for upgrade.



-- 
Derek Mahar
1.514.316.6736 Home
1.514.316.7348 Mobile
1.514.461.3650 x230 Work
102-1365 boulevard René-Lévesque Est
Montréal QC H2L 2M1
Canada


ActiveMQ 5.13.1 Web Console, purge message queue, UnsupportedOperationException (possible CSRF attack)

2016-03-18 Thread Derek Mahar
What might be the cause of the following UnsupportedOperationException
that ActiveMQ 5.13.1 Web Console reports when I attempt to
unsuccessfully purge the contents of a queue, but after browsing that
same queue?

URL sequence:

http://0.0.0.0:8161/admin/browse.jsp?JMSDestination=client.order.queue
http://0.0.0.0:8161/admin/purgeDestination.action?JMSDestination=client.order.queue=queue=5b118f61-5f26-4f49-ab54-7ca682eb5b7c


 WARN |
org.springframework.web.util.NestedServletException: Request
processing failed; nested exception is
java.lang.UnsupportedOperationException: Possible CSRF attack
at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:977)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at 
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:856)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)[tomcat-servlet-api-8.0.24.jar:]
at 
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:841)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)[tomcat-servlet-api-8.0.24.jar:]
at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.apache.activemq.web.AuditFilter.doFilter(AuditFilter.java:59)[activemq-web-5.13.1.jar:5.13.1]
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)[spring-web-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:102)[file:/opt/apache-activemq-5.13.1/webapps/admin/WEB-INF/classes/:]
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.apache.activemq.web.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:47)[activemq-web-5.13.1.jar:5.13.1]
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:542)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:542)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.server.Server.handle(Server.java:499)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at 

Re: Configuring Virtual Destinations via Jolokia REST Api in ActiveMQ 5.13.2

2016-03-18 Thread Christopher Shannon
Currently this doesn't exist because Virtual destinations can only be set
on start up or modified by a runtime plugin. (either the xml runtime plugin
or the new java based one added in 5.13.0)

There would need to be a new feature implemented to enable modification
through JMX.

On Wed, Mar 16, 2016 at 1:45 PM, Adel Boutros  wrote:

> Hello,
>
> I was wondering if there is a way to configure a Virtual Destination
> programmatically using the Jolokia REST Api?
>
> I explored the JMX module using JConsole but found no possible solution.
>
> I am following the example here:
> http://activemq.apache.org/virtual-destinations.html
>
> Regards,
>
> Adel Boutros
> Murex SAS
> www.murex.com
>


Re: ActiveMQ Queue TTL

2016-03-18 Thread Tim Bain
More fundamentally, I'm saying that I have always assumed that when a STOMP
message comes to a broker, it's translated into a JMS message and it stays
in that format until it is delivered to a STOMP consumer.  If that's
accurate, it means that all JMS headers are available to be set, and they
will be acted upon by the broker in the normal fashion.   It's not about
what headers are translated from STOMP, it's about whether the ones that
aren't set by STOMP are available to be set by your Camel route.

All of this is simply my assumptions, and it doesn't mean they're right,
but hopefully someone who has better knowledge of how this works can say
whether my assumptions are right.

Tim
On Mar 18, 2016 7:26 AM, "shahbour"  wrote:

> If i got you correct , some headers on stomp are translated into JMSheaders
> , here they are http://activemq.apache.org/stomp.html specifically in
> *"Stomp extensions for JMS message semantics"*
>
> BR
>
> Shahbour
>
> On Fri, Mar 18, 2016 at 1:21 PM Tim Bain [via ActiveMQ] <
> ml-node+s2283324n4709675...@n4.nabble.com> wrote:
>
> > I thought (assumed, I guess) STOMP was just the transfer protocol but
> that
> > once the message made it to the broker it would be treated like any other
> > message.  So I had assumed you would set the same headers as for an
> > OpenWire message, including JMSExpiration.  Did I assume wrongly?
> > On Mar 18, 2016 6:53 AM, "shahbour" <[hidden email]
> > > wrote:
> >
> > > Thanks i intercepted the message and added an expires header to the
> > STOMP ,
> > > ActiveMQ stomp doesn't support ttl right ?
> > >
> > > On Fri, Mar 18, 2016 at 4:38 AM Tim Bain [via ActiveMQ] <
> > > [hidden email]  /user/SendEmail.jtp?type=node=4709675=1>>
> > wrote:
> > >
> > > > Time to live must be set by the producer; I'm not aware of a built-in
> > way
> > > > to set it from the broker.  The one thing you might be able to do is
> > use
> > > > an
> > > > embedded Camel route to set that attribute on each message as they
> are
> > > > received by the broker, but I've never tried that so I can't promise
> > > it'll
> > > > work.
> > > > On Mar 17, 2016 1:33 PM, "shahbour" <[hidden email]
> > > > > wrote:
> > > >
> > > > > Hello
> > > > >
> > > > > I want to set a default Time to live for all messages in a queue ,
> > is
> > > it
> > > > > possible and how
> > > > >
> > > > > BR
> > > > > Shahbour
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > View this message in context:
> > > > >
> > >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
> > > > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > > > >
> > > >
> > > >
> > > > --
> > > > If you reply to this email, your message will be added to the
> > discussion
> > > > below:
> > > >
> > > >
> > >
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709663.html
> > > > To unsubscribe from ActiveMQ Queue TTL, click here
> > > > <
> > >
> > >
> > > > .
> > > > NAML
> > > > <
> > >
> >
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709670.html
> >
> > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709675.html
> > To unsubscribe from ActiveMQ Queue TTL, click here
> > <
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=4709580=c2hhaGJvdXJAZ21haWwuY29tfDQ3MDk1ODB8LTE4Mzg3NzU0ODM=
> >
> > .
> > NAML
> > <
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709676.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Artemis Connection retry during initial connection

2016-03-18 Thread abhijith
Hi,

I am trying to test initial connection factory retry attempts if connection
is unsuccessful.  To try this I purposefully did not enable SSL where as my
server is setup for TLS communication.

Please find below my code 

 ActiveMQConnectionFactory cf =
ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, server1,
server2);
cf.setRetryInterval(1000);
cf.setReconnectAttempts(3);
cf.setRetryIntervalMultiplier(1.0);

When I run connection factory keeps on trying to connect even after 3
attempts. I am not sure why this keeps trying.  Is there any other flag I am
missing here?  I was also looking at some documentation or example on
initial retry attempts.  Any help is greatly appreciated.  Thanks


15:46:09.200 [Thread-10 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Started Netty Connector version
4.0.32.Final
15:46:09.200 [Thread-10 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Remote destination:
artemis01-dev.myserver.com:61616
15:46:09.306 [Thread-10 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Reconnection successful
15:46:09.495 [Thread-11 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Trying reconnection attempt 0/5
15:46:09.496 [Thread-11 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Trying to connect with connector =
org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory@701b206f,
parameters = {port=61616, host=artemis01-dev.myserver.com} connector = null
15:46:09.496 [Thread-11 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Started Netty Connector version
4.0.32.Final
15:46:09.496 [Thread-11 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Remote destination:
artemis01-dev.myserver.com:61616
15:46:09.602 [Thread-11 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Reconnection successful
15:46:09.796 [Thread-12 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Trying reconnection attempt 0/5
15:46:09.796 [Thread-12 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Trying to connect with connector =
org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory@701b206f,
parameters = {port=61616, host=artemis01-dev.myserver.com} connector = null
15:46:09.796 [Thread-12 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Started Netty Connector version
4.0.32.Final
15:46:09.796 [Thread-12 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Remote destination:
artemis01-dev.myserver.com:61616
15:46:09.893 [Thread-12 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Reconnection successful
15:46:10.084 [Thread-13 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Trying reconnection attempt 0/5
15:46:10.084 [Thread-13 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Trying to connect with connector =
org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory@701b206f,
parameters = {port=61616, host=artemis01-dev.myserver.com} connector = null
15:46:10.084 [Thread-13 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Started Netty Connector version
4.0.32.Final
15:46:10.084 [Thread-13 (ActiveMQ-client-global-threads-1238683479)] DEBUG
o.a.activemq.artemis.core.client - Remote destination:
artemis01-dev.myserver.com:61616





--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Artemis-Connection-retry-during-initial-connection-tp4709695.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Artemis REST Interface Installation in Wildfly

2016-03-18 Thread amorell
I am attempting to install the Artemis REST interface into a Wildfly domain
and I am running into an issue.  

I am building the REST WAR file using the example POM supplied in the
Artemis documentation "Installing Within Pre-configured Environment". 
However, when I attempt to install and assign the WAR to the servers, I am
getting java.lang.ClassNotFoundException:
org.apache.activemq.artemis.api.core.client.ServerLocator.

I was under the impression all of the necessary dependencies for Artemis
core were already part of Wildfly.  I have messaging configured on my
servers so I know it is there and running.

Any help/guidance would be appreciated.

Thanks,
Tony



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Artemis-REST-Interface-Installation-in-Wildfly-tp4709542.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Configuring Virtual Destinations via Jolokia REST Api in ActiveMQ 5.13.2

2016-03-18 Thread Christopher Shannon
You can create a Jira for a feature request and if someone has time they
can look at it.  Contributions are also always welcome so if you have time
you could take a look at creating a pull request to add the feature.  If
you were going to take a look at implementing it I would probably start
with using the JavaRuntimeConfigurationPlugin and wrapping that to do the
work under the covers.

On Fri, Mar 18, 2016 at 10:06 AM, Adel Boutros  wrote:

> Hello guys,
>
> There seem to be many possible ways of doing it. However, it seems a bit
> complex when you compare it to the way it is done in Qpid Java Broker or
> ActiveMQ Artemis for example:
>
>
>- Qpid Java broker:
> http://localhost:8080/api/latest/binding/topic/queue
>(+json request file for filters)
>- Artemis: http://localhost:8161/jolokia/exec/
>org.apache.activemq.artemis:type=Broker,brokerName="localhost"
>,module=Core,serviceType=Server/createDivert/myDivert/topic/queue
>
> Whereas in ActiveMQ, I have to integrate Camel, customize stuff, etc...
>
> This makes me wonder if there is a reason there is no native support for
> that in ActiveMQ's broker knowing that it also has support for Jolokia REST
> just like Artemis
>
> Regards,
>
> Adel Boutros
> Murex SAS
> www.murex.com
>
> On Fri, Mar 18, 2016 at 2:50 PM, Quinn Stevenson <
> qu...@pronoia-solutions.com> wrote:
>
> > Sorry - I was a little vague.
> >
> > I’d use a Camel route that called a bean to determine the recipient list.
> > That bean would load it’s configuration from a file, DB or whatever you
> > requirements are.  The bean would also be able to update it’s
> configuration
> > when the file changed.  You could use another route in the broker polling
> > for a configuration file, and then update the beans config when you got a
> > new file.
> >
> > I didn’t work through all the details, but that’s what I was thinking.
> >
> > > On Mar 18, 2016, at 7:09 AM, Tim Bain  wrote:
> > >
> > > In non-embedded Camel, it's possible to define routes at runtime via
> the
> > > Java API; see for example
> > >
> >
> http://nigap.blogspot.com/2012/02/camel-create-routes-dynamically.html?m=1
> > >
> > > I'm not sure if it would work for an embedded Camel context, but it
> > might.
> > >
> > > Tim
> > > On Mar 17, 2016 5:45 PM, "Quinn Stevenson" <
> qu...@pronoia-solutions.com>
> > > wrote:
> > >
> > >> Yes - the Camel route would be static, but you could use the recipient
> > >> list EIP to dynamically determine where the messages are sent.
> > >> http://camel.apache.org/recipient-list.html <
> > >> http://camel.apache.org/recipient-list.html>
> > >>
> > >>> On Mar 17, 2016, at 5:15 PM, Adel Boutros 
> wrote:
> > >>>
> > >>> Hello Quinn,
> > >>>
> > >>> Camel route is still a static way of doing it as I have to write it
> in
> > >> Xml
> > >>> file. It doesn't suite my test case which requires "dynamic" route
> > >> creation
> > >>> while the broker is running. Do you confirm this? Unless I have
> missed
> > >>> something.
> > >>>
> > >>> Just to compare with Artemis, for example, via Jolokia, you can
> create
> > a
> > >>> "Divert" which redirects messages from Topic to Queue via a REST call
> > to
> > >>> the running broker. The same applies to Qpid Java broker.
> > >>>
> > >>> Regards,
> > >>> Adel Boutros
> > >>> Murex SAS
> > >>> www.murex.com
> > >>>
> > >>> On Thu, Mar 17, 2016 at 1:33 AM, Quinn Stevenson <
> > >>> qu...@pronoia-solutions.com> wrote:
> > >>>
> >  You may be able to accomplish what you’re after using a Camel route
> >  embedded in the ActiveMQ broker.
> >  http://activemq.apache.org/broker-camel-component.html <
> >  http://activemq.apache.org/broker-camel-component.html>
> > > On Mar 16, 2016, at 4:06 PM, Adel Boutros 
> > wrote:
> > >
> > > Hello Christopher,
> > >
> > > In the way we will be using the broker, we would provide an API for
> >  clients
> > > to create these "redirections" between queues and topics on the
> fly.
> > So
> > > this feature would be really useful as I know no other way of
> > linking a
> > > queue to a topic.
> > >
> > > Regards,
> > > Adel Boutros
> > > Murex SAS
> > > www.murex.com
> > >
> > > On Wed, Mar 16, 2016 at 7:51 PM, Christopher Shannon <
> > > christopher.l.shan...@gmail.com> wrote:
> > >
> > >> Currently this doesn't exist because Virtual destinations can only
> > be
> >  set
> > >> on start up or modified by a runtime plugin. (either the xml
> runtime
> >  plugin
> > >> or the new java based one added in 5.13.0)
> > >>
> > >> There would need to be a new feature implemented to enable
> > >> modification
> > >> through JMX.
> > >>
> > >> On Wed, Mar 16, 2016 at 1:45 PM, Adel Boutros <
> sta191...@gmail.com>
> >  wrote:
> > >>
> > >>> Hello,
> > >>>
> > >>> I was wondering if there is a way to 

Re: ActiveMQ 5.13.1 Web Console, purge message queue, UnsupportedOperationException (possible CSRF attack)

2016-03-18 Thread Derek Mahar
Yes, this helps.  Though this console is "working as designed", I
don't agree that the issue is "Not a Problem" or that the design is
optimal.  The browse page could use a back link or some directions
instructing the user to press the "Queues" link to return to the queue
list.

On 17 March 2016 at 12:50, Christopher Shannon
 wrote:
> Take a look at the comments here and see if that helps you.
> https://issues.apache.org/jira/browse/AMQ-3425
>
> I think it will also work in other browsers besides firefox.
>
> On Thu, Mar 17, 2016 at 12:09 PM, Derek Mahar  wrote:
>
>> I encounter the same exception using ActiveMQ 5.13.2 Web Console.
>>
>> On 17 March 2016 at 11:50, Derek Mahar  wrote:
>> > Please note that I encountered this exception when using Firefox 45.0
>> > to access ActiveMQ Web Console.
>> >
>> > On 17 March 2016 at 11:44, Derek Mahar  wrote:
>> >> What might be the cause of the following UnsupportedOperationException
>> >> that ActiveMQ 5.13.1 Web Console reports when I attempt to
>> >> unsuccessfully purge the contents of a queue, but after browsing that
>> >> same queue?
>> >>
>> >> URL sequence:
>> >>
>> >> http://0.0.0.0:8161/admin/browse.jsp?JMSDestination=client.order.queue
>> >>
>> http://0.0.0.0:8161/admin/purgeDestination.action?JMSDestination=client.order.queue=queue=5b118f61-5f26-4f49-ab54-7ca682eb5b7c
>> >>
>> >>
>> >>  WARN |
>> >> org.springframework.web.util.NestedServletException: Request
>> >> processing failed; nested exception is
>> >> java.lang.UnsupportedOperationException: Possible CSRF attack
>> >> at
>> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:977)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
>> >> at
>> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:856)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
>> >> at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:622)[tomcat-servlet-api-8.0.24.jar:]
>> >> at
>> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:841)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
>> >> at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:729)[tomcat-servlet-api-8.0.24.jar:]
>> >> at
>> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> >> at
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> >> at
>> org.apache.activemq.web.AuditFilter.doFilter(AuditFilter.java:59)[activemq-web-5.13.1.jar:5.13.1]
>> >> at
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> >> at
>> org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)[spring-web-4.1.9.RELEASE.jar:4.1.9.RELEASE]
>> >> at
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.1.9.RELEASE.jar:4.1.9.RELEASE]
>> >> at
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> >> at
>> org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:102)[file:/opt/apache-activemq-5.13.1/webapps/admin/WEB-INF/classes/:]
>> >> at
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> >> at
>> org.apache.activemq.web.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:47)[activemq-web-5.13.1.jar:5.13.1]
>> >> at
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> >> at
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> >> at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> >> at
>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:542)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> >> at
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> >> at
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> >> at
>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> >> at
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> >> at
>> 

Re: Sending multiple files in a single message into messaging queue

2016-03-18 Thread Tim Bain
How about using an archive (tar, zip, 7z, etc.) to turn many files into one?
On Mar 18, 2016 8:04 AM, "Subbu"  wrote:

> Hi,
>
>
> As part of requirement i need to send multiple files in a single message
> into messaging queue.
>
> Please help to suggest me if any way to achieve using blobmessage or any
> others.
>
>
> Thank you
>
> Regards
> Subbu
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Sending-multiple-files-in-a-single-message-into-messaging-queue-tp4709668.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


'AllowLinkStealing' does not work for TCP transport with leveldb persistent store

2016-03-18 Thread khandelwalanuj
Hi,

I am using ActiveMQv5.11.1 with levelDB replication. I want to use
'allowLinkStealing' option for TCP transport. I tried but it doesn;t seems
to be removing old connections and adding new one.  

Thanks, 
Anuj 



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/AllowLinkStealing-does-not-work-for-TCP-transport-with-leveldb-persistent-store-tp4709667.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Configuring Virtual Destinations via Jolokia REST Api in ActiveMQ 5.13.2

2016-03-18 Thread Adel Boutros
Hello Christopher,

In the way we will be using the broker, we would provide an API for clients
to create these "redirections" between queues and topics on the fly. So
this feature would be really useful as I know no other way of linking a
queue to a topic.

Regards,
Adel Boutros
Murex SAS
www.murex.com

On Wed, Mar 16, 2016 at 7:51 PM, Christopher Shannon <
christopher.l.shan...@gmail.com> wrote:

> Currently this doesn't exist because Virtual destinations can only be set
> on start up or modified by a runtime plugin. (either the xml runtime plugin
> or the new java based one added in 5.13.0)
>
> There would need to be a new feature implemented to enable modification
> through JMX.
>
> On Wed, Mar 16, 2016 at 1:45 PM, Adel Boutros  wrote:
>
> > Hello,
> >
> > I was wondering if there is a way to configure a Virtual Destination
> > programmatically using the Jolokia REST Api?
> >
> > I explored the JMX module using JConsole but found no possible solution.
> >
> > I am following the example here:
> > http://activemq.apache.org/virtual-destinations.html
> >
> > Regards,
> >
> > Adel Boutros
> > Murex SAS
> > www.murex.com
> >
>


Re: Message not redirected to DLQ when exception thrown by MDB

2016-03-18 Thread THMayr
Hi Tim,

in this case it is expected, because I wanted to provoke an exception, which
is thrown by the container and not by the MDB code. I just wanted to see if
the message is redirected in this case to the DLQ. But the effect is the
same as when the exception is thown by /onMessage()/. The message is not
redirected to the DLQ.

Regards Thomas



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Message-not-redirected-to-DLQ-when-exception-thrown-by-MDB-tp4709187p4709554.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ Queue TTL

2016-03-18 Thread Timothy Bish


STOMP Message expiration in action:
https://github.com/apache/activemq/blob/master/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompTest.java#L1810

On 03/18/2016 08:57 AM, shahbour wrote:

If i got you correct , some headers on stomp are translated into JMSheaders
, here they are http://activemq.apache.org/stomp.html specifically in
*"Stomp extensions for JMS message semantics"*

BR

Shahbour

On Fri, Mar 18, 2016 at 1:21 PM Tim Bain [via ActiveMQ] <
ml-node+s2283324n4709675...@n4.nabble.com> wrote:


I thought (assumed, I guess) STOMP was just the transfer protocol but that
once the message made it to the broker it would be treated like any other
message.  So I had assumed you would set the same headers as for an
OpenWire message, including JMSExpiration.  Did I assume wrongly?
On Mar 18, 2016 6:53 AM, "shahbour" <[hidden email]
> wrote:


Thanks i intercepted the message and added an expires header to the

STOMP ,

ActiveMQ stomp doesn't support ttl right ?

On Fri, Mar 18, 2016 at 4:38 AM Tim Bain [via ActiveMQ] <
[hidden email] >

wrote:

Time to live must be set by the producer; I'm not aware of a built-in

way

to set it from the broker.  The one thing you might be able to do is

use

an
embedded Camel route to set that attribute on each message as they are
received by the broker, but I've never tried that so I can't promise

it'll

work.
On Mar 17, 2016 1:33 PM, "shahbour" <[hidden email]
> wrote:


Hello

I want to set a default Time to live for all messages in a queue ,

is

it

possible and how

BR
Shahbour



--
View this message in context:


http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html

Sent from the ActiveMQ - User mailing list archive at Nabble.com.



--
If you reply to this email, your message will be added to the

discussion

below:



http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709663.html

To unsubscribe from ActiveMQ Queue TTL, click here
<



.
NAML
<

http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml







--
View this message in context:


http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709670.html


Sent from the ActiveMQ - User mailing list archive at Nabble.com.

If you reply to this email, your message will be added to the discussion
below:

http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709675.html
To unsubscribe from ActiveMQ Queue TTL, click here

.
NAML






--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709676.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



--
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/