Commit 2fb4d6d4a83fdb001f0bcca9ebf791e5bb33478a
1 parent
2547297e
Exists in
master
Ajustes no arquétipo para suportar as novas configurações para deploy no
JBoss AS7
Showing
4 changed files
with
7 additions
and
6 deletions
Show diff stats
archetype/jsf-jpa/src/main/resources/archetype-resources/pom.xml
| ... | ... | @@ -25,11 +25,14 @@ |
| 25 | 25 | <artifactId>demoiselle-jpa</artifactId> |
| 26 | 26 | <scope>compile</scope> |
| 27 | 27 | </dependency> |
| 28 | + <!-- If you are using a JTA transaction then use this extension --> | |
| 29 | + <!-- | |
| 28 | 30 | <dependency> |
| 29 | 31 | <groupId>br.gov.frameworkdemoiselle</groupId> |
| 30 | 32 | <artifactId>demoiselle-jta</artifactId> |
| 31 | 33 | <scope>compile</scope> |
| 32 | 34 | </dependency> |
| 35 | + --> | |
| 33 | 36 | <dependency> |
| 34 | 37 | <groupId>org.primefaces</groupId> |
| 35 | 38 | <artifactId>primefaces</artifactId> | ... | ... |
archetype/jsf-jpa/src/main/resources/archetype-resources/src/main/java/domain/Bookmark.java
| 1 | +import static javax.persistence.GenerationType.SEQUENCE; | |
| 2 | + | |
| 1 | 3 | package ${package}.domain; |
| 2 | 4 | |
| 3 | 5 | import java.io.Serializable; |
| ... | ... | @@ -13,7 +15,7 @@ public class Bookmark implements Serializable { |
| 13 | 15 | private static final long serialVersionUID = 1L; |
| 14 | 16 | |
| 15 | 17 | @Id |
| 16 | - @GeneratedValue | |
| 18 | + @GeneratedValue(strategy = SEQUENCE) | |
| 17 | 19 | private Long id; |
| 18 | 20 | |
| 19 | 21 | @Column | ... | ... |
archetype/jsf-jpa/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml
| ... | ... | @@ -14,7 +14,6 @@ |
| 14 | 14 | <property name="hibernate.show_sql" value="true" /> |
| 15 | 15 | <property name="hibernate.format_sql" value="false" /> |
| 16 | 16 | <property name="hibernate.hbm2ddl.auto" value="create-drop" /> |
| 17 | - <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" /> | |
| 18 | 17 | </properties> |
| 19 | 18 | </persistence-unit> |
| 20 | 19 | |
| ... | ... | @@ -29,7 +28,7 @@ |
| 29 | 28 | <property name="hibernate.show_sql" value="true" /> |
| 30 | 29 | <property name="hibernate.format_sql" value="false" /> |
| 31 | 30 | <property name="hibernate.hbm2ddl.auto" value="update" /> |
| 32 | - <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" /> | |
| 31 | + <property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform" /> | |
| 33 | 32 | </properties> |
| 34 | 33 | </persistence-unit> |
| 35 | 34 | --> |
| ... | ... | @@ -45,7 +44,6 @@ |
| 45 | 44 | <property name="hibernate.show_sql" value="true" /> |
| 46 | 45 | <property name="hibernate.format_sql" value="false" /> |
| 47 | 46 | <property name="hibernate.hbm2ddl.auto" value="create-drop" /> |
| 48 | - <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" /> | |
| 49 | 47 | </properties> |
| 50 | 48 | </persistence-unit> |
| 51 | 49 | --> | ... | ... |
archetype/jsf-jpa/src/main/resources/archetype-resources/src/main/resources/demoiselle.properties
| ... | ... | @@ -32,5 +32,3 @@ |
| 32 | 32 | # "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> |
| 33 | 33 | # ou escreva para a Fundação do Software Livre (FSF) Inc., |
| 34 | 34 | # 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. |
| 35 | - | |
| 36 | -frameworkdemoiselle.transaction.class=br.gov.frameworkdemoiselle.transaction.JPATransaction | ... | ... |