src/main/java/js/container/ManagedProxyHandler.java
private Object executeImmutableTransaction(ManagedMethodSPI managedMethod, Object[] args) throws Throwable {
		Transaction transaction = transactionalResource.createReadOnlyTransaction();
		// see mutable transaction comment
		transactionalResource.storeSession(transaction.getSession());

		try {
			Object result = managedMethod.invoke(managedInstance, args);
			if (transaction.unused()) {
				log.debug("Method |%s| superfluously declared transactional.", managedMethod);
			}
			return result;
		} catch (Throwable throwable) {
			throw throwable(throwable, "Immutable transactional method |%s| invocation fail.", managedMethod);
		} finally {
			if (transaction.close()) {
				// see mutable transaction comment
				transactionalResource.releaseSession();
			}
		}
	}
private Object executeImmutableTransaction(ManagedMethodSPI managedMethod, Object[] args) throws Throwable {
		Transaction transaction = transactionalResource.createReadOnlyTransaction();
		// see mutable transaction comment
		transactionalResource.storeSession(transaction.getSession());

		try {
			Object result = managedMethod.invoke(managedInstance, args);
			if (transaction.unused()) {
				log.debug("Method |%s| superfluously declared transactional.", managedMethod);
			}
			return result;
		} catch (Throwable throwable) {
			throw throwable(throwable, "Immutable transactional method |%s| invocation fail.", managedMethod);
		} finally {
			if (transaction.close()) {
				// see mutable transaction comment
				transactionalResource.releaseSession();
			}
		}
	}
Helper method for immutable transaction execution.

@param managedMethod managed method to be executed into transactional scope,
@param args managed method arguments.
@return value returned by managed method.
@throws Throwable forward any error rose by method execution.