[jboss-user] [JBoss Seam] - Re: seam spring tomcat without jboss
augba
do-not-reply at jboss.com
Sun Feb 17 15:28:32 EST 2008
Hi , thanks for the info... I made it to work with the below settings
--- 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:spring="http://jboss.com/products/seam/spring"
xmlns:transaction="http://jboss.com/products/seam/transaction"
xmlns:security="http://jboss.com/products/seam/security"
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/components http://jboss.com/products/seam/components-2.0.xsd
http://jboss.com/products/seam/spring http://jboss.com/products/seam/spring-2.0.xsd
http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.0.xsd
http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd">
<core:init debug="true"/>
<core:manager conversation-timeout="120000"
concurrent-request-timeout="500"
conversation-id-parameter="cid"/>
<persistence:entity-manager-factory name="bookingDatabase"/>
<persistence:managed-persistence-context name="em"
auto-create="true"
entity-manager-factory="#{bookingDatabase}"/>
<spring:context-loader />
<!-- Sample Hibernate Session -->
<persistence:managed-hibernate-session name="hibernateSession" auto-create="true" session-factory="#{sessionFactory}"/>
<spring:spring-transaction platform-transaction-manager="#{transactionManager}"/>
<security:identity authenticate-method="#{authenticator.authenticate}"/>
and the applicationContext.xml
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:util="http://www.springframework.org/schema/util" xmlns:seam="http://jboss.com/products/seam/spring-seam"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
http://jboss.com/products/seam/spring-seam http://jboss.com/products/seam/spring-seam-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"
default-lazy-init="false">
<!-- This uses resource local JpaTransactionManager. You could just as easily use a JtaTransactionManager -->
<!-- Be sure to specify the SeamManagedEntityManagerFactory since that will manage the EM that will be beginning and ending transactions.-->
<tx:annotation-driven proxy-target-class="true" />
<!-- using PersistenceAnnotationBeanPostProcessor for persistence -->
<seam:component/>
<seam:component/>
<seam:configure-scopes />
<!-- Because we have multiple EntityManagerFactories in this applicaitonContext identify the
SeamManagedEntityManagerFactory as the default -->
<!-- EMF that wraps a Seam Managed EM instance for use in Spring -->
<!-- The Seam managed-persistence-context component name. -->
<!-- Optionally provide a unit name. If not specified the default would be the persistenceContextName -->
Thanks & Rgds
Augba
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4129972#4129972
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4129972
More information about the jboss-user
mailing list