Author: alexsmirnov
Date: 2008-06-10 20:31:51 -0400 (Tue, 10 Jun 2008)
New Revision: 8990
Modified:
trunk/samples/seamIntegration/pom.xml
trunk/samples/seamIntegration/src/main/resources/META-INF/persistence.xml
trunk/samples/seamIntegration/src/main/resources/logging.properties
trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
Log:
Configure tomcat/jetty hsql entity manager
Modified: trunk/samples/seamIntegration/pom.xml
===================================================================
--- trunk/samples/seamIntegration/pom.xml 2008-06-10 23:35:20 UTC (rev 8989)
+++ trunk/samples/seamIntegration/pom.xml 2008-06-11 00:31:51 UTC (rev 8990)
@@ -63,22 +63,28 @@
<artifactId>richfaces-ui</artifactId>
<version>${version}</version>
</dependency>
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <version>1.8.0.7</version>
- <scope>runtime</scope>
- </dependency>
<dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.7</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-dbcp</groupId>
+ <artifactId>commons-dbcp</artifactId>
+ <version>1.2.2</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.3.2.GA</version>
</dependency>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>3.0.0.ga</version>
- </dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>3.0.0.ga</version>
+ </dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
Modified: trunk/samples/seamIntegration/src/main/resources/META-INF/persistence.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/resources/META-INF/persistence.xml 2008-06-10
23:35:20 UTC (rev 8989)
+++ trunk/samples/seamIntegration/src/main/resources/META-INF/persistence.xml 2008-06-11
00:31:51 UTC (rev 8990)
@@ -6,7 +6,7 @@
<persistence-unit name="exampleDatabase"
transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
- <non-jta-data-source>java:comp/env/jdbc/DS</non-jta-data-source>
+ <jta-data-source>java:comp/env/jdbc/DS</jta-data-source>
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect" />
Modified: trunk/samples/seamIntegration/src/main/resources/logging.properties
===================================================================
--- trunk/samples/seamIntegration/src/main/resources/logging.properties 2008-06-10
23:35:20 UTC (rev 8989)
+++ trunk/samples/seamIntegration/src/main/resources/logging.properties 2008-06-11
00:31:51 UTC (rev 8990)
@@ -17,4 +17,4 @@
javax.enterprise.resource.webcontainer.jsf.level=INFO
com.exadel.level=ALL
org.jboss.seam.level=FINE
-
\ No newline at end of file
+org.hibernate.level=FINE
\ No newline at end of file
Modified: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml 2008-06-10
23:35:20 UTC (rev 8989)
+++ trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml 2008-06-11
00:31:51 UTC (rev 8990)
@@ -1,59 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<components
xmlns="http://jboss.com/products/seam/components"
-
xmlns:core="http://jboss.com/products/seam/core"
-
xmlns:persistence="http://jboss.com/products/seam/persistence"
-
xmlns:drools="http://jboss.com/products/seam/drools"
-
xmlns:bpm="http://jboss.com/products/seam/bpm"
-
xmlns:security="http://jboss.com/products/seam/security"
-
xmlns:mail="http://jboss.com/products/seam/mail"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation=
- "http://jboss.com/products/seam/core
http://jboss.com/products/seam/core-2.0.xsd
+
xmlns:core="http://jboss.com/products/seam/core"
+
xmlns:persistence="http://jboss.com/products/seam/persistence"
+
xmlns:transaction="http://jboss.com/products/seam/transaction"
+
xmlns:drools="http://jboss.com/products/seam/drools"
+
xmlns:bpm="http://jboss.com/products/seam/bpm"
+
xmlns:security="http://jboss.com/products/seam/security"
+
xmlns:mail="http://jboss.com/products/seam/mail"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://jboss.com/products/seam/core
http://jboss.com/products/seam/core-2.0.xsd
http://jboss.com/products/seam/persistence
http://jboss.com/products/seam/persistence-2.0.xsd
http://jboss.com/products/seam/drools
http://jboss.com/products/seam/drools-2.0.xsd
http://jboss.com/products/seam/bpm
http://jboss.com/products/seam/bpm-2.0.xsd
http://jboss.com/products/seam/security
http://jboss.com/products/seam/security-2.0.xsd
http://jboss.com/products/seam/mail
http://jboss.com/products/seam/mail-2.0.xsd
+
http://jboss.com/products/seam/transaction
http://jboss.com/products/seam/transaction-2.1.xsd
http://jboss.com/products/seam/components
http://jboss.com/products/seam/components-2.0.xsd">
- <core:init debug="true"
transaction-management-enabled="false"/>
-
- <core:manager concurrent-request-timeout="500"
- conversation-timeout="120000"
- conversation-id-parameter="cid"/>
- <!--
-
- <persistence:managed-persistence-context name="entityManager"
- auto-create="true"
-
entity-manager-factory="#{seamIntegrationEntityManagerFactory}"/>
+ <core:init debug="true" /><!--
transaction-management-enabled="false" -->
- <persistence:entity-manager-factory
name="seamIntegrationEntityManagerFactory"
- persistence-unit-name="seamIntegration"/>
-
- <drools:rule-base name="securityRules">
-
<drools:rule-files><value>/security.drl</value></drools:rule-files>
- </drools:rule-base>
+ <core:manager concurrent-request-timeout="500"
+ conversation-timeout="120000" conversation-id-parameter="cid"
/>
- <security:identity authenticate-method="#{authenticator.authenticate}"
- security-rules="#{securityRules}"
- remember-me="true"/>
-
- <event type="org.jboss.seam.notLoggedIn">
- <action expression="#{redirect.captureCurrentView}"/>
- </event>
- <event type="org.jboss.seam.postAuthenticate">
- <action expression="#{redirect.returnToCapturedView}"/>
- </event>
-
- <mail:mail-session host="localhost" port="2525"
username="test" password="test" />
-
- -->
- <!-- For use with jBPM pageflow or process management -->
- <!--
- <bpm:jbpm>
- <bpm:process-definitions></bpm:process-definitions>
- <bpm:pageflow-definitions></bpm:pageflow-definitions>
- </bpm:jbpm>
- -->
-
+ <transaction:entity-transaction entity-manager="#{entityManager}" />
+
+
+ <persistence:entity-manager-factory name="exampleDatabase" />
+
+
+
+ <persistence:managed-persistence-context name="entityManager"
+ auto-create="true" entity-manager-factory="#{exampleDatabase}"
/>
+
+
+ <!--
+
+ <persistence:managed-persistence-context name="entityManager"
+ auto-create="true"
+ entity-manager-factory="#{seamIntegrationEntityManagerFactory}"/>
+
+ <persistence:entity-manager-factory
name="seamIntegrationEntityManagerFactory"
+ persistence-unit-name="seamIntegration"/>
+
+ <drools:rule-base name="securityRules">
+ <drools:rule-files><value>/security.drl</value></drools:rule-files>
+ </drools:rule-base>
+
+ <security:identity authenticate-method="#{authenticator.authenticate}"
+ security-rules="#{securityRules}"
+ remember-me="true"/>
+
+ <event type="org.jboss.seam.notLoggedIn">
+ <action expression="#{redirect.captureCurrentView}"/>
+ </event>
+ <event type="org.jboss.seam.postAuthenticate">
+ <action expression="#{redirect.returnToCapturedView}"/>
+ </event>
+
+ <mail:mail-session host="localhost" port="2525"
username="test" password="test" />
+
+ -->
+ <!-- For use with jBPM pageflow or process management -->
+ <!--
+ <bpm:jbpm>
+ <bpm:process-definitions></bpm:process-definitions>
+ <bpm:pageflow-definitions></bpm:pageflow-definitions>
+ </bpm:jbpm>
+ -->
+
</components>