Results 1 to 3 of 3
- 02-22-2010, 02:11 PM #1
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 :
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 ! .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 .
I thank you for your help and time ! .Lover of Freedom and Simplicity .
http://rsiddharth.wordpress.com/
- 02-22-2010, 07:15 PM #2
Senior Member
- Join Date
- Dec 2009
- Location
- Belgrade, Serbia
- Posts
- 364
- Rep Power
- 4
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!
- 02-23-2010, 02:59 PM #3
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
-
EntityManager.setFlushMode(COMMIT) Vs. Query.setFlushMode(COMMIT)
By CatchSandeepVaid in forum Enterprise JavaBeans (EJB)Replies: 0Last Post: 12-15-2009, 05:07 PM -
commit
By swati.jyoti in forum NetBeansReplies: 1Last Post: 07-24-2009, 05:33 PM -
Intercept CVS/SVN team commit
By dilipg003 in forum EclipseReplies: 2Last Post: 05-12-2009, 06:17 PM -
Catch 22: Ant prevents CVS commit
By Cold-Gin in forum EclipseReplies: 1Last Post: 04-09-2009, 10:49 PM -
Commit problem
By egc_33 in forum EclipseReplies: 0Last Post: 08-09-2008, 02:27 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks