Package javax.ejb

Examples of javax.ejb.CreateException


      // Our bean has many customers, use the cmr set method here..
      Set customers = new HashSet();
      customers.add(custL);
      this.setCustomers(customers);
        } catch (RemoteException re) {
            throw new CreateException("Invalid Customer - Bad Remote Reference");
        } catch (FinderException fe) {
            throw new CreateException("Invalid Customer - Unable to Find Local Reference");
        } catch (NamingException ne) {
            throw new CreateException("Invalid Customer - Unable to find CustomerHomeLocal Reference");
        }
    }
View Full Code Here


            log.trace(">addQueueData(publisherId: " + publisherId + ")");
      }
      try {
          entityManager.persist(new org.ejbca.core.ejb.ca.publisher.PublisherQueueData(publisherId, publishType, fingerprint, queueData, publishStatus));
      } catch (Exception e) {
        throw new CreateException(e.getMessage());
      }
      log.trace("<addQueueData()");
    }
View Full Code Here

      final String issuerDN = data1.getIssuerDN();
        try {
          entityManager.persist(data1);
        } catch (Exception e) {
          // For backward compatibility. We should drop the throw entirely and rely on the return value.
          CreateException ce = new CreateException();
          ce.setStackTrace(e.getStackTrace());
          throw ce;
        }
        final String msg = intres.getLocalizedMessage("store.storecert");             
        logSession.log(admin, issuerDN.hashCode(), LogConstants.MODULE_CA, new Date(), username, incert, LogConstants.EVENT_INFO_STORECERTIFICATE, msg);
        log.trace("<storeCertificate()");
View Full Code Here

      ((ProcessDataStore)paProcessData).setMapId (processPk);
      ((ProcessDataStore)paProcessData).setNewMap ();
      return processPk;
  } catch (RemoteException ex) {
      logger.error (ex.getMessage(), ex);
      throw new CreateException(ex.getMessage());
  }
    }
View Full Code Here

      throw new EJBException(re);
  } catch (SQLException e) {
      throw new EJBException(e);
  } catch (IOException ioe) {
      logger.error (ioe.getMessage(), ioe);
      throw new CreateException (ioe.getMessage());
  }
    }
View Full Code Here

                  log.debug("Throwing MyAppException");
               throw new MyAppException(EntityExc.EXCEPTION_TEXT);
            case EntityExc.EXC_CREATEEXCEPTION:
               if (debug)
                  log.debug("Throwing CreateException");
               throw new CreateException(EntityExc.EXCEPTION_TEXT);
            case EntityExc.EXC_EJBEXCEPTION:
               if (debug)
                  log.debug("Throwing EJBException");
               wasDiscarded = true;
               throw new EJBException(EntityExc.EXCEPTION_TEXT);
View Full Code Here

      try
      {
         InitialContext ic = new InitialContext();
         Boolean failInEjbCreate = (Boolean) ic.lookup("java:comp/env/failInEjbCreate");
         if( failInEjbCreate.booleanValue() )
            throw new CreateException("Failed in ejbCreate as requested");
      }
      catch(NameNotFoundException ignore)
      {
         // Assume failInEjbCreate = false
      }
      catch(NamingException e)
      {
         throw new CreateException("Failed to access ENC, "+e.getMessage());
      }
   }
View Full Code Here

            c.close();
         }
      }
      catch (Exception e)
      {
         throw new CreateException("could not get DataSource or Connection" + e.getMessage());
      }
   }
View Full Code Here

         ps.setObject(3, customerId);
      }
      catch (Exception e)
      {
         Logger.getLogger(getClass().getName()).info("Exception in ejbCreate", e);
         throw new CreateException("Can't insert: " + e);
      } // end of try-catch
      finally
      {
         try
         {
View Full Code Here

      }
      catch (SQLException e)
      {
         log.debug("failed", e);

         throw new CreateException("Entity bean creation failure: " +
            e.getMessage());
      }

      this.key = pk;
      this.name = name;
View Full Code Here

TOP

Related Classes of javax.ejb.CreateException

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.