Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

transaction management with JdbcTemplate and <tx:advice>

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

I am trying to do transaction management with Spring AOP. I am using JdbcTemplate with <tx:advice>. I don't know if this is possible to manage transaction using aforementioned element, if yes then please help me as I am getting error.

Also wanted to know if this is right way to handle transaction? Asking because I think jdbcTemplate already commits transaction when it call update method then throwing exception would do nothing.

Java class: ( There is no interface used here, so container would use CGLIB for creating proxy. )


Error I am getting

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdbcDaoSpringImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.spirngjdbc.practice.dao.JdbcDaoSpringImpl.setDataSource(javax.sql.DataSource); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [SpringJdbc.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting '(' at character position 14
execution(* * org.spirngjdbc.practice.*.*(..))



Thanks
sinmao
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic