Results 1 to 4 of 4

Thread: Spring Framework Saving Data to Multiple Tables

  1. #1

    Default Spring Framework Saving Data to Multiple Tables

    I'm working on a Spring MVC app and their JDBC api for data access. How would I go about saving data to multiple tables? The insertion needs to be such that if there's an error or something goes wrong, nothing gets inserted and rolled-back. Would this be Spring's transaction support? If so, the official documentation for transaction support is very confusing to me. Does anyone have a good source for learning how to do that?

    I'm using Spring 3.1, Oracle 11g, and Tomcat 6.0

  2. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,806

    Default

    Hello

    Wondered when you said that Spring Core documentation is not clear with Transactions.

    Try to research in google some examples, or buy some books.

    How would I go about saving data to multiple tables?
    You should have one business class that wraps other business class and these must have its data access object, then if somebody fails all must roll back I mean

    MasterBo
    • XBo ---> XDao ----> X Table in DB
    • YBo ---> YDao ----> Y Table in DB
    • ZBo ---> ZDao ----> Z Table in DB



    HTH
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  3. #3

    Default

    Hi dr_pompeii,

    The problem I'm having is that I don't fully understand and I don't see good examples for using JDBCTemplate with transactions. Do you have any good blogs, articles, etc. with solid examples for using transaction managers? Please let me know.

    Thanks.

  4. #4
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,806

    Default

    Hello Robert

    The problem I'm having is that I don't fully understand and I don't see good examples for using JDBCTemplate with transactions.
    OK, I understand

    Do you have any good blogs, articles, etc. with solid examples for using transaction managers? Please let me know.
    An excellent book for JdbcTemplate + Transaction is Spring Recipes 2nd Edition

    HTH
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •