I found in the Inbound flow the PatientRegistrationRequestHandler.java class has
method processObjects() which has following code snippet:
// Persist activity
activity = persistChange(serviceXml, basechange, integration);
// Send Message to Queue
sendMessageToQueue(activity, IJNDIConstants.SM_INBOUND_QUEUE);
Please note neither of these methods have Transaction demarcation defined:
Caller method : processObjects()
Called methods : persistChange() and sendMessageToQueue()
So I am thinking of following annotations:
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
protected PracticePartnerIntegrationActivity persistChange
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
protectedvoid sendMessageToQueue(Serializable activity, String queueName)
Please note I couldn't find either declarative or annotate transaction demarcation except persistence.xml as enclosed
I am planning to these transaction annotation. Please let me know your thoughts