67,538
社区成员
发帖
与我相关
我的任务
分享
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dwr PUBLIC
"-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN"
"http://getahead.org/dwr/dwr20.dtd">
<dwr>
<allow>
<create javascript="Demo" creator="new">
<param name="class" value="com.hxj.util.GetDate"></param>
</create>
<create javascript="TRoleDAO" creator="spring">
<param name="beanName" value="RoleService"/>
<include method="findById"/>
<include method="getCountByRoleName"/>
<include method="findAll"/>
<include method="update"/>
</create>
<create javascript="TRoleJDBCDAO" creator="new">
<param name="class" value="com.hxj.jdbc.dao.TRoleJdbcDAO"></param>
<include method="getCountByRoleId"/>
</create>
<convert match="com.hxj.hibernate.bean.TRole" converter="bean"></convert>
<convert match="com.hxj.hibernate.bean.TPurview" converter="bean"></convert>
<convert match="com.hxj.hibernate.bean.TRolePurview" converter="bean"></convert>
</allow>
</dwr>
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver">
</property>
<property name="url"
value="jdbc:oracle:thin:@localhost:1521:hxj">
</property>
<property name="username" value="hxj"></property>
<property name="password" value="hxj"></property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.Oracle9Dialect
</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>com/hxj/hibernate/bean/TPurview.hbm.xml</value>
<value>com/hxj/hibernate/bean/TRole.hbm.xml</value>
<value>com/hxj/hibernate/bean/TRolePurview.hbm.xml</value>
</list>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<bean id="TRolePurviewDAO"
class="com.hxj.hibernate.dao.TRolePurviewDAO">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="TPurviewDAO" class="com.hxj.hibernate.dao.TPurviewDAO">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="TRoleDAO" class="com.hxj.hibernate.dao.TRoleDAO">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="RoleServiceTarget" class="com.hxj.service.impl.RoleServiceImpl">
<property name="roleDAO">
<ref bean="TRoleDAO"/>
</property>
</bean>
<bean id="PurviewServiceTarget" class="com.hxj.service.impl.PurviewServiceImpl">
<property name="purviewDAO">
<ref bean="TPurviewDAO"/>
</property>
</bean>
<bean id="RolePurviewServiceTarget" class="com.hxj.service.impl.RolePurviewServiceImpl">
<property name="rolePurviewDAO">
<ref bean="TRolePurviewDAO"/>
</property>
</bean>
<bean id="RoleService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="target" ref="RoleServiceTarget" />
<property name="transactionManager" ref="transactionManager" />
<property name="proxyInterfaces" value="com.hxj.service.RoleService" />
<property name="transactionAttributes">
<props>
<prop key="*"></prop>
</props>
</property>
</bean>
<bean id="PurviewService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="target" ref="PurviewServiceTarget"></property>
<property name="transactionManager" ref="transactionManager"></property>
<property name="proxyInterfaces" value="com.hxj.service.PurviewService"></property>
<property name="transactionAttributes">
<props>
<prop key="*"></prop>
</props>
</property>
</bean>
<bean id="RolePurviewService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="target" ref="RolePurviewServiceTarget"></property>
<property name="transactionManager" ref="transactionManager"></property>
<property name="proxyInterfaces" value="com.hxj.service.RolePurviewService"></property>
<property name="transactionAttributes">
<props>
<prop key="*"></prop>
</props>
</property>
</bean>
<bean name="/purview" class="com.hxj.struts.action.PurviewAction">
<property name="purviewService">
<ref bean="PurviewService"/>
</property>
</bean>
<bean name="/role" class="com.hxj.struts.action.RoleAction">
<property name="roleService">
<ref bean="RoleService"/>
</property>
<property name="rolePurviewService">
<ref bean="RolePurviewService"/>
</property>
<property name="purviewService">
<ref bean="PurviewService"/>
</property>
</bean>
</beans>