As a Java EE developer, I sometimes envy how fast it’s possible to see the result of a code change in a running application with interpreted languages like PHP or JavaScript. With Java, it’s always necessary to rebuild the source code in a bytecode, which can be then safely updated only by restarting the whole application. And all developers know that restoring the desired state of the application after a fresh restart takes time and is tedious. A while ago I’ve come across an opensource tool called HotswapAgent that speeds up code reloading. (more…)
<!-- turn off 2nd level caching (optional), values:
NONE, ALL, DISABLE_SELECTIVE, ENABLE_SELECTIVE, --><shared-cache-mode>NONE</shared-cache-mode><!-- desired provider (optional),
if not present, default provider will be used --><provider>org.eclipse.persistence.jpa.PersistenceProvider</provider><!-- if true, only listed classes will be treated as entities.
Default false.
Not applicable for Java SE, where every entity must be listed --><exclude-unlisted-classes>false</exclude-unlisted-classes><!-- optional declaration of used datasource.
If not specified, connection properties must be specified.
Otherwise will use the referenced datasource provided by the container --><jta-data-source>jdbc/ds</jta-data-source>Code language:HTML, XML(xml)
These elements can be overridden with the following properties, if a map is passed to EntityManagerFactory:
javax.persistence.provider to define the provider class used
javax.persistence.transactionType to define the transaction type used (either JTA or RESOURCE_LOCAL)
javax.persistence.jtaDataSource to define the JTA datasource name in JNDI
javax.persistence.nonJtaDataSource to define the non JTA datasource name in JNDI
javax.persistence.lock.timeout – pessimistic lock timeout in milliseconds (Integer or String)
javax.persistence.query.timeout – query timeout in milliseconds (Integer or String)
javax.persistence.sharedCache.mode corresponds to the share-cache-mode element defined in Section 2.2.1, “Packaging”
javax.persistence.validation.mode corresponds to the validation-mode element defined in Section 2.2.1, “Packaging”
This site uses cookies to improve your experience. By using this site you agree to these cookies being set. More in our cookies policy
The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.