April 05
Prof. Ismael H. F. Santos -  ismael@tecgraf.puc-rio.br                                                          2
Non-IoC Service Object
npublic class OrderServiceImpl implements IOrderService {
npublic Order saveOrder(Order order) throws OrderException{
n try{
n // 1. Create a Session/Connection object
n // 2. Start a transaction
n // 3. Lookup and invoke one of the methods in a
n  // DAO and pass the Session/Connection object.
n // 4. Commit transaction
n }catch(Exception e){
n // handle e, rollback transaction, //cleanup, // throw e
n }finally{
n //Release resources and handle more exceptions
n }
n}
n