Bug 835111 - EJB2 MDBs are DOWN in JON UI
EJB2 MDBs are DOWN in JON UI
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 5 (Show other bugs)
JON 3.0.1
All All
high Severity high
: ---
: JON 3.1.1
Assigned To: Jay Shaughnessy
Mike Foley
:
Depends On: 835113
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-25 11:02 EDT by bkramer
Modified: 2013-09-11 07:01 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 835113
: 835113 (view as bug list)
Environment:
Last Closed: 2013-09-11 07:01:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
zip file containing files from "Additional info" in the Description. (849.51 KB, application/x-zip-compressed)
2012-06-25 11:02 EDT, bkramer
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBPAPP-9397 Major Closed ProfileService incorrectly reports that EJB2 MDB has a run state of UNKNOWN when it should be STARTED 2013-09-27 08:29:33 EDT

  None (edit)
Description bkramer 2012-06-25 11:02:36 EDT
Created attachment 594207 [details]
zip file containing files from "Additional info" in the Description.

Description of problem:
For some reason, JON does not recognise UP and properly running EJB2 MDB. JMX console will show StateString = "Started" and State = "3" for this bean. At the same time, the same MDB will be detected in JON but it's availability will stay DOWN.

Version-Release number of selected component (if applicable):
JON 3.0.1

How reproducible:
Always

Steps to Reproduce:
1. Install EJB2 MDB in JBoss EAP 5.1.1;
2. Start and run JON 3.0.1 Server and Agent;
3. In JON UI, navigate to the newly installed Bean.
  
Actual results:
Although, this MDB works properly, JON reports it's as DOWN.


Expected results:
The availability of this MDB should be properly defined as UP.

Additional info:
Added screen-shots: 
1) mdb_down_in_JON.png;
2) jmx_view.png
3) destination_view.png
4) agent.log file in TRACE level;
5) AuctionOffer.jar 

** To deploy MDB, copy AuctionOffer.jar into deploy folder and add the following into ../deploy/messaging/destinations-service.xml:


<!--
      Queue Auction
-->
<mbean code="org.jboss.jms.server.destination.QueueService"
       name="jboss.messaging.destination:service=Queue,name=Auction"
       xmbean-dd="xmdesc/Queue-xmbean.xml">
       <depends optional-attribute name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
      <depends>jboss.messaging:service=PostOffice</depends>
   </mbean>
Comment 1 JBoss JIRA Server 2012-06-26 09:29:52 EDT
Ian Springer <ian.springer@redhat.com> made a comment on jira JBPAPP-9397

Did you check whether this issue also exists for EJB2 stateless session beans, stateful session beans, and/or entity beans?
Comment 2 JBoss JIRA Server 2012-06-26 10:00:58 EDT
Biljana Kramer <bkramer@redhat.com> made a comment on jira JBPAPP-9397

No, I had and tested only MDB.
Comment 3 JBoss JIRA Server 2012-06-26 15:02:36 EDT
Larry O'Leary <loleary@redhat.com> made a comment on jira JBPAPP-9397

After more consideration, we can not conclude that the RunState for the EJB2 MDB ManagedComponent is actually UNKNOWN. More investigation is being done in the upstream RHQ Bug 835113 and the findings should be updated here when available.
Comment 4 JBoss JIRA Server 2012-06-29 00:58:27 EDT
Larry O'Leary <loleary@redhat.com> updated the status of jira JBPAPP-9397 to Closed
Comment 5 JBoss JIRA Server 2012-06-29 00:58:27 EDT
Larry O'Leary <loleary@redhat.com> made a comment on jira JBPAPP-9397

Closing this as the state returned by ProfileService was actually RUNNING. It was RHQ that was setting the RunState to UNKNOWN due to a misbehaving override.
Comment 6 Jay Shaughnessy 2012-07-17 15:38:05 EDT
I'm taking this and I'm going to apply the changes that went in upstream.  Even though those changes were not the root cause of the issue, they are important fixes for the handling of ManagedComponentComponents in the AS5 plugin.
Comment 7 Jay Shaughnessy 2012-07-17 15:50:19 EDT
Release/jon3.1.x commit: 20b5b377a07f19258a58677393f80c20c20269c4

    Restructure getAvailability() and getManagedComponent() to remove
    ambiguity in UNKNOWN runState handling as well as provide consistent
    Exception throwing/handling, and ManagedComponent refresh.  Simplify the
    override point for getManagedComponent.
    
    Remove Ejb2BeanComponent's special-handling for UNKNOWN runState, previously committed for
    this fix, in favor of the new base handling.
    
    Conflicts:
    
    	modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/Ejb2BeanComponent.java
    	modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ManagedComponentComponent.java
    
    Cherry-pick of master: 8e3709f8d7a7ffce5b44322a656836be13a7a652
Comment 8 Larry O'Leary 2012-07-17 18:11:48 EDT
(In reply to comment #6)
> I'm taking this and I'm going to apply the changes that went in upstream. 
> Even though those changes were not the root cause of the issue, they are
> important fixes for the handling of ManagedComponentComponents in the AS5
> plugin.

Just for clarification, THIS WAS the root cause of this issue. Although the default UNKNOWN state wasn't directly responsible, the getAvailability override in Ejb2BeanComponent was not able to set the runState and therefore, no matter how available or unavailable the EJB2 was, it would always have an availability of UNKNOWN because it never got set.
Comment 9 John Sanda 2012-08-02 14:52:23 EDT
JON 3.1.1 ER1 build is available. Moving to ON_QA.

https://brewweb.devel.redhat.com/buildinfo?buildID=226942
Comment 10 Filip Brychta 2012-09-13 09:23:43 EDT
Verified on 3.1.1.CR2

Note You need to log in before you can comment on or make changes to this bug.