This commit is contained in:
Keith Donald
2008-05-27 15:47:58 +00:00
parent d5464d7e30
commit 6542e3ae2f
5 changed files with 61 additions and 29 deletions

View File

@@ -6,36 +6,37 @@
version="1.3">
<info organisation="org.springframework.samples" module="${ant.project.name}">
<ivyauthor name="Colin Yates"/>
<ivyauthor name="Keith Donald"/>
<ivyauthor name="Colin Yates" />
<ivyauthor name="Keith Donald" />
</info>
<configurations>
<include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
<include file="${spring.build.dir}/common/default-ivy-configurations.xml" />
</configurations>
<publications>
<artifact name="${ant.project.name}"/>
<artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
<artifact name="${ant.project.name}" />
<artifact name="${ant.project.name}-sources" type="src" ext="jar" />
</publications>
<dependencies>
<dependency org="org.springframework.samples" name="org.springframework.samples.springtravel.resource" rev="latest.integration" conf="compile->runtime"/>
<dependency org="com.sun.facelets" name="com.springsource.com.sun.facelets" rev="1.1.14" conf="provided->runtime"/>
<dependency org="javax.el" name="com.springsource.javax.el" rev="2.1.0" conf="provided->runtime"/>
<dependency org="javax.persistence" name="com.springsource.javax.persistence" rev="1.0.0" conf="provided->runtime"/>
<dependency org="javax.servlet" name="com.springsource.javax.servlet" rev="2.4.0" conf="provided->runtime"/>
<dependency org="javax.servlet" name="com.springsource.javax.servlet.jsp.jstl" rev="1.1.2" conf="provided->runtime"/>
<dependency org="javax.transaction" name="com.springsource.javax.transaction" rev="1.1.0" conf="provided->runtime"/>
<dependency org="org.apache.log4j" name="com.springsource.org.apache.log4j" rev="1.2.15" conf="provided->runtime"/>
<dependency org="org.springframework.samples" name="org.springframework.samples.springtravel.resource" rev="latest.integration" conf="compile->runtime" />
<dependency org="com.sun.facelets" name="com.springsource.com.sun.facelets" rev="1.1.14" conf="provided->runtime" />
<dependency org="javax.el" name="com.springsource.javax.el" rev="2.1.0" conf="provided->runtime" />
<dependency org="javax.persistence" name="com.springsource.javax.persistence" rev="1.0.0" conf="provided->runtime" />
<dependency org="javax.servlet" name="com.springsource.javax.servlet" rev="2.4.0" conf="provided->runtime" />
<dependency org="javax.servlet" name="com.springsource.javax.servlet.jsp.jstl" rev="1.1.2" conf="provided->runtime" />
<dependency org="javax.transaction" name="com.springsource.javax.transaction" rev="1.1.0" conf="provided->runtime" />
<dependency org="org.apache.log4j" name="com.springsource.org.apache.log4j" rev="1.2.15" conf="provided->runtime" />
<dependency org="org.hibernate" name="org.hibernate.ejb-library" rev="3.3.1.ga" conf="provided->runtime" />
<dependency org="org.jboss.el" name="com.springsource.org.jboss.el" rev="2.0.0.GA" conf="provided->runtime"/>
<dependency org="org.jboss.el" name="com.springsource.org.jboss.el" rev="2.0.0.GA" conf="provided->runtime" />
<dependency org="org.springframework" name="org.springframework.spring-library" rev="2.5.4.A" conf="provided->runtime" />
<dependency org="org.springframework.webflow" name="org.springframework.faces" rev="latest.integration" conf="provided->jsf12"/>
<dependency org="org.springframework.webflow" name="org.springframework.js" rev="latest.integration" conf="provided->runtime"/>
<dependency org="org.springframework.webflow" name="org.springframework.webflow" rev="latest.integration" conf="provided->runtime"/>
<dependency org="org.springframework.security" name="org.springframework.security" rev="2.0.0.A" conf="provided->runtime" />
<dependency org="org.springframework.webflow" name="org.springframework.faces" rev="latest.integration" conf="provided->jsf12" />
<dependency org="org.springframework.webflow" name="org.springframework.js" rev="latest.integration" conf="provided->runtime" />
<dependency org="org.springframework.webflow" name="org.springframework.webflow" rev="latest.integration" conf="provided->runtime" />
<dependency org="org.hsqldb" name="com.springsource.org.hsqldb" rev="1.8.0.9" conf="test->runtime"/>
<dependency org="org.hsqldb" name="com.springsource.org.hsqldb" rev="1.8.0.9" conf="test->runtime" />
</dependencies>

View File

@@ -5,10 +5,11 @@ Bundle-SymbolicName: org.springframework.samples.springtravel.hotel
Bundle-Vendor: SpringSource
Import-Package: javax.sql
Export-Package: org.springframework.samples.springtravel.hotel
Import-Bundle: org.springframework.faces;version="[2.0.1.RELEASE, 3.0)",
org.springframework.binding;version="[2.0.1.RELEASE, 3.0)",
org.springframework.webflow;version="[2.0.1.RELEASE, 3.0)",
com.springsource.org.jboss.el;version="2.0.0.GA"
Import-Bundle: org.springframework.binding;version="[2.0.1, 3.0)",
org.springframework.faces;version="[2.0.1, 3.0)",
org.springframework.security;version="2.0.0"
org.springframework.webflow;version="[2.0.1, 3.0)",
com.springsource.org.apache.log4j;version="1.2.15"
Import-Library: org.hibernate.ejb;version="3.3.1.ga",
com.springsource.org.jboss.el;version="2.0.0"
Import-Library: org.hibernate.ejb;version="3.3.1",
org.springframework.spring;version="[2.5.4, 3.0)"

View File

@@ -16,16 +16,39 @@
http://www.springframework.org/schema/faces
http://www.springframework.org/schema/faces/spring-faces-2.0.xsd">
<!-- Maps request URIs to controllers -->
<bean id="hotelHandlerMappings" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<value>
/hotel/search=flowController
/hotel/booking=flowController
</value>
</property>
</bean>
<!-- Handles requests mapped to the Spring Web Flow system -->
<bean id="flowController" class="org.springframework.webflow.mvc.servlet.FlowController">
<property name="flowExecutor" ref="flowExecutor"/>
</bean>
<!-- Executes flows: the central entry point into the Spring Web Flow system -->
<webflow:flow-executor id="flowExecutor">
<webflow:flow-execution-listeners>
<webflow:listener ref="jpaFlowExecutionListener" />
<webflow:listener ref="securityFlowExecutionListener" />
</webflow:flow-execution-listeners>
</webflow:flow-executor>
<!-- The registry of executable flow definitions in this module -->
<webflow:flow-registry id="hotelFlowRegistry" flow-builder-services="facesFlowBuilderServices">
<webflow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices">
<webflow:flow-location path="org/springframework/samples/springtravel/hotel/search/hotel.xml" />
<webflow:flow-location path="org/springframework/samples/springtravel/hotel/booking/booking.xml" />
</webflow:flow-registry>
<!-- Service encapsulating hotel search and booking logic -->
<bean id="bookingService" class="org.springframework.samples.springtravel.hotel.JpaBookingAgent" />
<bean id="bookingAgent" class="org.springframework.samples.springtravel.hotel.JpaBookingAgent" />
<!-- Drives local transactions using thing the JPA API -->
<!-- Drives local transactions using the JPA API -->
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
@@ -46,4 +69,13 @@
<!-- Enables the flow JSF integration -->
<faces:flow-builder-services id="facesFlowBuilderServices" />
<!-- Installs a listener that manages JPA persistence contexts for flows that require them -->
<bean id="jpaFlowExecutionListener" class="org.springframework.webflow.persistence.JpaFlowExecutionListener">
<constructor-arg ref="entityManagerFactory" />
<constructor-arg ref="transactionManager" />
</bean>
<!-- Installs a listener to apply Spring Security authorities -->
<bean id="securityFlowExecutionListener" class="org.springframework.webflow.security.SecurityFlowExecutionListener" />
</beans>

View File

@@ -8,6 +8,6 @@
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<service ref="hotelFlowRegistry" interface="org.springframework.webflow.definition.registry.FlowDefinitionRegistry" />
<service ref="hotelHandlerMappings" interface="org.springframework.web.servlet.HandlerMapping" />
</beans:beans>

View File

@@ -7,8 +7,6 @@
</configSuffixes>
<enableImports><![CDATA[false]]></enableImports>
<configs>
<config>src/main/resources/META-INF/spring/module-context.xml</config>
<config>src/main/resources/META-INF/spring/osgi-context.xml</config>
</configs>
<configSets>
</configSets>