Package javax.ejb

Examples of javax.ejb.EJBException


      if (!resultSet.next()) {
        throw new ObjectNotFoundException("Cannot Find report: "+pk.toString());
      }
      return pk;
    } catch (SQLException e) {
      throw new EJBException("Error executing SQL SELECT reportid FROM report WHERE reportid = ?: " + e.toString());
    } finally {
      if (resultSet != null) {
        try {
          resultSet.close();
        } catch (SQLException e) {
View Full Code Here


      this.reportTypeId = resultSet.getInt(9);
      this.dateFrom = resultSet.getDate(10);
      this.dateTo = resultSet.getDate(11);
      isModified = false;
    } catch (SQLException e) {
      throw new EJBException("Error executing SQL SELECT moduleid, name, description, createdby, createdon, modifiedby, modifiedon, reportURL, reporttypeid, datefrom, dateto FROM report WHERE reportid = ?: " + e.toString());
    } finally {
      if (resultSet != null) {
        try {
          resultSet.close();
        } catch (SQLException e) {
View Full Code Here

    throws EJBException
  {

    if (messageId == 0)
    {
      throw new EJBException("UpdateHeader: Message ID not specified");
    } //end of if statement (messageId == 0)

    if (headerName == null || headerName.length() == 0)
    {
      throw new EJBException("UpdateHeader: Header Name is required");
    } //end of if statement (headerName == null || headerName.length() == 0)

    if (headerValue == null || headerValue.length() == 0)
    {
      throw new EJBException("UpdateHeader: Header Value is required");
    } //end of if statement (headerValue == null || headerValue.length() == 0)

    CVDal dl  = new CVDal(dataSource);
    try
    {
      dl.setSql("email.getheader");
      dl.setInt(1, messageId);
      Collection col    = dl.executeQuery();

      if (col == null)
      {
        throw new EJBException("UpdateHeader: Message Not found");
      } //end of if statement (col == null)

      Iterator it       = col.iterator();

      if (!it.hasNext())
      {
        throw new EJBException("UpdateHeader: Message Not found");
      } //end of if statement (!it.hasNext())

      HashMap hm        = (HashMap) it.next();
      String allHeader  = (String) hm.get("Headers");


      int hi            = allHeader.indexOf(headerName);
      if (hi < 0)
      {
        throw new EJBException("UpdateHeader: HEader not found");
      } //end of if statement (hi < 0)

      int hd            = allHeader.indexOf(Constants.EH_HEADER_DELIMETER, hi);
      String orgHeader  = allHeader.substring(hi, hd);
      String newHeader  = headerName + Constants.EH_KEYVALUE_DELEMETER + headerValue;
View Full Code Here

      OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
      OpportunityLocal local = home.create();
      local.setDataSource(this.dataSource);
      result = local.deleteOpportunity(userid, elementid);
    } catch (CreateException ce) {
      throw new EJBException(ce);
    } catch (NamingException re) {
      throw new EJBException(re);
    }
    return result;
  }
View Full Code Here

      ProposalHome home = (ProposalHome)ic.lookup("local/Proposal");
      ProposalLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      remote.deleteProposal(individualID, proposalID);
    } catch (CreateException ce) {
      throw new EJBException(ce);
    } catch (NamingException re) {
      throw new EJBException(re);
    }
    return true;
  }
View Full Code Here

          }
        }
      }
    } catch (Exception e) {
      logger.error("[getTaskList]: Exception", e);
      throw new EJBException(e);
    } finally {
      cvdal.destroy();
    }
    return opportunityList;
  }
View Full Code Here

      historyInfo.put("individualID", new Integer(individualID));
      historyInfo.put("referenceActivityID", new Integer(0));
      historyInfo.put("recordName", ev.getName());
      CVUtility.addHistoryRecord(historyInfo , this.dataSource);
    }catch(CreateException ce){
      throw new EJBException(ce);
    }catch(NamingException re){
      throw new EJBException(re);
    }catch(FinderException fe){
      System.out.println("[Exception][ContactFacadeEJB.deleteEntity] Exception Thrown: "+fe);
    }catch(RemoveException fe){
      throw new EJBException(fe);
    }catch(NotSupportedException nse){
      throw new EJBException(nse);
    }catch(RollbackException rbe){
      //TODO we shouldn't do like this Since we aren't parsing the record information.
      // Its a time being hack.
      throw new AuthorizationFailedException("Entity - deleteEntity");
    }catch(SystemException se){
      throw new EJBException(se);
    }catch(HeuristicMixedException hme){
      //TODO we shouldn't do like this Since we aren't parsing the record information.
      // Its a time being hack.
      throw new AuthorizationFailedException("Entity - deleteEntity");
    }catch(HeuristicRollbackException hre){
View Full Code Here

        } catch (RollbackException rbe){
          //TODO we shouldn't do like this Since we aren't parsing the record information.
          // Its a time being hack.
          throw new AuthorizationFailedException("Individual - deleteIndividual");
        } catch (SystemException se){
          throw new EJBException(se);
        } catch (HeuristicMixedException hme){
          throw new EJBException(hme);
        } catch (HeuristicRollbackException hre){
          //TODO we shouldn't do like this Since we aren't parsing the record information.
          // Its a time being hack.
          throw new AuthorizationFailedException("Individual - deleteIndividual");
        }
        throw new UserLoginAssociationException();
      }
      throw new RemoveException();
    }catch(RollbackException rbe){
      //TODO we shouldn't do like this Since we aren't parsing the record information.
      // Its a time being hack.
      throw new AuthorizationFailedException("Individual - deleteIndividual");
    }catch(SystemException se){
      throw new EJBException(se);
    }catch(HeuristicMixedException hme){
      throw new EJBException(hme);
    }catch(HeuristicRollbackException hre){
      //TODO we shouldn't do like this Since we aren't parsing the record information.
      // Its a time being hack.
      throw new AuthorizationFailedException("Individual - deleteIndividual");
    }catch(NotSupportedException nse){
      throw new EJBException(nse);
    }catch(CreateException ce){
      //TODO we shouldn't do like this Since we aren't parsing the record information.
      // Its a time being hack.
      throw new AuthorizationFailedException("Individual - deleteIndividual");
    }
View Full Code Here

      ContactHelperLocal remote =  home.create();
      remote.setDataSource(this.dataSource);
      remote.deleteAddress(addressId,  contactId,  userId,true);
      remote.updateModified("address", contactId, userId, addressId);
    }catch(NamingException re){
      throw new EJBException(re);
    }catch(CreateException ce){
      throw new EJBException(ce);
    }
  }   // end deleteAddress() method
View Full Code Here

      InitialContext ic = CVUtility.getInitialContext();
      SourceLocalHome home = (SourceLocalHome)ic.lookup("local/Source");
      SourceLocal remote =  home.findByPrimaryKey(new SourcePK(sourceId,this.dataSource));
      remote.remove();
    }catch(NamingException re){
      throw new EJBException(re);
    }catch(FinderException fe){
      System.out.println("[Exception][ContactFacadeEJB.deleteSource] Exception Thrown: "+fe);
    }catch(RemoveException fe){
      throw new EJBException(fe);
    }
  }   // end deleteSource() method
View Full Code Here

TOP

Related Classes of javax.ejb.EJBException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.