Results 1 to 3 of 3
  1. #1
    rsiddharth's Avatar
    rsiddharth is offline Member
    Join Date
    Feb 2010
    Location
    In Front of My Machine
    Posts
    13
    Rep Power
    0

    Question Dynamic Proxies-Transaction-Commit-Rollback

    I was reading about Dynamic Proxies from Bruce Eckel's 'Thinking in Java' . At the end of this very topic he gave me a 'Project' and it read like this :

    Project : Write a system using dynamic proxies to implement transactions , where the proxy performs a commit if the proxied call is successful (doesn't throw any exceptions ) and a rollback if it fails . Your commit and rollback should work on an external text file , which is outside the control of Java exceptions . You will have to pay attention to the atomicity of operations .
    what Bruce Eckel is asking me to do is above my head . Can any one here help me in making me understand the 'question' . What is transactions,rollback,and commit ? , What is the connection between these (transactions,rollback,and commit) and Dynamic Proxy . Boy I am desperate ! .

    I thank you for your help and time ! .
    Lover of Freedom and Simplicity .
    http://rsiddharth.wordpress.com/

  2. #2
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    368
    Rep Power
    5

    Default

    This is about Database Connection and Transaction Management.

    If you have no experience with Transactions in your SQL do read this for start
    it is very important issue.


    Using Transactions (The Java™ Tutorials > JDBC(TM) Database Access > JDBC Basics)

    Run some examples with Transactions to clear up concepts,
    and pay attention on Exception handling with commit() and rollback()


    AFTER that I recommend reading this :

    Java Dynamic Proxies: One Step from Aspect-oriented Programming

    Find Transaction Proxies in this article.

    Point is to separate Transaction operations like setAutoCommit(false),
    commit() and rollback()
    and NOT put them in "Real Object" but IN Proxy instead.

    Now if you choose to use Transactions in your application,
    you will use Proxy and if not you will just use your Real Object in runtime,
    because everything related to Transactions is removed from Real object to Proxy and encapsulated there.

    cheers!

  3. #3
    rsiddharth's Avatar
    rsiddharth is offline Member
    Join Date
    Feb 2010
    Location
    In Front of My Machine
    Posts
    13
    Rep Power
    0

    Default

    Thanks for your help FON ! . I will read through the links that you gave me and if I have any problems in taking things forward , I will come back to this thread .
    Lover of Freedom and Simplicity .
    http://rsiddharth.wordpress.com/

Similar Threads

  1. EntityManager.setFlushMode(COMMIT) Vs. Query.setFlushMode(COMMIT)
    By CatchSandeepVaid in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 12-15-2009, 05:07 PM
  2. commit
    By swati.jyoti in forum NetBeans
    Replies: 1
    Last Post: 07-24-2009, 05:33 PM
  3. Intercept CVS/SVN team commit
    By dilipg003 in forum Eclipse
    Replies: 2
    Last Post: 05-12-2009, 06:17 PM
  4. Catch 22: Ant prevents CVS commit
    By Cold-Gin in forum Eclipse
    Replies: 1
    Last Post: 04-09-2009, 10:49 PM
  5. Commit problem
    By egc_33 in forum Eclipse
    Replies: 0
    Last Post: 08-09-2008, 02:27 PM

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
  •