> How can implement transcation in JDBC
In future JDBC questions should be posted into the JDBC forum.
You do not implement transactions in JDBC. They are implemented by the driver and database.
I suspect this is not the answer you are looking for largely because I also suspect your's is not the question you meant to ask. Perhaps you could try again with a little more information about what you are doing and where exactly you are stuck/troubled?