示例#1
0
 public Collection listAll() throws RemoteException {
   try {
     return dao.listAll();
   } catch (Exception ex) {
     throw new RemoteException(ex.toString());
   }
 }
 public Collection listAll() throws RowNotFoundException, UserException {
   try {
     return dao.listAll();
   } catch (RowNotFoundException ex) {
     ctx.setRollbackOnly();
     throw ex;
   } catch (NamingException ex) {
     ctx.setRollbackOnly();
     throw new UserException("Erro no servidor de nomes.", ex);
   } catch (SQLException ex) {
     ctx.setRollbackOnly();
     throw new UserException("Erro no SQL !", ex);
   }
 }