解决方案 »
- struts中的tiles模板
- 到底是先建对象和配置文件还是先建表???
- 网络编程ServerSocket
- jstl获取checkbox的值
- try{}catch(){}的问题
- 十万火急,请问jboss如果默认安装的话,进入管理界面的用户名及密码是什么
- juploader上传途中取消并断开后台对图片的操作
- 对java一点也不懂。该从什么学起?看起来头会变成几倍大。能否给个建议,给点资料。谢谢了
- 各位高手,请问能不能在windows 2000 个人版上安装IBM WebSphere Application Server
- 请问一下关于java中注册侦听事件的代码?
- jsp 中输出Map值
- 不知道卫什么import后面报错
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<!-- all methods starting with 'get' are read-only -->
<tx:method name="*TX" propagation="REQUIRED" />
<!-- other methods use the default transaction settings (see below) -->
<tx:method name="*" read-only="true" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="transactioncut"
expression="execution(* *..*Service.*(..))" />
<aop:advisor advice-ref="txAdvice"
pointcut-ref="transactioncut" />
</aop:config>
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName">
<value>com.microsoft.sqlserver.jdbc.SQLServerDriver</value>
</property>
<property name="url">
<value>jdbc:sqlserver://localhost:1433;databaseName=Tracy</value>
</property>
<property name="username">
<value>sa</value>
</property>
<property name="password">
<value>****</value>
</property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref local="dataSource" />
</property>
<property name="mappingResources">
<list>
<!--以下用来列出所有的PO映射文件-->
<value>com/lh/lsce/dto/ZipFileDto.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<property name="configLocation">
<value>classpath:hibernate.cfg.xml</value>
</property>
请问这两种配置有什么区别?hibernate主文件是能找到的,使用上面一种没有问题,使用下面一种配置无法提交事物