default long getLatestTransactionId() throws CouldNotPerformException { long latestTransactionId = -1; for (ServiceDescription serviceDescription : getUnitTemplate().getServiceDescriptionList()) { if (serviceDescription.getPattern() != ServicePattern.OPERATION) { continue; } latestTransactionId = Math.max(latestTransactionId, getTransactionIdByServiceType(serviceDescription.getType())); } if (latestTransactionId == -1) { throw new NotAvailableException("transaction id"); } return latestTransactionId; }