public void setRollbackOnly() throws IllegalStateException, SystemException { ejbContext.setRollbackOnly(); }
public void setRollbackOnly() throws IllegalStateException, SystemException { ejbContext.setRollbackOnly(); }
public boolean isTransactional() { ctx.setRollbackOnly(); return ctx.getRollbackOnly(); } }
public boolean isTransactional() { ctx.setRollbackOnly(); return ctx.getRollbackOnly(); } }
@TransactionAttribute(TransactionAttributeType.REQUIRED) public void initTransaction() throws SystemException { ctx.setRollbackOnly(); beanManager.fireEvent(new Foo()); } }
/** * {@inheritDoc} */ @TransactionAttribute(TransactionAttributeType.REQUIRED) public ValueServiceResponse<ValidationReferencedObject> delete(ValidationReferencedObjectPK pk) { LOGGER.debug("Executing ValidationReferencedObject.delete"); ValidationReferencedObjectBO businessObjectToDelete = BusinessObjectFactory .createValidationReferencedObjectBO(); businessObjectToDelete.setKey(pk); businessObjectToDelete.delete(); if (this.messages.hasErrorMessages()) { this.ejbContext.setRollbackOnly(); } return new ValueServiceResponse<ValidationReferencedObject>(null, this.messages); }
/** * {@inheritDoc} */ @TransactionAttribute(TransactionAttributeType.REQUIRED) public ValueServiceResponse<ValidationExampleChild> delete(ValidationExampleChildPK pk) { LOGGER.debug("Executing ValidationExampleChild.delete"); ValidationExampleChildBO businessObjectToDelete = BusinessObjectFactory.createValidationExampleChildBO(); businessObjectToDelete.setKey(pk); businessObjectToDelete.delete(); if (this.messages.hasErrorMessages()) { this.ejbContext.setRollbackOnly(); } return new ValueServiceResponse<ValidationExampleChild>(null, this.messages); }
/** * {@inheritDoc} */ @TransactionAttribute(TransactionAttributeType.REQUIRED) public ValueServiceResponse<ValidationExample> delete(ValidationExamplePK pk) { LOGGER.debug("Executing ValidationExample.delete"); ValidationExampleBO businessObjectToDelete = BusinessObjectFactory.createValidationExampleBO(); businessObjectToDelete.setKey(pk); businessObjectToDelete.delete(); if (this.messages.hasErrorMessages()) { this.ejbContext.setRollbackOnly(); } return new ValueServiceResponse<ValidationExample>(null, this.messages); }
/** * {@inheritDoc} */ @TransactionAttribute(TransactionAttributeType.REQUIRED) public ValueServiceResponse<SimpleDomain> delete(SimpleDomainPK pk) { LOGGER.debug("Executing SimpleDomain.delete"); SimpleDomainBO businessObjectToDelete = BusinessObjectFactory.createSimpleDomainBO(); businessObjectToDelete.setKey(pk); businessObjectToDelete.delete(); if (this.messages.hasErrorMessages()) { this.ejbContext.setRollbackOnly(); } return new ValueServiceResponse<SimpleDomain>(null, this.messages); }
/** * {@inheritDoc} */ @TransactionAttribute(TransactionAttributeType.REQUIRED) public ValueServiceResponse<ValidationReferenceExample> delete(ValidationReferenceExamplePK pk) { LOGGER.debug("Executing ValidationReferenceExample.delete"); ValidationReferenceExampleBO businessObjectToDelete = BusinessObjectFactory .createValidationReferenceExampleBO(); businessObjectToDelete.setKey(pk); businessObjectToDelete.delete(); if (this.messages.hasErrorMessages()) { this.ejbContext.setRollbackOnly(); } return new ValueServiceResponse<ValidationReferenceExample>(null, this.messages); }
/** * {@inheritDoc} */ @TransactionAttribute(TransactionAttributeType.REQUIRED) @ThreadLocalMessages public ValueServiceResponse<String> echoPlusWazzup(String echoRoot) { String implResult = echoPlusWazzupImpl(echoRoot); ValueServiceResponse<String> response = new ValueServiceResponse<String>(implResult, this.messages); if (this.messages.hasErrorMessages()) { this.ejbContext.setRollbackOnly(); } return response; }
/** * {@inheritDoc} */ @TransactionAttribute(TransactionAttributeType.REQUIRED) @ThreadLocalMessages public VoidServiceResponse doSomething() { doSomethingImpl(); VoidServiceResponse response = new VoidServiceResponse(this.messages); if (this.messages.hasErrorMessages()) { this.ejbContext.setRollbackOnly(); } return response; }
/** * {@inheritDoc} */ @TransactionAttribute(TransactionAttributeType.REQUIRED) @ThreadLocalMessages public VoidServiceResponse createAndPropagateErrorMessages(Integer numErrorMessagesToGenerate) { createAndPropagateErrorMessagesImpl(numErrorMessagesToGenerate); VoidServiceResponse response = new VoidServiceResponse(this.messages); if (this.messages.hasErrorMessages()) { this.ejbContext.setRollbackOnly(); } return response; }
/** * {@inheritDoc} */ @TransactionAttribute(TransactionAttributeType.REQUIRED) @ThreadLocalMessages public ValueServiceResponse<String> doSomethingAndReturnACharacter() { String implResult = doSomethingAndReturnACharacterImpl(); ValueServiceResponse<String> response = new ValueServiceResponse<String>(implResult, this.messages); if (this.messages.hasErrorMessages()) { this.ejbContext.setRollbackOnly(); } return response; }
/** * {@inheritDoc} */ @TransactionAttribute(TransactionAttributeType.REQUIRED) @ThreadLocalMessages public VoidServiceResponse doSomethingWithPrimitiveInputs(String inputStr, Integer inputInt) { doSomethingWithPrimitiveInputsImpl(inputStr, inputInt); VoidServiceResponse response = new VoidServiceResponse(this.messages); if (this.messages.hasErrorMessages()) { this.ejbContext.setRollbackOnly(); } return response; }
/** * {@inheritDoc} */ @TransactionAttribute(TransactionAttributeType.REQUIRED) @ThreadLocalMessages public ValueServiceResponse<SimpleDomain> returnNullEntity() { SimpleDomainBO implResult = returnNullEntityImpl(); SimpleDomain result = implResult != null ? SimpleDomainAssembler.createSimpleDomain(implResult) : null; ValueServiceResponse<SimpleDomain> response = new ValueServiceResponse<SimpleDomain>(result, this.messages); if (this.messages.hasErrorMessages()) { this.ejbContext.setRollbackOnly(); } return response; }
/** * {@inheritDoc} */ @TransactionAttribute(TransactionAttributeType.REQUIRED) @ThreadLocalMessages public ValueServiceResponse<Integer> count(List<SimpleDomain> input) { List<SimpleDomainBO> inputBOs = SimpleDomainAssembler.getSimpleDomainBOList(input); Integer implResult = countImpl(inputBOs); ValueServiceResponse<Integer> response = new ValueServiceResponse<Integer>(implResult, this.messages); if (this.messages.hasErrorMessages()) { this.ejbContext.setRollbackOnly(); } return response; }
/** * {@inheritDoc} */ @TransactionAttribute(TransactionAttributeType.REQUIRED) @ThreadLocalMessages public ValueServiceResponse<SimpleDomain> saveSimpleDomainEntityAndPropagateErrorMessages(String targetNameValue, Integer numErrorMessagesToGenerate) { SimpleDomainBO implResult = saveSimpleDomainEntityAndPropagateErrorMessagesImpl(targetNameValue, numErrorMessagesToGenerate); SimpleDomain result = implResult != null ? SimpleDomainAssembler.createSimpleDomain(implResult) : null; ValueServiceResponse<SimpleDomain> response = new ValueServiceResponse<SimpleDomain>(result, this.messages); if (this.messages.hasErrorMessages()) { this.ejbContext.setRollbackOnly(); } return response; }
/** * {@inheritDoc} */ @TransactionAttribute(TransactionAttributeType.REQUIRED) @ThreadLocalMessages public ValueServiceResponse<SimpleDomain> someBusinessOperation(SimpleDomain someBusinessEntity, String otherImportantData) { SimpleDomainBO someBusinessEntityBO = SimpleDomainAssembler.mergeSimpleDomainBO(someBusinessEntity, null); SimpleDomainBO implResult = someBusinessOperationImpl(someBusinessEntityBO, otherImportantData); SimpleDomain result = implResult != null ? SimpleDomainAssembler.createSimpleDomain(implResult) : null; ValueServiceResponse<SimpleDomain> response = new ValueServiceResponse<SimpleDomain>(result, this.messages); if (this.messages.hasErrorMessages()) { this.ejbContext.setRollbackOnly(); } return response; }
/** * {@inheritDoc} */ @TransactionAttribute(TransactionAttributeType.REQUIRED) public ValueServiceResponse<SimpleDomain> saveOrUpdate(SimpleDomain entity) { LOGGER.debug("Executing SimpleDomain.saveOrUpdate"); ValueServiceResponse<SimpleDomain> response = null; if (entity != null) { SimpleDomainPK pk = entity.getSimpleDomainPK(); SimpleDomainBO businessObjectToSave = null; SimpleDomainBO retrievedBusinessObject = SimpleDomainBO.findByPrimaryKey(pk); if (retrievedBusinessObject != null) { businessObjectToSave = retrievedBusinessObject; } else { businessObjectToSave = BusinessObjectFactory.createSimpleDomainBO(); } SimpleDomainAssembler.mergeSimpleDomainBO(entity, businessObjectToSave); businessObjectToSave.save(); SimpleDomain updateEntity = SimpleDomainAssembler.createSimpleDomain(businessObjectToSave); response = new ValueServiceResponse<SimpleDomain>(updateEntity, this.messages); } if (this.messages.hasErrorMessages()) { this.ejbContext.setRollbackOnly(); } return response; }