`
- 浏览:
54283 次
- 性别:
- 来自:
湖北武汉
-
Transaction management strategies
xml 代码
- <beans>
-
- <bean id="myDataSource1" class="org.springframework.jndi.JndiObjectFactoryBean">
- <property name="jndiName value="java:comp/env/jdbc/myds1"/>
- </bean>
-
- <bean id="myDataSource2" class="org.springframework.jndi.JndiObjectFactoryBean">
- <property name="jndiName" value="java:comp/env/jdbc/myds2"/>
- </bean>
-
- <bean id="mySessionFactory1" class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
- <property name="dataSource" ref="myDataSource1"/>
- <property name="mappingResources">
- <list>
- <value>product.hbm.xml</value>
- </list>
- </property>
- <property name="hibernateProperties">
- <props>
- <prop key="hibernate.dialect">net.sf.hibernate.dialect.MySQLDialect</prop>
- </props>
- </property>
- </bean>
-
- <bean id="mySessionFactory2" class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
- <property name="dataSource" ref="myDataSource2"/>
- <property name="mappingResources">
- <list>
- <value>inventory.hbm.xml</value>
- </list>
- </property>
- <property name="hibernateProperties">
- <props>
- <prop key="hibernate.dialect">net.sf.hibernate.dialect.OracleDialect</prop>
- </props>
- </property>
- </bean>
-
- <bean id="myTxManager" class="org.springframework.transaction.jta.JtaTransactionManager"/>
-
- <bean id="myProductDao" class="product.ProductDaoImpl">
- <property name="sessionFactory" ref="mySessionFactory1"/>
- </bean>
-
- <bean id="myInventoryDao" class="product.InventoryDaoImpl">
- <property name="sessionFactory" ref="mySessionFactory2"/>
- </bean>
-
- <bean id="myProductServiceTarget" class="product.ProductServiceImpl">
- <property name="productDao" ref="myProductDao"/>
- <property name="inventoryDao" ref="myInventoryDao"/>
- </bean>
-
- <bean id="myProductService"
- class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
- <property name="transactionManager" ref="myTxManager"/>
- <property name="target" ref="myProductServiceTarget"/>
- <property name="transactionAttributes">
- <props>
- <prop key="increasePrice*">PROPAGATION_REQUIRED</prop>
- <prop key="someOtherBusinessMethod">PROPAGATION_REQUIRES_NEW</prop>
- <prop key="*">PROPAGATION_SUPPORTS,readOnly</prop>
- </props>
- </property>
- </bean>
-
- </beans>
分享到:
Global site tag (gtag.js) - Google Analytics
相关推荐
Not Using Commons Logging ................................................................... 12 Using SLF4J ..............................................................................................
Not Using Commons Logging ................................................................... 12 Using SLF4J ..............................................................................................
It simplifies the integration of various components, handles dependency injection, and offers robust transaction management, ensuring consistent behavior across different parts of the application. ...
The system's functionality can include features such as user registration and authentication, item listing, searching, bidding or buying, transaction management, rating and feedback mechanisms, and ...
4. **Transaction Management**:Hibernate支持JTA(Java Transaction API)和JPA(Java Persistence API)的事务管理。通过`Transaction`接口,开发者可以控制事务的开始、提交、回滚和隔离级别。 5. **Second-...
The book starts with basic concepts like installing PostgreSQL from source and covers theoretical aspects such as concurrency and transaction management. After this, you'll learn how to set up ...
3. **Data Load Management**: Strategies for efficient data loading into the SAP BW system, including PSA (Process Data Store) management and data compression. 4. **Partitioning**: Guidance on ...
trading strategies and algorithms, transaction costs, market impact and execution strategies, risk analysis, and management. The second part covers market impact models, network models, multi-asset ...
Configuration Management . . . . . . . . 63 Working with Releases . . . . . . . . . . . . 65 Issue Tracking . . . . 66 What Is an Issue? . . . 67 The Grapevine System . . . . . . . . . . . . 68 ...
5. **Transaction Management**:EJB提供强大的事务管理功能,可以根据业务需求选择不同的事务隔离级别和回滚策略。容器自动管理事务,确保数据的一致性和完整性。 6. **DAO(Data Access Object)模式**:虽然不是...
then discusses basic functions, system architecture of the platform as well as metadata services, security strategies, and finally gives a multi-user data model -shared database, shared architecture....
### 内存管理策略(Memory Management Strategies) PJSIP使用内存池策略来管理内存分配,确保在应用的生命周期内,线程安全和应用的一致性。PJSIP的内存池策略通过`poolcache`机制来实现,当内存池不再使用时,它...
- **J2EE Application Server Integration**: Describes how to integrate Hibernate with J2EE application servers, including transaction management and JNDI bindings. #### Persistent Classes This ...
- **事务管理** (Transaction Management): 保证消息处理的一致性和完整性。 **4.6 WebSphere MQ死信队列处理程序** - **死信队列** (Dead Letter Queue): 存储无法正常处理的消息。 - **处理程序** (Handler): ...
3.8.3. Current Session context management with JTA 3.8.4. JMX deployment 4. Persistent Classes 4.1. A simple POJO example 4.1.1. Implement a no-argument constructor 4.1.2. Provide an identifier ...