Results 1 to 3 of 3
- 02-22-2010, 03:11 PM #1
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 .
I thank you for your help and time ! .Lover of Freedom and Simplicity .
- 02-22-2010, 08:15 PM #2Senior Member
- Join Date
- Dec 2009
- Belgrade, Serbia
- Rep Power
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.
- 02-23-2010, 03: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 .
- By CatchSandeepVaid in forum Enterprise JavaBeans (EJB)Replies: 0Last Post: 12-15-2009, 06:07 PM
- By swati.jyoti in forum NetBeansReplies: 1Last Post: 07-24-2009, 05:33 PM
- By dilipg003 in forum EclipseReplies: 2Last Post: 05-12-2009, 06:17 PM
- By Cold-Gin in forum EclipseReplies: 1Last Post: 04-09-2009, 10:49 PM
- By egc_33 in forum EclipseReplies: 0Last Post: 08-09-2008, 02:27 PM