Bug 1381374

Summary: Unable to discover JMS Queues and JMS Topics added to EAP7
Product: Red Hat CloudForms Management Engine Reporter: Vojta Prusa <vprusa>
Component: ProvidersAssignee: Jirka Kremser <jkremser>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: high    
Version: 5.7.0CC: cpelland, dajohnso, hrupp, jfrey, jhardy, jmesnil, mmahoney, obarenbo, simaishi
Target Milestone: GAKeywords: Triaged
Target Release: cfme-future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: Hawkular
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-10 15:16:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Middleware Target Upstream Version:
Attachments:
Description Flags
new jms queue in miq none

Description Vojta Prusa 2016-10-03 22:09:25 UTC
Description of problem:

Using EAP7 quickstart https://github.com/jboss-developer/jboss-eap-quickstarts/tree/7.0.0.Final/helloworld-mdb
i was able to add new JMS Queue and JMS Topic to EAP7 but for both no Messages appeared in CFME when accessed URLs as described in quickstart ( http://<eap7host>:<eap7port>/jboss-helloworld-mdb/HelloWorldMDBServletClient & http://<eap7host>:<eap7port>/jboss-helloworld-mdb/HelloWorldMDBServletClient?topic ). 
EAP7 log showed correct messages when URLs visited as described in Readme of this quickstart. 

Using EAP7 quickstart https://github.com/jboss-developer/jboss-eap-quickstarts/tree/7.0.0.Final/helloworld-jms i was able to generate JMS Queue "testQueue" message in EAP7 and see record of it in CFME.

Problem is that CFME should (as far as i know) see JMS Queues and JMS Topics records from both quickstarts.

If im missing some configuration for eap7 or quickstart please point me in the right direction. Or is this expected behavior?

Version-Release number of selected component (if applicable):
Used EAP7: download.devel.redhat.com/released/JBEAP-7/7.0.1/jboss-eap-7.0.1-full-build.zip 
Latest HS via docker until blocked by https://bugzilla.redhat.com/show_bug.cgi?id=1376110

How reproducible:
Follow quickstarts mentioned above


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
Added JMS Queue and JMS Topics to EAP7 and see them in CFME

Additional info:

Comment 2 Jirka Kremser 2016-10-20 14:08:20 UTC
Not sure I follow the description. If you expect to see the _messages_ from either from a queue or a topic, this is not how it suppose to work. We don't support that. But if you created a new topic/queue, it should eventually appear in the MiQ.

By default the hawkular wf agent does the discovery every 10 minutes and there is also some time interval how often the refresh is done on the middleware MiQ provider (I am not sure about this one though), but eventually it should end up in the MiQ inventory.

I was able to add a new queue and then see it in the MiQ, could you please try if that works for you?

Inside the docker container w/ hawkular services I run:

JAVA_OPTS="" ./jboss-cli.sh -c '/subsystem=messaging-activemq/server=default/jms-queue=foobarrr:add(entries=[java:/queue/foo])'

and then I saw that in the MiQ inventory as in the attached screenshot (comment bellow ↓)

Comment 3 Jirka Kremser 2016-10-20 14:09:07 UTC
Created attachment 1212540 [details]
new jms queue in miq

Comment 4 Vojta Prusa 2016-10-25 16:30:09 UTC
When I used JBoss EAP7 CLI to configure server i was successful at adding new JMS-queue and JMS-topic.

Quickstart https://github.com/jboss-developer/jboss-eap-quickstarts/tree/7.0.0.Final/helloworld-mdb does not add JMS-queue and JMS-topics so i wrote to devels of this quickstart to verify that behaviour of this quickstart is okay.

Log message using CLI:
2016-10-25 11:04:15,281 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 78) AMQ221003: trying to deploy queue jms.queue.foobarrr

Log message using mentioned quickstart:
2016-10-25 11:15:24,513 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0027: Starting deployment of "jboss-helloworld-mdb.war" (runtime-name: "jboss-helloworld-mdb.war")
2016-10-25 11:15:24,644 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) WFLYWELD0003: Processing weld deployment jboss-helloworld-mdb.war
2016-10-25 11:15:24,726 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-4) WFLYMSGAMQ0002: Bound messaging object to jndi name java:/queue/HELLOWORLDMDBQueue
2016-10-25 11:15:24,727 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-4) WFLYMSGAMQ0002: Bound messaging object to jndi name java:/topic/HELLOWORLDMDBTopic
2016-10-25 11:15:24,733 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) WFLYWELD0006: Starting Services for CDI deployment: jboss-helloworld-mdb.war
2016-10-25 11:15:24,760 INFO  [org.jboss.weld.deployer] (MSC service thread 1-2) WFLYWELD0009: Starting weld service for deployment jboss-helloworld-mdb.war
2016-10-25 11:15:24,782 INFO  [org.jboss.as.ejb3] (MSC service thread 1-4) WFLYEJB0042: Started message driven bean 'HelloWorldQueueMDB' with 'activemq-ra.rar' resource adapter
2016-10-25 11:15:24,784 INFO  [org.jboss.as.ejb3] (MSC service thread 1-3) WFLYEJB0042: Started message driven bean 'HelloWorldQTopicMDB' with 'activemq-ra.rar' resource adapter
2016-10-25 11:15:25,337 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 80) Initializing Mojarra 2.2.12-jbossorg-2  for context '/jboss-helloworld-mdb'
2016-10-25 11:15:25,592 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 80) WFLYUT0021: Registered web context: /jboss-helloworld-mdb
2016-10-25 11:15:25,698 INFO  [org.jboss.as.server] (management-handler-thread - 5) WFLYSRV0013: Redeployed "jboss-helloworld-mdb.war"
2016-10-25 11:15:25,698 INFO  [org.jboss.as.server] (management-handler-thread - 5) WFLYSRV0016: Replaced deployment "jboss-helloworld-mdb.war" with deployment "jboss-helloworld-mdb.war"
2016-10-25 11:15:25,723 INFO  [org.jboss.as.repository] (management-handler-thread - 5) WFLYDR0002: Content removed from location /home/hudson/jboss-eap7-standalone/standalone/data/content/26/5449f9a4fd8749f43f6c4c2fd3e2ba9c28663b/content
2016-10-25 11:15:25,760 INFO  [org.jboss.as.protocol] (management task-7) WFLYPRT0057:  cancelled task by interrupting thread Thread[management-handler-thread - 5,5,management-handler-thread]
2016-10-25 11:18:26,727 INFO  [class org.jboss.as.quickstarts.mdb.HelloWorldQueueMDB] (Thread-12 (ActiveMQ-client-global-threads-1841407585)) Received Message from queue: This is message 2
2016-10-25 11:18:26,731 INFO  [class org.jboss.as.quickstarts.mdb.HelloWorldQueueMDB] (Thread-11 (ActiveMQ-client-global-threads-1841407585)) Received Message from queue: This is message 1
2016-10-25 11:18:26,747 INFO  [class org.jboss.as.quickstarts.mdb.HelloWorldQueueMDB] (Thread-13 (ActiveMQ-client-global-threads-1841407585)) Received Message from queue: This is message 3
2016-10-25 11:18:26,751 INFO  [class org.jboss.as.quickstarts.mdb.HelloWorldQueueMDB] (Thread-14 (ActiveMQ-client-global-threads-1841407585)) Received Message from queue: This is message 4
2016-10-25 11:18:26,781 INFO  [class org.jboss.as.quickstarts.mdb.HelloWorldQueueMDB] (Thread-15 (ActiveMQ-client-global-threads-1841407585)) Received Message from queue: This is message 5
2016-10-25 11:18:33,992 INFO  [class org.jboss.as.quickstarts.mdb.HelloWorldTopicMDB] (Thread-1 (ActiveMQ-client-global-threads-1841407585)) Received Message from topic: This is message 1
2016-10-25 11:18:33,995 INFO  [class org.jboss.as.quickstarts.mdb.HelloWorldTopicMDB] (Thread-0 (ActiveMQ-client-global-threads-1841407585)) Received Message from topic: This is message 2
2016-10-25 11:18:34,000 INFO  [class org.jboss.as.quickstarts.mdb.HelloWorldTopicMDB] (Thread-2 (ActiveMQ-client-global-threads-1841407585)) Received Message from topic: This is message 3
2016-10-25 11:18:34,004 INFO  [class org.jboss.as.quickstarts.mdb.HelloWorldTopicMDB] (Thread-3 (ActiveMQ-client-global-threads-1841407585)) Received Message from topic: This is message 4
2016-10-25 11:18:34,019 INFO  [class org.jboss.as.quickstarts.mdb.HelloWorldTopicMDB] (Thread-3 (ActiveMQ-client-global-threads-1841407585)) Received Message from topic: This is message 5

Comment 5 Jeff Mesnil 2016-10-26 07:09:17 UTC
Note that the destinations (queues and topics) created by the helloworld-mdb and helloworld-jms quickstarts are *not* identical.

The helloworld-mdb creates the destinations by using the @JMSDestinationDefinition annotations. Such destinations are bound to the deployed application. They are not meant to be accessed outside of the application. They will get removed when the application is undeployed. And they have restricted management operations that are accessed from /deployment=XXX in the CLI.

The helloworld-jms creates the destinations by using CLI commands to add them to the messaging-activemq subsystem. These destinations can be accessed by any app in the app server. They are bound to the server lifecycle and they can be fully managed by using the CLI from the /subsystem=messaging-activemq address.

Comment 6 Jeff Mesnil 2016-10-26 07:09:34 UTC
Note that the destinations (queues and topics) created by the helloworld-mdb and helloworld-jms quickstarts are *not* identical.

The helloworld-mdb creates the destinations by using the @JMSDestinationDefinition annotations. Such destinations are bound to the deployed application. They are not meant to be accessed outside of the application. They will get removed when the application is undeployed. And they have restricted management operations that are accessed from /deployment=XXX in the CLI.

The helloworld-jms creates the destinations by using CLI commands to add them to the messaging-activemq subsystem. These destinations can be accessed by any app in the app server. They are bound to the server lifecycle and they can be fully managed by using the CLI from the /subsystem=messaging-activemq address.

Comment 7 Jeff Mesnil 2016-10-26 07:09:44 UTC
Note that the destinations (queues and topics) created by the helloworld-mdb and helloworld-jms quickstarts are *not* identical.

The helloworld-mdb creates the destinations by using the @JMSDestinationDefinition annotations. Such destinations are bound to the deployed application. They are not meant to be accessed outside of the application. They will get removed when the application is undeployed. And they have restricted management operations that are accessed from /deployment=XXX in the CLI.

The helloworld-jms creates the destinations by using CLI commands to add them to the messaging-activemq subsystem. These destinations can be accessed by any app in the app server. They are bound to the server lifecycle and they can be fully managed by using the CLI from the /subsystem=messaging-activemq address.

Comment 8 Vojta Prusa 2016-10-26 12:59:21 UTC
Ah, i see now, thank you for explanation.