Package javax.ejb

Examples of javax.ejb.EJBException.initCause()


                if (isSystemUncheckedException(cause)) {
                    EJBException ejbEx = new EJBException(
                            "message-driven bean method " + invocation.method
                                    + " system exception");
                    ejbEx.initCause(cause);
                    cause = ejbEx;
                }
                throw cause;
            } catch (Throwable t) {
                EJBException ejbEx = new EJBException(
View Full Code Here


                }
                throw cause;
            } catch (Throwable t) {
                EJBException ejbEx = new EJBException(
                        "message-bean container dispatch error");
                ejbEx.initCause(t);
                invocation.exception = ejbEx;
                throw ejbEx;
            } finally {
                /*
                 * FIXME if ( AppVerification.doInstrument() ) {
View Full Code Here

                        "containers.mdb.invocation_exception", new Object[] {
                                appEJBName_, invocation.exception.toString() });
                _logger.log(Level.SEVERE, invocation.exception.getClass()
                        .getName(), invocation.exception);
                EJBException ejbEx = new EJBException();
                ejbEx.initCause(invocation.exception);
                throw ejbEx;
            }
        }

        return result;
View Full Code Here

            timerCache_.removeTimer(timerId);
            if( e instanceof CreateException ) {
                throw ((CreateException)e);
            } else {
                EJBException ejbEx = new EJBException();
                ejbEx.initCause(e);
                throw ejbEx;
            }
        }
    }
View Full Code Here

            return context;
        } catch (Exception ex) {
            throw ex;
        } catch (Throwable t) {
            EJBException ejbEx = new EJBException();
            ejbEx.initCause(t);
            throw ejbEx;
        } finally {
            if (ejbInv != null) {
                invocationManager.postInvoke(ejbInv);
            }
View Full Code Here

                        } catch (Throwable th) {
                            EJBException ejbEx = new EJBException
                                    ("Couldn't create EntityManager for"
                                            + " refName: " + refDesc.getName()
                                            + "; unitname: " + unitName);
                            ejbEx.initCause(th);
                            throw ejbEx;
                        }
                    }

                    String emRefName = refDesc.getName();
View Full Code Here

            // PostConstruct must be called after state set to something
                // other than CREATED
            inTx = callLifecycleCallbackInTxIfUsed(ejbInv, context, postConstructInvInfo, CallbackType.POST_CONSTRUCT);
        } catch (Throwable t) {
            EJBException ejbEx = new EJBException();
            ejbEx.initCause(t);
            throw ejbEx;
        } finally {
            if (ejbInv != null) {
                try {
                    invocationManager.postInvoke(ejbInv);
View Full Code Here

                throw (RuntimeException) ejbInv.exception;
            } else if (ejbInv.exception instanceof Exception) {
                throw new EJBException((Exception) ejbInv.exception);
            } else {
                EJBException ejbEx = new EJBException();
                ejbEx.initCause(ejbInv.exception);
                throw ejbEx;
            }
        }
    }
View Full Code Here

        try {
            localObjImpl = instantiateEJBLocalObjectImpl(sessionKey);
        } catch (Exception ex) {
            EJBException ejbEx = new EJBException();
            ejbEx.initCause(ex);
            throw ejbEx;
        }

        return localObjImpl;
    }
View Full Code Here

            localBusinessObjImpl.setKey(sessionKey);

        } catch (Exception ex) {
            EJBException ejbEx = new EJBException();
            ejbEx.initCause(ex);
            throw ejbEx;
        }

        return localBusinessObjImpl;
    }
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.