TraceEventImplpublic class TraceEventImpl extends NotificationBroadcasterSupport implements TraceEventImplMBean
Fields Summary |
---|
private long | sequenceNumberNotification sequence number within the source object. | private static final String[] | types | private static final MBeanNotificationInfo[] | notifsInfo |
Constructors Summary |
---|
public TraceEventImpl()
CallflowEventListener.setTraceImpl(this);
|
Methods Summary |
---|
public void | ejbMethodEnd(java.lang.String requestId, java.lang.Throwable exception, long nanoTime, java.lang.String threadId)
long seqno;
synchronized (this) {
seqno = sequenceNumber++;
}
HashMap map = new HashMap();
map.put(REQUEST_ID,requestId);
if (exception != null) {
map.put(EXCEPTION,getExceptionString(exception));
map.put(EXCEPTION_OBJECT,exception);
}
map.put(NANO_TIME,nanoTime);
map.put(THREAD_ID, threadId);
Notification n = new Notification(
EJB_COMPONENT_METHOD_EXIT,
this, seqno, "ejb method end!");
n.setUserData(map);
sendNotification(n);
| public void | ejbMethodStart(java.lang.String requestId, java.lang.String methodName, java.lang.String componentType, java.lang.String appName, java.lang.String moduleName, java.lang.String componentName, java.lang.String tranId, java.lang.String secId, long nanoTime, java.lang.String threadId)
long seqno;
synchronized (this) {
seqno = sequenceNumber++;
}
HashMap map = new HashMap();
map.put(REQUEST_ID,requestId);
map.put(METHOD_NAME,methodName);
map.put(COMPONENT_TYPE,componentType);
map.put(APPLICATION_NAME,appName);
map.put(MODULE_NAME,moduleName);
map.put(COMPONENT_NAME,componentName);
map.put(TRANSACTION_ID,tranId);
map.put(SECURITY_ID,secId);
map.put(NANO_TIME,nanoTime);
map.put(THREAD_ID, threadId);
Notification n = new Notification(
EJB_COMPONENT_METHOD_ENTRY,
this, seqno, "ejb method start!");
n.setUserData(map);
sendNotification(n);
| private java.lang.String | getExceptionString(java.lang.Throwable exception)
StringBuffer exceptionMsg = new StringBuffer();
exceptionMsg.append(" Message: ");
String message = exception.getMessage();
exceptionMsg.append(message);
String className = exception.getClass().getName();
exceptionMsg.append(" Exception Class Name: ");
exceptionMsg.append(className);
if (exception.getCause() != null) {
exceptionMsg.append(" Exception Cause Message: ");
exceptionMsg.append(exception.getCause().getMessage());
exceptionMsg.append(" Exception Cause Class Name: ");
exceptionMsg.append(exception.getCause().getClass().getName());
}
return exceptionMsg.toString();
| public javax.management.MBeanNotificationInfo[] | getNotificationInfo()
return notifsInfo.clone();
| private java.lang.String | getRequestTypeString(com.sun.enterprise.admin.monitor.callflow.RequestType requestType)
if (RequestType.REMOTE_WEB == requestType)
return "remote web request";
if (RequestType.REMOTE_EJB == requestType)
return "remote ejb request";
if (RequestType.REMOTE_ASYNC_MESSAGE == requestType)
return "remote asynchronous message request";
if (RequestType.TIMER_EJB == requestType)
return "timer ejb request";
if (RequestType.REMOTE_WEB_SERVICE == requestType)
return "remote web service request";
return "unknown request type";
| public void | requestEnd(java.lang.String requestId, long nanoTime, java.lang.String threadId)
long seqno;
synchronized (this) {
seqno = sequenceNumber++;
}
HashMap map = new HashMap();
map.put(REQUEST_ID,requestId);
map.put(NANO_TIME,nanoTime);
map.put(THREAD_ID, threadId);
Notification n = new Notification(
REQUEST_END, this, seqno, "request end!");
n.setUserData(map);
sendNotification(n);
| public void | requestStart(java.lang.String requestId, com.sun.enterprise.admin.monitor.callflow.RequestType requestType, java.lang.String callerIPAddress, long nanoTime, java.lang.String threadId)
long seqno;
synchronized (this) {
seqno = sequenceNumber++;
}
HashMap map = new HashMap();
map.put(REQUEST_ID,requestId);
map.put(REQUEST_TYPE,getRequestTypeString(requestType));
map.put(CALLER_IPADDRESS,callerIPAddress);
map.put(NANO_TIME,nanoTime);
map.put(THREAD_ID, threadId);
Notification n = new Notification(
REQUEST_START, this, seqno, "request start!");
n.setUserData(map);
sendNotification(n);
| public void | webMethodEnd(java.lang.String requestId, java.lang.Throwable exception, long nanoTime, java.lang.String threadId)
long seqno;
synchronized (this) {
seqno = sequenceNumber++;
}
HashMap map = new HashMap();
map.put(REQUEST_ID,requestId);
if (exception != null) {
map.put(EXCEPTION,getExceptionString(exception));
map.put(EXCEPTION_OBJECT,exception);
}
map.put(NANO_TIME,nanoTime);
map.put(THREAD_ID, threadId);
Notification n = new Notification(
WEB_COMPONENT_METHOD_EXIT,
this, seqno, "web method end!");
n.setUserData(map);
sendNotification(n);
| public void | webMethodStart(java.lang.String requestId, java.lang.String methodName, java.lang.String applicationName, java.lang.String componentType, java.lang.String componentName, java.lang.String callerPrincipal, long nanoTime, java.lang.String threadId)
long seqno;
synchronized (this) {
seqno = sequenceNumber++;
}
HashMap map = new HashMap();
map.put(REQUEST_ID,requestId);
map.put(METHOD_NAME,methodName);
map.put(COMPONENT_TYPE,componentType);
map.put(COMPONENT_NAME,componentName);
map.put(CALLER_PRINCIPAL,callerPrincipal);
map.put(APPLICATION_NAME,applicationName);
map.put(NANO_TIME,nanoTime);
map.put(THREAD_ID, threadId);
Notification n = new Notification(
WEB_COMPONENT_METHOD_ENTRY,
this, seqno, "web method start!");
n.setUserData(map);
sendNotification(n);
|
|