use of fish.payara.notification.requesttracing.RequestTraceSpanLog in project Payara by payara.
the class SafeProperties method constructEjbMethodSpanLog.
private RequestTraceSpanLog constructEjbMethodSpanLog(CallFlowInfo info, boolean callEnter) {
String eventName = "enterEjbMethodEvent";
if (!callEnter) {
eventName = "exitEjbMethodEvent";
}
RequestTraceSpanLog spanLog = new RequestTraceSpanLog(eventName);
spanLog.addLogEntry("ApplicationName", info.getApplicationName());
spanLog.addLogEntry("ComponentName", info.getComponentName());
spanLog.addLogEntry("ComponentType", info.getComponentType().toString());
spanLog.addLogEntry("ModuleName", info.getModuleName());
spanLog.addLogEntry("EJBClass", this.ejbClass.getCanonicalName());
spanLog.addLogEntry("EJBMethod", info.getMethod().getName());
spanLog.addLogEntry("CallerPrincipal", info.getCallerPrincipal());
spanLog.addLogEntry("TX-ID", info.getTransactionId());
return spanLog;
}
use of fish.payara.notification.requesttracing.RequestTraceSpanLog in project Payara by payara.
the class JavaEETransactionManagerSimplified method constructJTABeginSpanLog.
private RequestTraceSpanLog constructJTABeginSpanLog(JavaEETransactionImpl transaction) {
RequestTraceSpanLog spanLog = new RequestTraceSpanLog("jtaContextBeginEvent");
spanLog.addLogEntry("Transaction ID", transaction.getTransactionId());
spanLog.addLogEntry("Remaining Timeout", Integer.toString(transaction.getRemainingTimeout()));
return spanLog;
}
use of fish.payara.notification.requesttracing.RequestTraceSpanLog in project Payara by payara.
the class JavaEETransactionManagerSimplified method commit.
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException {
boolean acquiredlock = false;
try {
JavaEETransaction tx = transactions.get();
if (tx != null && tx.isLocalTx()) {
if (monitoringEnabled) {
// XXX acquireReadLock();
getDelegate().getReadLock().lock();
acquiredlock = true;
}
// commit local tx
tx.commit();
} else {
try {
// an XA transaction
getDelegate().commitDistributedTransaction();
} finally {
if (tx != null) {
((JavaEETransactionImpl) tx).onTxCompletion(true);
}
}
}
if (requestTracing != null && getRequestTracing().isRequestTracingEnabled()) {
RequestTraceSpanLog spanLog = constructJTAEndSpanLog(tx);
getRequestTracing().addSpanLog(spanLog);
}
} finally {
// clear current thread's tx
setCurrentTransaction(null);
delegates.set(null);
if (acquiredlock) {
// XXX releaseReadLock();
getDelegate().getReadLock().unlock();
}
}
// END IASRI 4662745
}
use of fish.payara.notification.requesttracing.RequestTraceSpanLog in project Payara by payara.
the class JBatchJDBCPersistenceManager method createJobExecution.
/*
* (non-Javadoc)
*
* @see com.ibm.jbatch.container.services.IPersistenceManagerService#
* createJobExecution(com.ibm.jbatch.container.jsl.JobNavigator,
* javax.batch.runtime.JobInstance, java.util.Properties,
* com.ibm.jbatch.container.context.impl.JobContextImpl)
*/
@Override
public RuntimeJobExecution createJobExecution(JobInstance jobInstance, Properties jobParameters, BatchStatus batchStatus) {
Timestamp now = new Timestamp(System.currentTimeMillis());
long newExecutionId = createRuntimeJobExecutionEntry(jobInstance, jobParameters, batchStatus, now);
RuntimeJobExecution jobExecution = new RuntimeJobExecution(jobInstance, newExecutionId);
jobExecution.setBatchStatus(batchStatus.name());
jobExecution.setCreateTime(now);
jobExecution.setLastUpdateTime(now);
if (requestTracing != null && requestTracing.isRequestTracingEnabled() && requestTracing.isTraceInProgress()) {
RequestTraceSpanLog spanLog = constructJBatchExecutionSpanLog(jobExecution);
requestTracing.addSpanLog(spanLog);
}
return jobExecution;
}
use of fish.payara.notification.requesttracing.RequestTraceSpanLog in project Payara by payara.
the class JBatchJDBCPersistenceManager method constructJBatchExecutionSpanLog.
private RequestTraceSpanLog constructJBatchExecutionSpanLog(RuntimeJobExecution jobExecution) {
RequestTraceSpanLog spanLog = new RequestTraceSpanLog("jBatchExecutionContextEvent");
try {
spanLog.addLogEntry("Execution ID", Long.toString(jobExecution.getExecutionId()));
spanLog.addLogEntry("Job ID", Long.toString(jobExecution.getInstanceId()));
spanLog.addLogEntry("Job Name", jobExecution.getJobInstance().getJobName());
spanLog.addLogEntry("Batch Status", jobExecution.getJobOperatorJobExecution().getBatchStatus().toString());
if (jobExecution.getJobParameters() != null) {
spanLog.addLogEntry("Job Parameters", jobExecution.getJobParameters().toString());
} else {
spanLog.addLogEntry("Job Parameters", "null");
}
} catch (NullPointerException e) {
logger.log(Level.INFO, "NullPointerException when creating request tracing JBatchExecutionContextEvent");
}
return spanLog;
}
Aggregations