"I am very much confused with transaction at service/application layer and transaction at DAO layer."
-- While understanding transactions, you need to understand what is a resource manager? types of transactions --> RMLT, Global transaction, Sessions, Unit of Work (specifically what is the difference between transactional Unit of Work, Hibernate Unit of Work, etc.,), transaction demarcation mechanisms.
"My question is What is the purpose of a transaction at a service layer? "
-- Because you service can be spread across multiple Resource Managers (Database being one!!)
My quick suggestion is to read a nice book. Especially the sections related to transactions in EJB, Hibernate.
Further if you are interested, you can read about spring transaction.
"my question is in this scenario what is the purpose of starting a transaction in session bean when we use hibernate transaction. "
-- Read about RMLT, CMT, BMT. Googling would give you some nice documents.
If you are not laughing at yourself, then you just didn't get the joke.
posted 8 years ago
You can't expect to wield supreme executive power just because
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop