• 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

transaction management with JdbcTemplate and <tx:advice>

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic