Author: dan.j.allen
Date: 2009-04-06 19:18:07 -0400 (Mon, 06 Apr 2009)
New Revision: 10321
Added:
trunk/seam-gen/resources/WEB-INF/components-war-tokenized.xml
Modified:
trunk/seam-gen/build.xml
trunk/seam-gen/resources/META-INF/persistence-dev-war.xml
trunk/seam-gen/resources/WEB-INF/components-war.xml
trunk/seam-gen/resources/WEB-INF/components.xml
Log:
JBSEAM-1619 fix breakage in JBoss Tools (I didn't realize it used some of these
templates)
Modified: trunk/seam-gen/build.xml
===================================================================
--- trunk/seam-gen/build.xml 2009-04-06 23:13:11 UTC (rev 10320)
+++ trunk/seam-gen/build.xml 2009-04-06 23:18:07 UTC (rev 10321)
@@ -836,8 +836,7 @@
<copy todir="${project.home}/resources">
<fileset dir="${templates.dir}/resources">
<include name="META-INF/orm.xml"/>
- <include name="META-INF/persistence*-war.xml"/>
- <include name="WEB-INF/components-war.xml"/>
+ <include name="META-INF/persistence-*-war.xml"/>
<include name="WEB-INF/jboss-web.xml"/>
</fileset>
<filterset refid="project"/>
@@ -846,10 +845,14 @@
<replacestring from="-war.xml" to=".xml"/>
</filtermapper>
</copy>
- <!--
- <copy todir="${project.home}/src/hot"
file="${templates.dir}/resources/seam.properties"/>
- <copy todir="${project.home}/src/main"
file="${templates.dir}/resources/seam.properties"/>
- -->
+ <replace
file="${project.home}/resources/META-INF/persistence-dev.xml">
+ <replacefilter
token="org.hibernate.transaction.JBossTransactionManagerLookup"
value="@transactionManagerLookupClass@"/>
+ </replace>
+ <copy tofile="${project.home}/resources/WEB-INF/components.xml"
+
file="${templates.dir}/resources/WEB-INF/components-war-tokenized.xml">
+ <filterset refid="project"/>
+ <filterset refid="jdbc"/>
+ </copy>
</target>
<target name="file-copy-ear" unless="project.war">
@@ -876,13 +879,16 @@
<include name="META-INF/ejb-jar.xml"/>
<include name="META-INF/jboss-app.xml"/>
<include name="META-INF/orm.xml"/>
- <include name="META-INF/persistence*.xml"/>
- <exclude name="META-INF/persistence*-war.xml"/>
+ <include name="META-INF/persistence-*.xml"/>
+ <exclude name="META-INF/persistence-*-war.xml"/>
<include name="WEB-INF/components.xml"/>
</fileset>
<filterset refid="project"/>
<filterset refid="jdbc"/>
</copy>
+ <replace
file="${project.home}/resources/WEB-INF/components.xml">
+ <replacefilter token="java:/${project.name}EntityManagerFactory"
value="@puJndiName@"/>
+ </replace>
</target>
<target name="file-copy"
depends="file-copy-war,file-copy-ear,setup-filters">
@@ -1009,12 +1015,6 @@
file="${templates.dir}/ide-project-files/idea/module.iml">
<filterset refid="project"/>
</copy>
- <!--
- <copy tofile="${project.home}/${project.name}.iws"
-
file="${templates.dir}/ide-project-files/idea/workspace.iws">
- <filterset refid="project"/>
- </copy>
- -->
<!-- NetBeans project files -->
<mkdir dir="${project.home}/nbproject"/>
Modified: trunk/seam-gen/resources/META-INF/persistence-dev-war.xml
===================================================================
--- trunk/seam-gen/resources/META-INF/persistence-dev-war.xml 2009-04-06 23:13:11 UTC (rev
10320)
+++ trunk/seam-gen/resources/META-INF/persistence-dev-war.xml 2009-04-06 23:18:07 UTC (rev
10321)
@@ -14,7 +14,7 @@
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql"
value="true"/>@catalogProperty@@schemaProperty@
<!-- Only relevant if Seam is loading the persistence unit (Java SE
bootstrap) -->
- <property name="hibernate.transaction.manager_lookup_class"
value="@transactionManagerLookupClass@"/>
+ <property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
</properties>
</persistence-unit>
Added: trunk/seam-gen/resources/WEB-INF/components-war-tokenized.xml
===================================================================
--- trunk/seam-gen/resources/WEB-INF/components-war-tokenized.xml
(rev 0)
+++ trunk/seam-gen/resources/WEB-INF/components-war-tokenized.xml 2009-04-06 23:18:07 UTC
(rev 10321)
@@ -0,0 +1,64 @@
+<?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:web="http://jboss.com/products/seam/web"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation=
+ "http://jboss.com/products/seam/core
http://jboss.com/products/seam/core-2.1.xsd
+
http://jboss.com/products/seam/persistence
http://jboss.com/products/seam/persistence-2.1.xsd
+
http://jboss.com/products/seam/drools
http://jboss.com/products/seam/drools-2.1.xsd
+
http://jboss.com/products/seam/bpm
http://jboss.com/products/seam/bpm-2.1.xsd
+
http://jboss.com/products/seam/security
http://jboss.com/products/seam/security-2.1.xsd
+
http://jboss.com/products/seam/mail
http://jboss.com/products/seam/mail-2.1.xsd
+
http://jboss.com/products/seam/web
http://jboss.com/products/seam/web-2.1.xsd
+
http://jboss.com/products/seam/components
http://jboss.com/products/seam/components-2.1.xsd">
+
+ <core:init debug="@debug@" jndi-pattern="@jndiPattern@"/>
+
+ <core:manager concurrent-request-timeout="500"
+ conversation-timeout="120000"
+ conversation-id-parameter="cid"
+ parent-conversation-id-parameter="pid"/>
+
+ <!-- Make sure this URL pattern is the same as that used by the Faces Servlet
-->
+ <web:hot-deploy-filter url-pattern="*.seam"/>
+
+ <persistence:entity-manager-factory name="entityManagerFactory"
+ persistence-unit-name="@projectName@"
+ installed="@seamBootstrapsPu@"/>
+
+ <persistence:managed-persistence-context name="entityManager"
auto-create="true"
+ entity-manager-factory="@seamEmfRef@"
+ persistence-unit-jndi-name="@puJndiName@"/>
+
+ <drools:rule-base name="securityRules">
+
<drools:rule-files><value>/security.drl</value></drools:rule-files>
+ </drools:rule-base>
+
+ <security:rule-based-permission-resolver
security-rules="#{securityRules}"/>
+
+ <security:identity authenticate-method="#{authenticator.authenticate}"
remember-me="true"/>
+
+ <event type="org.jboss.seam.security.notLoggedIn">
+ <action execute="#{redirect.captureCurrentView}"/>
+ </event>
+ <event type="org.jboss.seam.security.loginSuccessful">
+ <action execute="#{redirect.returnToCapturedView}"/>
+ </event>
+
+ <mail:mail-session host="localhost" port="25"/>
+
+ <!-- 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>
Modified: trunk/seam-gen/resources/WEB-INF/components-war.xml
===================================================================
--- trunk/seam-gen/resources/WEB-INF/components-war.xml 2009-04-06 23:13:11 UTC (rev
10320)
+++ trunk/seam-gen/resources/WEB-INF/components-war.xml 2009-04-06 23:18:07 UTC (rev
10321)
@@ -29,12 +29,10 @@
<web:hot-deploy-filter url-pattern="*.seam"/>
<persistence:entity-manager-factory name="entityManagerFactory"
- persistence-unit-name="@projectName@"
- installed="@seamBootstrapsPu@"/>
+ persistence-unit-name="@projectName@"/>
<persistence:managed-persistence-context name="entityManager"
auto-create="true"
- entity-manager-factory="@seamEmfRef@"
- persistence-unit-jndi-name="@puJndiName@"/>
+
entity-manager-factory="#{entityManagerFactory}"/>
<drools:rule-base name="securityRules">
<drools:rule-files><value>/security.drl</value></drools:rule-files>
Modified: trunk/seam-gen/resources/WEB-INF/components.xml
===================================================================
--- trunk/seam-gen/resources/WEB-INF/components.xml 2009-04-06 23:13:11 UTC (rev 10320)
+++ trunk/seam-gen/resources/WEB-INF/components.xml 2009-04-06 23:18:07 UTC (rev 10321)
@@ -29,7 +29,7 @@
<web:hot-deploy-filter url-pattern="*.seam"/>
<persistence:managed-persistence-context name="entityManager"
auto-create="true"
- persistence-unit-jndi-name="@puJndiName@"/>
+
persistence-unit-jndi-name="java:/@projectName@EntityManagerFactory"/>
<drools:rule-base name="securityRules">
<drools:rule-files>