Package javax.ejb

Examples of javax.ejb.CreateException.initCause()


                RemoveException ejbEx = new RemoveException();
                ejbEx.initCause(ex);
                inv.exception = ejbEx;
            } else {
                EJBException ejbEx = new EJBException();
                ejbEx.initCause(ex);
                inv.exception = ejbEx;
            }

            return;
        }
View Full Code Here


/* 334 */         throw new CreateException("Integrity constraint violation. Possibly unique key violation or invalid foreign key value.");
/*     */       }
/*     */
/* 340 */       this.log.error("Could not create entity", e);
/* 341 */       CreateException ce = new CreateException("Could not create entity: " + e);
/* 342 */       ce.initCause(e);
/* 343 */       throw ce;
/*     */     }
/*     */     finally
/*     */     {
/* 348 */       JDBCUtil.safeClose(ps);
View Full Code Here

            timer = new TimerState (timerId, containerId, applicationId, ownerId,
                    timedObjectPrimaryKey, initialExpiration,
                    intervalDuration, schedule, timerConfig.getInfo());
        } catch(IOException ioe) {
            CreateException ce = new CreateException();
            ce.initCause(ioe);
            throw ce;
        }

        if( logger.isLoggable(Level.FINE) ) {
            logger.log(Level.FINE, "TimerBean.createTimer() ::timerId=" +
View Full Code Here

        try {
            getEJBTimerService().addTimerSynchronization(context_,
                    timerId, initialExpiration, containerId, ownerId);
        } catch(Exception e) {
            CreateException ce = new CreateException();
            ce.initCause(e);
            throw ce;
        }

        em.persist(timer);
        return timer;
View Full Code Here

            }
            _logger.log(Level.SEVERE, t.getClass().getName(), t);

            CreateException ce = new CreateException(
                    "Could not create Message-Driven EJB");
            ce.initCause(t);
            throw ce;

        } finally {
            if (originalClassLoader != null) {
                Utility.setContextClassLoader(originalClassLoader);
View Full Code Here

                ejbInv.exception = th;
            }
            singletonInitializationFailed = true;
            CreateException creEx = new CreateException("Initialization failed for Singleton " +
                                    ejbDescriptor.getName());
            creEx.initCause(th);
            throw creEx;
        } finally {
            initializationInProgress = false;
            if (ejbInv != null) {
                try {
View Full Code Here

                    } else {
                        ejbInv.exception = pie;
                        singletonInitializationFailed = true;
                        CreateException creEx = new CreateException("Initialization failed for Singleton " +
                                        ejbDescriptor.getName());
                        creEx.initCause(pie);
                        throw creEx;
                    }
                }
            }
        }
View Full Code Here

            if (ex instanceof EJBException)
                throw (EJBException) ex;
            else {
                CreateException ce =
                        new CreateException("ERROR creating stateful SessionBean");
                ce.initCause(ex);
                throw ce;
            }
        }
    }
View Full Code Here

            if (ex instanceof EJBException)
                throw (EJBException) ex;
            else {
                CreateException ce =
                        new CreateException("ERROR creating stateful SessionBean");
                ce.initCause(ex);
                throw ce;
            }
        }
    }
View Full Code Here

            if (ex instanceof EJBException)
                throw (EJBException) ex;
            else {
                CreateException ce =
                        new CreateException("ERROR creating stateful SessionBean");
                ce.initCause(ex);
                throw ce;
            }
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.