The business operation of moving data can be coded in a stateless Session
EJB. A method signature for this operation might be:
Container Managed Transaction attributes can then be applied to the method above.
The private methods that help implement the business operation are not exposed to client objects. Hence, there is no need to apply CMT attributes to these methods.
The code in the Session EJB should use a Data Access Object for database operations (if not using Entity EJB). Raw
JDBC code or Hibernate code goes in the DAO implmentation class, not the Session EJB method.
[ October 14, 2008: Message edited by: James Clark ]