resourcelocal
ResourceLocal is a term used in Java persistence frameworks to describe a session or persistence context that is created, managed, and closed entirely by the application rather than by an external container or transaction manager. In this mode, a resource-local session (for example, a Hibernate Session or a JPA EntityManager) is obtained from a local factory and is not bound to JTA or a container-managed lifecycle. Transactions are controlled directly by the application through the framework’s transaction API, such as Hibernate’s Transaction or JPA’s EntityTransaction.
In practice, resource-local operation typically involves creating a SessionFactory (or an EntityManagerFactory), opening a session, beginning
Advantages of resource-local mode include explicit control over the persistence context and transactions, and simpler configuration
In JPA terms, resource-local corresponds to transactions managed by the application (as opposed to container-managed transactions).