The configuration for an entity manager is bound tothe factory that created it. Whether application or container managed, the factory needs a persistence unit from which to create an entity manager. A persistence unit dictates the settings to connect to the database and the list of entities that can be managed in a persistence context. […]

Read More →

Sometimes can be useful configure DB access using a datasource configured in the application server where software module runs. This can be done connecting to the datasource using JNDI. JNDI really shines when you have to move an application between environments: development to integration to test to production. If you configure each app server to […]

Read More →