Commit 28412299e269ae99be797af92aed715a79894cc2
1 parent
dfaff468
Exists in
master
Configuração no persistence.xml para o Glassfish 3
Showing
1 changed file
with
34 additions
and
4 deletions
Show diff stats
archetype/jsf-jpa/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | --> | 7 | --> |
8 | <persistence-unit name="bookmark-ds" transaction-type="RESOURCE_LOCAL"> | 8 | <persistence-unit name="bookmark-ds" transaction-type="RESOURCE_LOCAL"> |
9 | <non-jta-data-source>java:jboss/datasources/ExampleDS</non-jta-data-source> | 9 | <non-jta-data-source>java:jboss/datasources/ExampleDS</non-jta-data-source> |
10 | - | 10 | + |
11 | <class>${package}.domain.Bookmark</class> | 11 | <class>${package}.domain.Bookmark</class> |
12 | 12 | ||
13 | <properties> | 13 | <properties> |
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | <property name="hibernate.hbm2ddl.auto" value="create-drop" /> | 16 | <property name="hibernate.hbm2ddl.auto" value="create-drop" /> |
17 | </properties> | 17 | </properties> |
18 | </persistence-unit> | 18 | </persistence-unit> |
19 | - | 19 | + |
20 | <!-- If you are using JBoss AS7 with JTA transaction then use this persistence-unit --> | 20 | <!-- If you are using JBoss AS7 with JTA transaction then use this persistence-unit --> |
21 | <!-- | 21 | <!-- |
22 | <persistence-unit name="bookmark-ds" transaction-type="JTA"> | 22 | <persistence-unit name="bookmark-ds" transaction-type="JTA"> |
@@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
32 | </properties> | 32 | </properties> |
33 | </persistence-unit> | 33 | </persistence-unit> |
34 | --> | 34 | --> |
35 | - | 35 | + |
36 | <!-- If you are using JBoss AS6 with non JTA transaction then use this persistence-unit --> | 36 | <!-- If you are using JBoss AS6 with non JTA transaction then use this persistence-unit --> |
37 | <!-- | 37 | <!-- |
38 | <persistence-unit name="bookmark-ds" transaction-type="RESOURCE_LOCAL"> | 38 | <persistence-unit name="bookmark-ds" transaction-type="RESOURCE_LOCAL"> |
@@ -47,7 +47,7 @@ | @@ -47,7 +47,7 @@ | ||
47 | </properties> | 47 | </properties> |
48 | </persistence-unit> | 48 | </persistence-unit> |
49 | --> | 49 | --> |
50 | - | 50 | + |
51 | <!-- If you are using JBoss AS6 with JTA transaction then use this persistence-unit --> | 51 | <!-- If you are using JBoss AS6 with JTA transaction then use this persistence-unit --> |
52 | <!-- | 52 | <!-- |
53 | <persistence-unit name="bookmark-ds" transaction-type="JTA"> | 53 | <persistence-unit name="bookmark-ds" transaction-type="JTA"> |
@@ -64,6 +64,36 @@ | @@ -64,6 +64,36 @@ | ||
64 | </persistence-unit> | 64 | </persistence-unit> |
65 | --> | 65 | --> |
66 | 66 | ||
67 | + <!-- If you are using GlassFish 3 with non JTA transaction then use this persistence-unit --> | ||
68 | + <!-- | ||
69 | + <persistence-unit name="bookmark-ds" transaction-type="RESOURCE_LOCAL"> | ||
70 | + <non-jta-data-source>jdbc/__default</non-jta-data-source> | ||
71 | + | ||
72 | + <class>${package}.domain.Bookmark</class> | ||
73 | + | ||
74 | + <properties> | ||
75 | + <property name="eclipselink.logging.level" value="FINE" /> | ||
76 | + <property name="eclipselink.ddl-generation" value="create-tables" /> | ||
77 | + <property name="eclipselink.ddl-generation.output-mode" value="database" /> | ||
78 | + </properties> | ||
79 | + </persistence-unit> | ||
80 | + --> | ||
81 | + | ||
82 | + <!-- If you are using GlassFish 3 with JTA transaction then use this persistence-unit --> | ||
83 | + <!-- | ||
84 | + <persistence-unit name="bookmark-ds" transaction-type="JTA"> | ||
85 | + <jta-data-source>jdbc/__TimerPool</jta-data-source> | ||
86 | + | ||
87 | + <class>${package}.domain.Bookmark</class> | ||
88 | + | ||
89 | + <properties> | ||
90 | + <property name="eclipselink.logging.level" value="FINE" /> | ||
91 | + <property name="eclipselink.ddl-generation" value="create-tables" /> | ||
92 | + <property name="eclipselink.ddl-generation.output-mode" value="database" /> | ||
93 | + </properties> | ||
94 | + </persistence-unit> | ||
95 | + --> | ||
96 | + | ||
67 | <!-- If you are using Tomcat 6 / Tomcat 7 / JUnit then use this persistence-unit --> | 97 | <!-- If you are using Tomcat 6 / Tomcat 7 / JUnit then use this persistence-unit --> |
68 | <!-- | 98 | <!-- |
69 | <persistence-unit name="bookmark-ds" transaction-type="RESOURCE_LOCAL"> | 99 | <persistence-unit name="bookmark-ds" transaction-type="RESOURCE_LOCAL"> |