JPA configuration file persistence.xml parameter details

Source: Internet
Author: User

<?xml version= "1.0" encoding= "UTF-8"?> <persistence version= "1.0" xmlns:persistence= "http://java.sun.com/ Xml/ns/persistence "xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance "xsi:schemalocation="/HTTP/        Java.sun.com/xml/ns/persistence persistence_1_0.xsd "> <!--the name attribute is used to define the name of the persisted unit (name required, null value is also valid); TRANSACTION-TYPE Specifies the transaction type (optional)-<persistence-unit name= "Unitname" transaction-type= "JTA" > <!--description information. (optional)--<description> </description> <!--an implementation class for Javax.persistence.PersistenceProvider interface (optional)- <provider> </provider> <!--Jta-data-source and Non-jta-data-source are used to specify the Jta and/or non-used by the persistence provider, respectively JTA Global Jndi Name of the data source (optional)-<jta-data-source>java:/MySqlDS</jta-data-source> &LT;NON-JTA-DATA-SOURCE&G T </non-jta-data-source> <!--Declare where Orm.xml is located. (optional)-<mapping-file>product.xml</mapping-file> <!--to the relative of the jar file containing the Persistence.xmlPath to add additional jar files. (optional)--<jar-file> /lib/model.jar</jar-file> <!--explicitly lists entity classes that should be explicitly listed in the Java SE environment.  (optional)-<class>com.domain.User</class> <class>com.domain.Product</class> <!-- Declares whether the scan jar file is annotated with the @enity class added to the context. If you do not scan, the following: (optional)-<exclude-unlisted-classes/> <!--vendor-specific properties (optional)--&G     T <properties> <!--hibernate.hbm2ddl.auto= create-drop/create/update--<property name= "Hiber Nate.hbm2ddl.auto "value=" Update "/> <property name=" Hibernate.show_sql "value=" true "/> </properties   > </persistence-unit> </persistence>

JPA configuration file persistence.xml parameter details

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.