- Common ways to obtain PersistenceContext
private void myMethod () {PersistenceContext p =
DroolsSpringJpaManager droolsSpringJpaManager;String identifier;new JpaPersistenceContext((EntityManager)droolsSpringJpaManager.env.get(identifier), boolean1)
EntityManager entityManager;new JpaPersistenceContext(entityManager, boolean1)
- Smart code suggestions by Codota
}
public void endCommandScopedEntityManager() { if ( TransactionSynchronizationManager.hasResource( "cmdEM" ) ) { TransactionSynchronizationManager.unbindResource( "cmdEM" ); if ( this.env.get( EnvironmentName.CMD_SCOPED_ENTITY_MANAGER ) != null ) { getCommandScopedPersistenceContext().close(); } } }
public void endCommandScopedEntityManager() { if ( TransactionSynchronizationManager.hasResource( "cmdEM" ) ) { TransactionSynchronizationManager.unbindResource( "cmdEM" ); if ( this.env.get( EnvironmentName.CMD_SCOPED_ENTITY_MANAGER ) != null ) { getCommandScopedPersistenceContext().close(); } } }
public void endCommandScopedEntityManager() { if ( TransactionSynchronizationManager.hasResource( "cmdEM" ) ) { TransactionSynchronizationManager.unbindResource( "cmdEM" ); if ( this.env.get( EnvironmentName.CMD_SCOPED_ENTITY_MANAGER ) != null ) { getCommandScopedPersistenceContext().close(); } } }