| Summary: | as4 plugin: message-driven beans are discovered as stateless session beans | ||
|---|---|---|---|
| Product: | [Other] RHQ Project | Reporter: | Ian Springer <ian.springer> |
| Component: | Plugins | Assignee: | Nobody <nobody> |
| Status: | NEW --- | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 4.0.0 | CC: | hbrock, hrupp |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | --- | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | |||
| Bug Blocks: | 678340 | ||
|
Description
Ian Springer
2011-05-09 23:51:47 UTC
I peeked at jmx-console and it looks like the ObjectNames of MBeans for SLSBs and MDBs both look exactly the same. Here's an example:
ear=rhq.ear,jar=rhq-enterprise-server-ejb3.jar,name=FooBean,service=EJB3
In other words, you cannot tell an SLSB MBean from an MDB MBean just from the MBean names.
Fortunately, they can be distinguished by looking at their attributes. SLSBs have the following attributes:
Name java.lang.String R StatelessDelegateWrapper MBean Attribute.
StateString java.lang.String R Started MBean Attribute.
CreateCount int R 8 MBean Attribute.
State int R 3 MBean Attribute.
InvokeStats org.jboss.ejb3.statistics.InvocationStatistics R MBean Attribute.
CurrentSize int R 5 MBean Attribute.
RemoveCount int R 3 MBean Attribute.
MaxSize int R 30 MBean Attribute.
AvailableCount int R 30 MBean Attribute.
while MDBs have the following attributes:
Name java.lang.String R MdbDelegateWrapper MBean Attribute.
KeepAliveMillis int R 60000 MBean Attribute.
StateString java.lang.String R Started MBean Attribute.
State int R 3 MBean Attribute.
InvokeStats org.jboss.ejb3.statistics.InvocationStatistics R MBean Attribute.
MinPoolSize int R 1 MBean Attribute.
MaxPoolSize int R 15 MBean Attribute.
MaxMessages int R 1 MBean Attribute.
So they could be told apart using:
if (nameAttributeValue.equals("MdbDelegateWrapper")) {
// MDB
} else {
// SLSB or SFSB
}
We currently only have one ResourceType for EJB3 beans - "EJB3 Session Bean", which represents both stateless and stateful session beans. So we'll need a new "EJB3 Message-Driven Bean" ResourceType, which would have a different set of metrics that the session bean restype to correspond to the MDB MBean attributes above.
|