示例#1
0
 public void insert(GlbRoleDao attrs) throws RemoteException, DupKeyException {
   try {
     this.attrs = attrs;
     dao.create(this.attrs);
     dao.update(this.attrs);
   } catch (DupKeyException dkex) {
     throw dkex;
   } catch (Exception ex) {
     ex.toString();
   }
 }
 public void insert(EnvAspOtherMatrixMethodDao attrs) throws DupKeyException, UserException {
   try {
     this.attrs = attrs;
     dao.create(this.attrs);
     dao.update(this.attrs);
   } catch (DupKeyException 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);
   }
 }