CreateException
194195196197198199200201202203204
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 {
214215216217218219220221222223224
} catch (SQLException e) { log.debug("failed", e); throw new CreateException("Entity bean creation failure: " + e.getMessage()); } this.key = pk; this.name = name;
196197198199200201202203204205206
ps.setString(2, name); accounts = new ArrayList(); } catch (Exception e) { throw new CreateException("Problem in ejbCreate: " + e); } // end of try-catch finally { try {
6162636465666768
throw ce; } catch(Exception e) { log.error("create failed", e); throw new CreateException(e.toString()); } }
5556575859606162
{ ds = (DataSource)new InitialContext ().lookup ("java:comp/env/datasource"); } catch (NamingException _ne) { throw new CreateException ("Datasource not found: "+_ne.getMessage ()); } }
176177178179180181182183
attributes.put("owner", "scott"); dctx.bind("view1.jpg", null, attributes); } catch(NamingException e) { throw new CreateException(e.toString(true)); } }
log.info("ejbCreate"); // Fail the first caller if( ejbCreateFailed == false ) { ejbCreateFailed = true; throw new CreateException("First ejbCreate Failure"); } }
141142143144145146147148149150151
} catch (SQLException e) { log.debug("failed", e); throw new CreateException("Entity bean creation failure: " + e.getMessage()); } this.accountNumber = pk.getKey(); this.personsName = personsName;
61626364656667
public void ejbCreate() throws CreateException { if (breakCreate) throw new CreateException("broken create"); }
8485868788899091
config.setTransactionManagerLookupClass("org.jboss.cache.JBossTransactionManagerLookup"); //cache = DefaultCacheFactory.getInstance().createCache(config); } catch (Exception e) { throw new CreateException(e.toString()); } }