Package javax.ejb

Examples of javax.ejb.CreateException


         ps.setString(2, name);
         accounts = new ArrayList();
      }
      catch (Exception e)
      {
         throw new CreateException("Problem in ejbCreate: " + e);
      } // end of try-catch
      finally
      {
         try
         {
View Full Code Here


         throw ce;
      }
      catch(Exception e)
      {
         log.error("create failed", e);
         throw new CreateException(e.toString());
      }
   }
View Full Code Here

      {
         ds = (DataSource)new InitialContext ().lookup ("java:comp/env/datasource");
      }
      catch (NamingException _ne)
      {
         throw new CreateException ("Datasource not found: "+_ne.getMessage ());
      }
   }
View Full Code Here

            attributes.put("owner", "scott");
            dctx.bind("view1.jpg", null, attributes);
        }
        catch(NamingException e)
        {
            throw new CreateException(e.toString(true));
        }
    }
View Full Code Here

      log.info("ejbCreate");
      // Fail the first caller
      if( ejbCreateFailed == false )
      {
         ejbCreateFailed = true;
         throw new CreateException("First ejbCreate Failure");
      }
   }
View Full Code Here

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

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

      this.accountNumber = pk.getKey();
      this.personsName = personsName;
View Full Code Here

  
   public void ejbCreate()
         throws CreateException
   {
      if (breakCreate)
         throw new CreateException("broken create");
   }
View Full Code Here

         config.setTransactionManagerLookupClass("org.jboss.cache.JBossTransactionManagerLookup");
        
         //cache = DefaultCacheFactory.getInstance().createCache(config);
        
      } catch (Exception e) {
         throw new CreateException(e.toString());
      }
   }
View Full Code Here

   {
      try {
         cacheService = new ObjectName(name);
         server = MBeanServerLocator.locate();
      } catch (Exception ex) {
         throw new CreateException(ex.toString());
      }
   }
View Full Code Here

         log.info(msg);
      }
      catch(Exception e)
      {
         log.error("Failed to create EntityPK", e);
         throw new CreateException("Failed to create EntityPK: "+e.getMessage());
      }
      return msg;
   }
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.