Package javax.ejb

Examples of javax.ejb.EJBException


          }
        }
      }
    } catch (Exception e) {
      logger.error("[sendPTEmail]["+dataSource+"] Exception thrown.", e);
      throw new EJBException(e);
    }
    return errorMessage;
  }
View Full Code Here


      this.sortOrder = sortOrder;
      this.sortOrderSequence = sortOrderSequence;
      return new ReportContentPK(this.reportContentId, ds);
  } catch(Exception e) {
    System.out.println("[Exception][ReportContentEJB.ejbCreate] Exception Thrown: "+e);
    throw new EJBException(e);
  } finally {
    dataAccessLayer.destroy();
    dataAccessLayer = null;
  }
}
View Full Code Here

        throw new ObjectNotFoundException("Primary key does not exist");
      }
      return pk;
    }
    catch(SQLException e) {
      throw new EJBException("Error executing SQL SELECT reportcontentid FROM reportcontent WHERE reportcontentid = ?: " + e.toString());
    }
    finally {
      if (resultSet != null) {
        try { resultSet.close(); }
        catch (SQLException e) {
View Full Code Here

      this.sortOrder = resultSet.getString(5);
      this.sortOrderSequence = new Byte(resultSet.getByte(6));
      isModified = false;
    }
    catch(SQLException e) {
      throw new EJBException("Error executing SQL SELECT reportid, fieldid, sequencenumber, sortorder, sortordersequence FROM reportcontent WHERE reportcontentid = ?: " + e.toString());
    }
    finally {
      if (resultSet != null) {
        try { resultSet.close(); }
        catch (SQLException e) {
View Full Code Here

        int reportContentId = resultSet.getInt(1);
        keys.addElement(new ReportContentPK(reportContentId,ds));
      }
    }
    catch(SQLException e) {
      throw new EJBException("SELECT reporticontentid FROM reportcontent WHERE reportid = "+reportId+": " + e.toString());
    }
    finally {
      if (resultSet != null) {
        try { resultSet.close(); }
        catch (SQLException e) {
View Full Code Here

  {
    if (systemEmailID <= 0)
    {
      // if the systemEmailID is not a positive, non-zero integer,
      // then something is wrong, so throw an exception
      throw new EJBException("System Email ID is required");
    }

    CVDal dbConn = new CVDal(this.dataSource);
    HashMap emailInfoMap = new HashMap();

    try
    {
      dbConn.setSql("system.email.getSystemEmailInfo");
      dbConn.setInt(1, systemEmailID);
      Collection sqlResults = dbConn.executeQuery();

      if (sqlResults != null)
      {
        Iterator iter = sqlResults.iterator();
        while (iter.hasNext())
        {
          emailInfoMap = (HashMap)iter.next();
          break;
        }
      }
    }catch(Exception e){
      System.out.println("[Exception][EmailHelperEJB] Exception thrown in getSystemEmailInfo(): " + e);
      e.printStackTrace();    // TODO: remove this stacktrace
      throw new EJBException("Error while retrieving system email information from the database.");
    }finally{
      dbConn.clearParameters();
      dbConn.destroy();
      dbConn = null;
    }
View Full Code Here

      remote.setDataSource(this.dataSource);
      status = remote.deleteRule( userid , elementid );
    }
    catch(CreateException ce)
    {
      throw new EJBException(ce);
    }catch(NamingException ce)
    {
      throw new EJBException(ce);
    }
    return status;
  }
View Full Code Here

        mailmessage = remote.deleteEmailAccount(userId , AccountID );

      }
    catch(CreateException ce)
    {
      throw new EJBException(ce);
    }catch(NamingException ce)
    {
      throw new EJBException(ce);
    }
    return mailmessage;

  }
View Full Code Here

        local.setDataSource(this.dataSource);
        result = local.deleteRule(preference);
      }
    catch(CreateException ce)
    {
      throw new EJBException(ce);
    }catch(NamingException ce)
    {
      throw new EJBException(ce);
    }
      return result;
  }
View Full Code Here

      list = getValueListMethod.invoke(ejb, getValueListArg);
    }catch(Exception e){
      // Catch all these and just rethrow something, since there is
      // no way to recover from any of these things gracefully.
      logger.error("[getEJBValueList] Exception trying to call: "+getValueListMethodName+" from EJB with JNDI name: "+jndiName, e);
      throw new EJBException(e);
    }
    return (ValueListVO)list;
  }
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.