67,550
社区成员




<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration" />
<property name="configLocation" value="classpath:hibernate.cfg.xml" />
</bean>
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
<!-- DAO -->
<bean id="dao" class="org.jobs.persistence.dao.impl.DaoImpl" abstract="true">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="roleDao" class="org.jobs.persistence.dao.impl.RoleDaoImpl">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="userDao" class="org.jobs.persistence.dao.impl.UserDaoImpl">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="groupDao" class="org.jobs.persistence.dao.impl.GroupDaoImpl">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="orderDao" class="org.jobs.persistence.dao.impl.OrderDaoImpl">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<!-- WS Bean -->
<bean id="usersManager" class="org.jobs.ws.bean.UsersManagerBean">
<property name="roleDao" ref="roleDao" />
<property name="groupDao" ref="groupDao" />
<property name="userDao" ref="userDao" />
</bean>
<bean id="processManager" class="org.jobs.ws.bean.ProcessManagerBean">
<property name="orderDao" ref="orderDao" />
</bean>
<!-- CXF server -->
<jaxws:endpoint id="usersWS" implementor="#usersManager" implementorClass="org.jobs.ws.bean.UsersManagerBean"
address="/users" />
<jaxws:endpoint id="processWS" implementor="#processManager" implementorClass="org.jobs.ws.bean.ProcessManagerBean"
address="/process" />
<!-- CXF client -->
<jaxws:client id="usersWSClient" serviceClass="org.jobs.ws.bean.UsersManager"
address="http://localhost:9090/jobs/ws/users" />
<jaxws:client id="processWSClient" serviceClass="org.jobs.ws.bean.ProcessManager"
address="http://localhost:9090/jobs/ws/process" />
<!-- JSF Bean -->
<bean id="userService" class="org.jobs.web.UserService"/>
<bean id="sessionBean" class="org.jobs.web.bean.SessionBean" scope="session" />
<bean id="settingBean" class="org.jobs.web.bean.SettingBean" scope="session" />
<bean id="role" class="org.jobs.web.RoleBean" scope="session" />
<bean id="userBean" class="org.jobs.web.bean.UserBean" scope="request" />
<bean id="groupBean" class="org.jobs.web.bean.GroupBean" scope="request"/>
<bean id="adminBean" class="org.jobs.web.admin.bean.AdminBean" scope="request" />
<bean id="orderBean" class="org.jobs.web.bean.OrderBean" scope="request" />
</beans>