EJB name formatter issues with WebSphere 8.5

Document ID : KB000122179
Last Modified Date : 30/11/2018
Show Technical Document Details
Issue:
I've been trying to enable the EJB name formatter with some Message Driven Beans with WebSphere 8.5 without success. Although the {bean} part of the format works without error it doesn't give me what I expect, I have defined

SetTracerParameter: EJB2BlamePointTracerDifferentInstances nameformatter com.wily.introscope.agent.trace.ejb.Ejb2BeanNameFormatter

TraceComplexMethodsIfFlagged: MessageDrivenBeanTracing EJB2BlamePointTracerDifferentInstances "EJB|Message-driven|{interface}-{bean}-{classname}"
TraceComplexMethodsIfFlagged: MessageDrivenBeanMethodLevelTracing EJB2BlamePointTracerDifferentInstances "EJB|Message-driven|{interface}-{bean}-{classname}|{method}"


I have an EJB defined like this
 
</message-driven>
        <message-driven id="ReplyMDB">
            <ejb-name>ReplyMDB</ejb-name>
            <ejb-class>com.mydomain.ejb.AsynchReplyMDBBean</ejb-class>
            <messaging-type>javax.jms.MessageListener</messaging-type>
            <transaction-type>Container</transaction-type>
            <message-destination-type>javax.jms.Queue</message-destination-type>
            <activation-config>


But the substitution that we are getting is LocalInterface-BaseMDBBean-AsynchReplyMDBBean

why are we not getting ReplyMDB as the {bean} substitution
 
Environment:
APM 10.7 WebSphere 8.5
Resolution:
Firstly the name formatter has no visibility of the xml bean definition so cannot use information from that in it's substitution.

Secondly, the intended substitutions are as follows:

- {bean} get's replaced with instrumented class name i.e class where instrumented method is defined
- {classname} get's replaced with runtime classname

the rationale behind this approach is that most implementations of EJB beans created some strange runtime classes for EJBs that were not readable and extended actual EJB classes where business functionality was defined. That is why probe class was used for bean name rather than runtime class name.