@BeforeMethod public void setup() { when(platformIdent.getAgentName()).thenReturn(AGENT_NAME); when(applicationData.getName()).thenReturn(APP_NAME); when(businessTransactionData.getName()).thenReturn(BT_NAME); }
@BeforeMethod public void init() { when(problemOccurrence.getApplicationNameIdent()).thenReturn(APP_ID); when(problemOccurrence.getBusinessTransactionNameIdent()).thenReturn(BUSINESS_TX_ID); when(problemOccurrence.getProblemContext()).thenReturn(invocationIdentifier); when(problemOccurrence.getRequestRoot()).thenReturn(invocationIdentifier); when(problemOccurrence.getGlobalContext()).thenReturn(invocationIdentifier); when(problemOccurrence.getCauseType()).thenReturn(causeType); when(problemOccurrence.getSourceType()).thenReturn(sourceType); when(problemOccurrence.getRootCause()).thenReturn(rootCause); when(invocationIdentifier.getDiagnosisTimerData()).thenReturn(diagnosisTimerData); when(rootCause.getAggregatedDiagnosisTimerData()).thenReturn(aggregatedDiagnosisTimerData); when(diagnosisTimerData.getDuration()).thenReturn(DURATION); when(diagnosisTimerData.getExclusiveDuration()).thenReturn(EXCLUSIVE_DURATION); when(aggregatedDiagnosisTimerData.getExclusiveDuration()).thenReturn(EXCLUSIVE_DURATION); when(applicationData.getName()).thenReturn(APPLICATION_NAME); when(businessTransactionData.getName()).thenReturn(BUSINESS_TX); when(methodIdent.getMethodName()).thenReturn(METHOD); when(methodIdent.getFQN()).thenReturn(FQN); }
/** * {@inheritDoc} */ @Override protected void addTags(InvocationSequenceData data, Builder builder) { super.addTags(data, builder); String businessTxName = BusinessTransactionDefinition.UNKNOWN_BUSINESS_TX; String applicationName = ApplicationDefinition.UNKNOWN_APP; BusinessTransactionData businessTx = cachedDataService.getBusinessTransactionForId(data.getApplicationId(), data.getBusinessTransactionId()); if (null != businessTx) { businessTxName = businessTx.getName(); applicationName = businessTx.getApplication().getName(); } builder.tag(Series.BusinessTransaction.TAG_APPLICATION_NAME, applicationName); builder.tag(Series.BusinessTransaction.TAG_BUSINESS_TRANSACTION_NAME, businessTxName); }
BusinessTransactionData transaction = cachedDataService.getBusinessTransactionForId(appId, btId); if (null != transaction) { return new StyledString(transaction.getName());
/** * {@inheritDoc} */ @Override public DetailsTable generate(DefaultData defaultData, RepositoryDefinition repositoryDefinition, Composite parent, FormToolkit toolkit) { InvocationSequenceData invocationSequenceData = (InvocationSequenceData) defaultData; DetailsTable table = new DetailsTable(parent, toolkit, "Invocation Sequence Info", 1); ApplicationData application = repositoryDefinition.getCachedDataService().getApplicationForId(invocationSequenceData.getApplicationId()); if (null != application) { table.addContentRow("Application:", null, new DetailsCellContent[] { new DetailsCellContent(application.getName()) }); } BusinessTransactionData businessTxData = repositoryDefinition.getCachedDataService().getBusinessTransactionForId(invocationSequenceData.getApplicationId(), invocationSequenceData.getBusinessTransactionId()); if (null != businessTxData) { table.addContentRow("Business Transactions:", null, new DetailsCellContent[] { new DetailsCellContent(businessTxData.getName()) }); } table.addContentRow("Children Count:", null, new DetailsCellContent[] { new DetailsCellContent(String.valueOf(invocationSequenceData.getChildCount())) }); table.addContentRow("Nested SQLs:", null, new DetailsCellContent[] { new YesNoDetailsCellContent(InvocationSequenceDataHelper.hasNestedSqlStatements(invocationSequenceData)) }); table.addContentRow("Nested Exceptions:", null, new DetailsCellContent[] { new YesNoDetailsCellContent(InvocationSequenceDataHelper.hasNestedExceptions(invocationSequenceData)) }); return table; }
BusinessTransactionData btData1 = cachedDataService.getBusinessTransactionForId(o1.getApplicationId(), o1.getBusinessTransactionId()); BusinessTransactionData btData2 = cachedDataService.getBusinessTransactionForId(o2.getApplicationId(), o2.getBusinessTransactionId()); String btName1 = null != btData1 ? btData1.getName().toLowerCase() : StringUtils.EMPTY; String btName2 = null != btData2 ? btData2.getName().toLowerCase() : StringUtils.EMPTY; return ObjectUtils.compare(btName1, btName2); case USE_CASE:
BusinessTransactionData businessTx = cachedDataService.getBusinessTransactionForId(data.getApplicationNameIdent(), data.getBusinessTransactionNameIdent()); if (null != businessTx) { businessTxName = businessTx.getName();
BusinessTransactionData btData = cachedDataService.getBusinessTransactionForId(data.getApplicationId(), data.getBusinessTransactionId()); if (null != btData) { return new StyledString(btData.getName()); } else { return emptyStyledString;