hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/submit/interceptor/SubscriptionMatcherInterceptor.java
/**
	 * This is an internal API - Use with caution!
	 */
This is an internal API - Use with caution!
This is an internal API - Use with caution!
@Override
	public void submitResourceModified(final ResourceModifiedMessage theMsg) {
		/*
		 * We only want to submit the message to the processing queue once the
		 * transaction is committed. We do this in order to make sure that the
		 * data is actually in the DB, in case it's the database matcher.
		 */
		if (TransactionSynchronizationManager.isSynchronizationActive()) {
			TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() {
				@Override
				public int getOrder() {
					return 0;
				}
				@Override
				public void afterCommit() {
					sendToProcessingChannel(theMsg);
				}
			});
		} else {
			sendToProcessingChannel(theMsg);
		}
	}
@ Override public void submitResourceModified ( final ResourceModifiedMessage theMsg ) { /*
		 * We only want to submit the message to the processing queue once the
		 * transaction is committed. We do this in order to make sure that the
		 * data is actually in the DB, in case it's the database matcher.
		 */ if ( TransactionSynchronizationManager . isSynchronizationActive ( ) ) { TransactionSynchronizationManager . registerSynchronization ( new TransactionSynchronizationAdapter ( ) { @ Override public int getOrder ( ) { return 0 ; } @ Override public void afterCommit ( ) { sendToProcessingChannel ( theMsg ) ; } } ) ; } else { sendToProcessingChannel ( theMsg ) ; } }
This is an internal API - Use with caution!
This is an internal API - Use with caution!