Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Spring
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Spring
Spring transaction
pankaj semwal
Ranch Hand
Posts: 303
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi List[],
I have configured the spring transaction as :
<?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:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <bean id="roRegi" class="com.Semwal.RoRegister" > <property name="sessionFactory" ref="sessionFactory"></property> </bean> <bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor"> <property name="transactionManager" ref="transactionManager" /> <property name="transactionAttributes"> <props> <prop key="save">PROPAGATION_REQUIRED</prop> </props> </property> </bean> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="dataSource" ref="dataSource" /> <property name="sessionFactory" ref="sessionFactory" /> </bean> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" /> <property name="url" value="jdbc:oracle:thin:@localhost:1521:XE" /> <property name="username" value="System" /> <property name="password" value="weblogic" /> </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.MySQLDialect</prop> <prop key="hibernate.show_sql">true</prop> </props> </property> <property name="mappingResources"> <list> <value>com/Semwal/Vechile.hbm.xml</value> <value>com/Semwal/ScreenTb.hbm.xml</value> <value>com/Semwal/AccessTb.hbm.xml</value> </list> </property> </bean>
Please tell me is spring transaction configured correctly.
Thanks
Rishi Shehrawat
Ranch Hand
Posts: 218
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The configuration is not correct.
Please refer to Spring documentation
http://static.springsource.org/spring/docs/3.1.0.M2/spring-framework-reference/html/transaction.html#transaction-declarative-first-example
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
HibernateDaoSupport and Transaction
Dependency injection problem
spring transaction management only
I am getting org.springframework.orm.hibernate3.HibernateSystemException: Unknown entity:
how does rollbackFor work ?
More...