configure seam 2.2 entitymanager to work on websphere 7 -
i create jboss seam 2.2 application using seam-gen tool (ear file) application works fine on jboss 4.3,
i managed run application on websphere 7 after modifying jars per documents available on seam reference docs,
the problem: tried many ways configure persistence connect database, didn't work. correct way have application connect db (oracle) created working data-srouce inside websphere 7 i'm not sure correct configuration inside (components.xml) , (persistence.xml)
thanks in advance
1- persistence.xml
<?xml version="1.0" encoding="utf-8"?> <!-- persistence deployment descriptor prod profile --> <persistence xmlns="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 http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="shbcalc"> <provider>org.hibernate.ejb.hibernatepersistence</provider> <jta-data-source>shbcalcds</jta-data-source> <properties> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.websphereextendedjtatransactionlookup"/> <property name="hibernate.dialect" value="org.hibernate.dialect.oracledialect"/> <property name="hibernate.show_sql" value="true"/> <property name="hibernate.hbm2ddl.auto" value="none"/> </properties> </persistence-unit> </persistence>
2- components.xml
<?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:security="http://jboss.com/products/seam/security" xmlns:transaction="http://jboss.com/products/seam/transaction" xmlns:drools="http://jboss.com/products/seam/drools" 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.2.xsd http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.2.xsd http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.2.xsd http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.2.xsd http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.2.xsd http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.2.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd"> <transaction:ejb-transaction /> <core:init jndi-pattern="ejblocal:#{ejbname}" debug="true" ></core:init> <persistence:managed-persistence-context name="entitymanager" auto-create="true" persistence-unit-jndi-name="@pujndiname@"/> <core:manager concurrent-request-timeout="500" conversation-timeout="120000" conversation-id-parameter="cid" parent-conversation-id-parameter="pid"/> <!-- make sure url pattern same used faces servlet --> <web:hot-deploy-filter url-pattern="*.seam"/> <security:identity authenticate-method="#{authenticator.authenticate}" /> <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"/> </components>
3- web.xml
<?xml version="1.0" ?> <!-- websphere flavor --> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5" metadata-complete="true"> <!-- richfaces --> <context-param> <param-name>org.richfaces.skin</param-name> <param-value>bluesky</param-value> </context-param> <!-- suppress spurious stylesheets --> <context-param> <param-name>org.richfaces.control_skinning</param-name> <param-value>disable</param-value> </context-param> <context-param> <param-name>org.richfaces.control_skinning_classes</param-name> <param-value>disable</param-value> </context-param> <!-- change load strategy default disable sending scripts/styles packs --> <context-param> <param-name>org.richfaces.loadstylestrategy</param-name> <param-value>all</param-value> </context-param> <context-param> <param-name>org.richfaces.loadscriptstrategy</param-name> <param-value>all</param-value> </context-param> <!-- seam --> <listener> <listener-class>org.jboss.seam.servlet.seamlistener</listener-class> </listener> <filter> <filter-name>seam filter</filter-name> <filter-class>org.jboss.seam.servlet.seamfilter</filter-class> </filter> <filter-mapping> <filter-name>seam filter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <servlet> <servlet-name>seam resource servlet</servlet-name> <servlet-class>org.jboss.seam.servlet.seamresourceservlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>seam resource servlet</servlet-name> <url-pattern>/seam/resource/*</url-pattern> </servlet-mapping> <!-- facelets development mode (disable in production) --> <context-param> <param-name>facelets.development</param-name> <param-value>@debug@</param-value> </context-param> <!-- jsf --> <context-param> <param-name>javax.faces.default_suffix</param-name> <param-value>.xhtml</param-value> </context-param> <servlet> <servlet-name>faces servlet</servlet-name> <servlet-class>javax.faces.webapp.facesservlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>*.seam</url-pattern> </servlet-mapping> <security-constraint> <display-name>restrict raw xhtml documents</display-name> <web-resource-collection> <web-resource-name>xhtml</web-resource-name> <url-pattern>*.xhtml</url-pattern> </web-resource-collection> <auth-constraint/> </security-constraint> <!-- add entries each ejb session bean seam component (not required on jboss as) --> <persistence-unit-ref> <persistence-unit-ref-name>jdbc/shbcalcds</persistence-unit-ref-name> </persistence-unit-ref> <ejb-local-ref> <!-- matches pattern set in components.xml --> <ejb-ref-name>ejblocal:ejbsynchronizations</ejb-ref-name> <ejb-ref-type>session</ejb-ref-type> <local>org.jboss.seam.transaction.localejbsynchronizations</local> </ejb-local-ref> </web-app>
finally found proper configuration application run on both jboss 4.3 , websphere 7
1- build.xml
<?xml version="1.0"?> <project name="shbcalc" default="deploy" basedir="."> <!-- give user chance override without editing file or typing -d --> <property file="${basedir}/build.properties"/> <!-- production websphere flavor --> <!-- dev jboss flavor --> <property name="profile" value="prod"/> <property file="build-${profile}.properties"/> <!-- set global properties build --> <property name="project.name" value="shbcalc"/> <property name="project.ear" value="true"/> <property name="richfaces.present" value="true"/> <property name="dist.dir" value="dist"/> <property name="src.model.dir" value="src/main"/> <property name="src.action.dir" value="src/hot"/> <property name="src.test.dir" value="src/test"/> <property name="lib.dir" value="lib"/> <property name="endorsed.dir" value="${lib.dir}/endorsed"/> <property name="ear.dir" value="exploded-archives/${project.name}.ear"/> <property name="exploded.archive.dir" value="${ear.dir}"/> <property name="jar.dir" value="${ear.dir}/${project.name}_jar"/> <property name="war.dir" value="${ear.dir}/${project.name}_war"/> <property name="test.dir" value="test-build"/> <property name="bootstrap.dir" value="${basedir}/bootstrap"/> <property name="jboss.domain" value="default"/> <property name="deploy.dir" value="${jboss.home}/server/${jboss.domain}/deploy"/> <property name="ear.deploy.dir" value="${deploy.dir}/${project.name}.ear"/> <property name="jar.deploy.dir" value="${ear.deploy.dir}/${project.name}.jar"/> <property name="war.deploy.dir" value="${ear.deploy.dir}/${project.name}.war"/> <property name="packaged.archive" value="${dist.dir}/${project.name}.ear"/> <property name="testng.jar" value="${basedir}/lib/testng-jdk15.jar"/> <property name="javac.debug" value="true"/> <property name="javac.deprecation" value="false"/> <property name="debug" value="false"/> <!--properties validating configuration files --> <property name="validate.resources.dir" value="${basedir}/exploded-archives"/> <property name="schema.dir" value="${basedir}/exploded-archives/schemas"/> <property name="src.schema.dir" value="${schema.dir}/org/jboss/seam"/> <property name="schema.version" value="2.2"/> <fileset id="lib" dir="${lib.dir}"> <include name="*.jar"/> </fileset> <path id="build.classpath"> <fileset refid="lib"/> </path> <!-- import glassfish deployment targets --> <import file="${basedir}/glassfish-build.xml"/> <target name="init" description="initialize build"> <taskdef name="groovyc" classname ="org.codehaus.groovy.ant.groovyc" classpathref="build.classpath"/> <!-- groovy jar necessary --> <mkdir dir="${jar.dir}"/> <mkdir dir="${ear.dir}"/> <mkdir dir="${war.dir}"/> <mkdir dir="${dist.dir}"/> <condition property="is.debug" value="true"> <istrue value="${debug}"/> </condition> <property name="transactionmanagerlookupclass" value="org.hibernate.transaction.jbosstransactionmanagerlookup"/> <property name="ejbjndipattern" value="${project.name}/#{ejbname}/local"/> <property name="seambootstrapspu" value="false"/> <property name="seamemfref" value="#{null}"/> <condition property="pujndiname" value="java:comp/env/${project.name}/pu" else="java:/${project.name}entitymanagerfactory"> <available file="${jboss.home}/lib/jboss-vfs.jar"/> <!-- jboss >= 5.0 --> </condition> <filterset id="persistence"> <filter token="transactionmanagerlookupclass" value="${transactionmanagerlookupclass}"/> </filterset> <filterset id="seam"> <filter token="ejbjndipattern" value="${ejbjndipattern}"/> <filter token="seambootstrapspu" value="${seambootstrapspu}"/> <filter token="seamemfref" value="${seamemfref}"/> <filter token="pujndiname" value="${pujndiname}"/> </filterset> <filterset id="profile"> <filter token="debug" value="${debug}"/> </filterset> <!-- if .groovy file in model or action, set groovy.present --> <available property="groovy.present" value="true" file="" searchparents="true"> <filepath> <fileset dir="${src.action.dir}"> <include name="**/*.groovy"/> </fileset> <fileset dir="${src.model.dir}"> <include name="**/*.groovy"/> </fileset> </filepath> </available> <condition property="groovy.test.present" value="true"> <or> <isset property="groovy.present"/> <available file="" searchparents="true"> <filepath> <fileset dir="${src.test.dir}"> <include name="**/*.groovy"/> </fileset> </filepath> </available> </or> </condition> <!-- note: seam not detect uncompiled groovy classes in ear --> <condition property="groovy.dynamic" value="true"> <and> <isset property="groovy.present"/> <istrue value="${debug}"/> </and> </condition> <condition property="groovy.static" value="true"> <and> <isset property="groovy.present"/> <isfalse value="${debug}"/> </and> </condition> </target> <target name="groovy.compile" if="groovy.static"> <groovyc classpathref="build.classpath" destdir="${jar.dir}" srcdir="${src.model.dir}"> </groovyc> <path id="groovy.action.classpath"> <path refid="build.classpath"/> <dirset dir="${jar.dir}"/> </path> <groovyc classpathref="groovy.action.classpath" destdir="${jar.dir}" srcdir="${src.action.dir}"> </groovyc> </target> <target name="groovy.copy" if="groovy.dynamic"> <copy todir="${jar.dir}"> <fileset dir="${src.action.dir}"> <include name="**/*.groovy"/> </fileset> </copy> </target> <target name="compile" depends="init,groovy.compile,groovy.copy" description="compile java source code" unless="eclipse.running"> <javac classpathref="build.classpath" destdir="${jar.dir}" debug="${javac.debug}" deprecation="${javac.deprecation}" nowarn="on"> <src path="${src.model.dir}"/> <src path="${src.action.dir}"/> </javac> </target> <target name="copyclasses" depends="init" description="copy classes compiled eclipse" if="eclipse.running"> <copy todir="${jar.dir}"> <fileset dir="classes/main"> <include name="**/*.class"/> </fileset> <fileset dir="classes/hot"> <include name="**/*.class"/> </fileset> </copy> </target> <target name="jar" depends="compile,copyclasses" description="build jar structure in staging directory"> <copy todir="${jar.dir}"> <fileset dir="${src.model.dir}"> <include name="**/*.component.xml" /> </fileset> <fileset dir="${basedir}/resources"> <include name="seam.properties"/> <include name="*.drl"/> <include name="meta-inf/*.drl"/> </fileset> </copy> <copy todir="${jar.dir}/meta-inf"> <fileset dir="${basedir}/resources/meta-inf"> <include name="ejb-jar.xml"/> <include name="orm.xml"/> </fileset> </copy> <copy todir="${jar.dir}/"> <fileset dir="${basedir}/resources"> <include name="log4j.xml"/> </fileset> </copy> <copy tofile="${jar.dir}/meta-inf/persistence.xml" file="${basedir}/resources/meta-inf/persistence-${profile}.xml"> <filterset refid="persistence"/> </copy> <copy tofile="${jar.dir}/import.sql" file="${basedir}/resources/import-${profile}.sql"/> </target> <target name="war" depends="compile" description="build war structure in staging directory"> <copy todir="${war.dir}"> <fileset dir="${basedir}/view"/> </copy> <copy tofile="${war.dir}/web-inf/classes/seam-jndi.properties" file="${basedir}/resources/seam-jndi-${profile}.properties"> </copy> <copy tofile="${war.dir}/web-inf/classes/components.properties" file="${basedir}/resources/components-${profile}.properties"> <filterset refid="seam"/> <filterset refid="profile"/> </copy> <copy tofile="${war.dir}/web-inf/components.xml" file="${basedir}/resources/web-inf/components-${profile}.xml"> <filterset refid="seam"/> <filterset refid="profile"/> </copy> <copy todir="${war.dir}/web-inf"> <fileset dir="${basedir}/resources/web-inf"> <include name="*.*"/> <include name="lib/*.*"/> <exclude name="web-*.xml" /> <exclude name="components*.xml"/> </fileset> </copy> <copy todir="${war.dir}/web-inf/lib"> <fileset dir="${lib.dir}"> <includesfile name="deployed-jars-war.list"/> <exclude name="jboss-seam-gen.jar"/> <exclude name="jboss-seam-debug.jar" unless="is.debug"/> </fileset> </copy> <copy todir="${war.dir}/web-inf/classes"> <fileset dir="${basedir}/resources"> <include name="*.skin.properties" if="richfaces.present"/> <include name="*_theme.properties"/> <include name="**/*.xcss" if="richfaces.present"/> </fileset> <!-- move xcss classpath loading web context works in jboss 4 --> <fileset dir="${basedir}/view"> <include name="**/*.xcss" if="richfaces.present"/> </fileset> </copy> <copy tofile="${war.dir}/web-inf/web.xml" file="${basedir}/resources/web-inf/web-${profile}.xml"> </copy> <native2ascii encoding="utf-8" src="${basedir}/resources" dest="${war.dir}/web-inf/classes" includes="messages*.properties" /> </target> <target name="ear" description="build ear structure in staging directory"> <copy todir="${ear.dir}"> <fileset dir="${basedir}/resources"> <include name="*jpdl.xml"/> <include name="*hibernate.cfg.xml"/> <include name="jbpm.cfg.xml"/> </fileset> <fileset dir="${lib.dir}"> <include name="jboss-seam.jar"/> </fileset> </copy> <copy todir="${ear.dir}/lib"> <fileset dir="${lib.dir}"> <includesfile name="deployed-jars-ear.list"/> <exclude name="icefaces-ahs.jar" if="icefaces.present"/> </fileset> </copy> <copy todir="${ear.dir}/meta-inf"> <fileset dir="${basedir}/resources/meta-inf"> <include name="application.xml"/> </fileset> </copy> <copy tofile="${basedir}/resources/meta-inf/jboss-app.xml" file="${basedir}/resources/meta-inf/jboss-app-${profile}.xml"> </copy> </target> <target name="clear-profile-artifacts" depends="init" description="clear compiled cache of profile-specific artifacts in anticipation of profile change"> <delete file="${jar.dir}/meta-inf/persistence.xml"/> <delete file="${jar.dir}/import.sql"/> <delete file="${war.dir}/web-inf/classes/components.properties"/> </target> <target name="stage" depends="jar,war,ear"/> <target name="archive" depends="clear-profile-artifacts,stage" description="package archives"> <jar jarfile="${dist.dir}/${project.name}.jar" basedir="${jar.dir}"/> <jar jarfile="${dist.dir}/${project.name}.war" basedir="${war.dir}"/> <jar jarfile="${dist.dir}/${project.name}.ear"> <fileset dir="${ear.dir}"> <exclude name="${project.name}_jar/**"/> <exclude name="${project.name}_war/**"/> </fileset> <fileset dir="${dist.dir}"> <include name="${project.name}.jar"/> <include name="${project.name}.war"/> </fileset> </jar> </target> <target name="datasource"> <fail unless="jboss.home">jboss.home not set</fail> <copy file="${basedir}/resources/${project.name}-${profile}-ds.xml" tofile="${deploy.dir}/${project.name}-ds.xml"/> </target> <target name="explode" depends="stage,datasource" description="deploy exploded archive"> <fail unless="jboss.home">jboss.home not set</fail> <copy todir="${ear.deploy.dir}"> <fileset dir="${ear.dir}"> <include name="**/*"/> <exclude name="${project.name}_jar/**"/> <exclude name="${project.name}_war/**"/> </fileset> </copy> <copy todir="${jar.deploy.dir}"> <fileset dir="${jar.dir}"/> </copy> <copy todir="${war.deploy.dir}"> <fileset dir="${war.dir}"/> </copy> </target> <target name="unexplode" description="undeploy exploded archive"> <delete failonerror="no"> <fileset dir="${ear.deploy.dir}"> <exclude name="**/*.jar"/> </fileset> </delete> <delete file="${deploy.dir}/${project.name}-ds.xml" failonerror="no"/> <delete dir="${ear.deploy.dir}" failonerror="no"/> </target> <target name="reexplode" depends="unexplode,clean,explode" description="undeploy exploded archive, clean, deploy exploded archive"/> <target name="check-deployed" description="check see if packaged archive deployed"> <fail unless="jboss.home">jboss.home not set</fail> <condition property="archive.deployed" value="true"> <available file="${ear.deploy.dir}" type="file"/> </condition> </target> <target name="restart-exploded" unless="archive.deployed" description="deploy exploded archive if not deployed packaged archive"> <antcall target="explode"/> <touch file="${ear.deploy.dir}/meta-inf/application.xml"/> </target> <target name="restart-deployed" if="archive.deployed" description="deploy packaged archive if deployed packaged archive"> <antcall target="deploy"/> </target> <target name="restart" depends="check-deployed,clear-profile-artifacts,restart-exploded,restart-deployed" description="restart exploded archive"/> <target name="deploy" depends="archive,datasource" description="deploy packaged archive"> <fail unless="jboss.home">jboss.home not set</fail> <copy todir="${deploy.dir}" file="${dist.dir}/${project.name}.ear"/> </target> <target name="undeploy" description="undeploy packaged archive"> <delete file="${deploy.dir}/${project.name}.ear"/> <delete file="${deploy.dir}/${project.name}-ds.xml"/> </target> <target name="redeploy" depends="undeploy,clean,deploy" description="undeploy packaged archive, clean, deploy packaged archive"/> <target name="clean" description="cleans staging directory"> <delete dir="${dist.dir}"/> <delete dir="${basedir}/exploded-archives"/> <delete dir="${src.schema.dir}" failonerror="no"/> <delete dir="${basedir}/test-report"/> <delete dir="${basedir}/test-output"/> <delete failonerror="no" includeemptydirs="true"> <fileset dir="${test.dir}"> <exclude name="**/*.class" if="eclipse.running"/> </fileset> </delete> </target> <target name="compiletest" depends="groovy.compiletest" unless="eclipse.running" description="compile java source code tests"> <mkdir dir="${test.dir}"/> <javac classpathref="build.classpath" destdir="${test.dir}" debug="${javac.debug}" deprecation="${javac.deprecation}" nowarn="on"> <src path="${src.action.dir}"/> <src path="${src.model.dir}"/> <src path="${src.test.dir}"/> </javac> </target> <target name="groovy.compiletest" if="groovy.test.present" description="compile groovy source code tests"> <mkdir dir="${test.dir}"/> <groovyc classpathref="build.classpath" destdir="${test.dir}"> <src path="${src.action.dir}"/> <src path="${src.model.dir}"/> <src path="${src.test.dir}"/> </groovyc> </target> <target name="copytestclasses" if="eclipse.running" description="copy classes compiled eclipse test dir"> <mkdir dir="${test.dir}"/> <copy todir="${test.dir}"> <fileset dir="classes/main"> <include name="**/*.class"/> </fileset> </copy> <copy todir="${test.dir}"> <fileset dir="classes/hot"> <include name="**/*.class"/> </fileset> </copy> <copy todir="${test.dir}"> <fileset dir="classes/test"> <include name="**/*.class"/> </fileset> </copy> </target> <target name="buildtest" depends="init,compiletest,copytestclasses" description="build tests"> <copy todir="${test.dir}"> <fileset dir="${basedir}/resources"> <exclude name="meta-inf/persistence*.xml"/> <exclude name="import*.sql"/> <exclude name="${project.name}-*-ds.xml"/> <exclude name="components-*.properties"/> </fileset> <fileset dir="${basedir}/view"/> </copy> <copy tofile="${test.dir}/meta-inf/persistence.xml" file="${basedir}/resources/meta-inf/persistence-test.xml"/> <copy tofile="${test.dir}/import.sql" file="${basedir}/resources/import-test.sql"/> <copy tofile="${test.dir}/components.properties" file="${basedir}/resources/components-test.properties"/> <copy todir="${test.dir}" flatten="true"> <fileset dir="${src.test.dir}"> <include name="**/*test.xml"/> </fileset> </copy> </target> <target name="test" depends="buildtest" description="run tests"> <fail message="cannot run tests because path project contains spaces."> <condition> <contains string="${basedir}" substring=" "/> </condition> </fail> <condition property="incompatible.jdk" value="true"> <and> <equals arg1="${ant.java.version}" arg2="1.6"/> <not><available classname="javax.xml.bind.jaxb"/></not> </and> </condition> <fail if="incompatible.jdk">you using incompatible jdk 6. please use sun jdk 6 update 4 (1.6.0_04) or newer or use open jdk 6.</fail> <taskdef resource="testngtasks" classpath="${testng.jar}"/> <path id="test.path"> <path path="${test.dir}"/> <fileset dir="${lib.dir}/test"> <include name="*.jar"/> </fileset> <path path="${bootstrap.dir}"/> <path refid="build.classpath"/> </path> <testng outputdir="${basedir}/test-report"> <jvmarg line="-dsun.lang.classloader.allowarraysyntax=true"/> <classpath refid="test.path"/> <xmlfileset dir="${test.dir}" includes="*test.xml"/> </testng> </target> <target name="javadoc" depends="compile"> <mkdir dir="${dist.dir}/apidoc"/> <javadoc classpathref="build.classpath" destdir="${dist.dir}/apidoc" use="true" protected="true" version="true" windowtitle="${project.name} api documentation" doctitle="${project.name} api documentation" link="http://java.sun.com/j2se/5.0/docs/api"> <packageset dir="${src.action.dir}" defaultexcludes="yes"> <include name="*/**"/> </packageset> <packageset dir="${src.model.dir}" defaultexcludes="yes"> <include name="*/**"/> </packageset> </javadoc> </target> <!-- deprecated --> <target name="validateconfiguration" depends="validate"/> <target name="validate" depends="stage" description="validate xml configuration files"> <mkdir dir="${schema.dir}"/> <unjar src="${lib.dir}/jboss-seam.jar" dest="${schema.dir}"> <patternset> <include name="org/jboss/seam/*.xsd"/> <include name="org/jboss/seam/*.dtd"/> </patternset> </unjar> <ant antfile="validate.xml" target="validateconfiguration"/> </target> <target name="purge" depends="undeploy" description="clean out jboss temporary deployment files"> <delete dir="${jboss.home}/server/default/tmp/deploy"/> <mkdir dir="${jboss.home}/server/default/tmp/deploy/"/> <delete dir="${jboss.home}/server/default/tmp/sessions"/> <mkdir dir="${jboss.home}/server/default/tmp/sessions"/> <delete dir="${jboss.home}/server/default/work/jboss.web/localhost/${project.name}"/> </target> </project>
2- components-prod.xml
<?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:security="http://jboss.com/products/seam/security" xmlns:drools="http://jboss.com/products/seam/drools" 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.2.xsd http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.2.xsd http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.2.xsd http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.2.xsd http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.2.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd"> <persistence:entity-manager-factory name="shbcalc"/> <persistence:managed-persistence-context name="entitymanager" auto-create="true" entity-manager-factory="#{shbcalc}"/> <core:init jndi-pattern="ejblocal:#{ejbname}" debug="true" ></core:init> <core:manager concurrent-request-timeout="500" conversation-timeout="120000" conversation-id-parameter="cid" parent-conversation-id-parameter="pid"/> <!-- make sure url pattern same used faces servlet --> <web:hot-deploy-filter url-pattern="*.seam"/> <security:identity authenticate-method="#{authenticator.authenticate}" /> <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"/> </components>
3- persistence-prod.xml
<?xml version="1.0" encoding="utf-8"?> <!-- persistence deployment descriptor prod profile --> <persistence xmlns="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 http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="shbcalc"> <provider>org.hibernate.ejb.hibernatepersistence</provider> <jta-data-source>shbcalcds</jta-data-source> <properties> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.websphereextendedjtatransactionlookup"/> <property name="hibernate.dialect" value="org.hibernate.dialect.oracle10gdialect"/> <property name="hibernate.show_sql" value="true"/> <property name="hibernate.hbm2ddl.auto" value="none"/> </properties> </persistence-unit> </persistence>
4- deployed-jars-ear.list
antlr-runtime.jar commons-beanutils.jar #core.jar drools-templates.jar drools-decisiontables.jar drools-compiler.jar drools-api.jar drools-core.jar groovy-all.jar janino.jar jboss-el.jar #jboss-seam-remoting.jar mvel2.jar richfaces-api.jar jbpm-jpdl.jar antlr.jar commons-collections.jar commons-digester.jar dom4j.jar el-ri.jar hibernate-annotations.jar hibernate-commons-annotations.jar hibernate-core.jar hibernate-entitymanager.jar hibernate-validator.jar javassist.jar jboss-el.jar log4j.jar richfaces-api.jar slf4j-api.jar slf4j-log4j12.jar jboss-common.jar
5- deployed-jars-war.list
#commons-digester.jar jboss-seam-debug.jar #jboss-seam-excel.jar #jboss-seam-ioc.jar #jboss-seam-mail.jar ## jboss-seam-pdf.jar #jboss-seam-rss.jar jboss-seam-ui.jar jsf-facelets.jar #jxl.jar richfaces-impl.jar richfaces-ui.jar hibernate-entitymanager.jar
Comments
Post a Comment