Examples of initCause()


Examples of javax.ejb.EJBTransactionRolledbackException.initCause()

        // Throw javax.ejb.EJBTransactionRolledbackException to
        // client.
        EJBTransactionRolledbackException transactionException = new EJBTransactionRolledbackException(
                "System exception, The transaction has been marked for rollback only");
        transactionException.initCause(e);
        throw transactionException;
    }

    /**
     * Handle an exception and the transaction is the container transaction.
View Full Code Here

Examples of javax.ejb.FinderException.initCause()

            }
        } catch (FinderException e) {
            throw e;
        } catch (Exception e) {
            FinderException fe = new FinderException(e.getMessage());
            fe.initCause(e);
            throw fe;
        } finally {
            JDBCUtil.safeClose(rs);
            JDBCUtil.safeClose(ps);
            JDBCUtil.safeClose(con);
View Full Code Here

Examples of javax.ejb.RemoveException.initCause()

                CreateException ejbEx = new CreateException();
                ejbEx.initCause(ex);
                inv.exception = ejbEx;
            } else if( invInfo.startsWithRemove ) {
                RemoveException ejbEx = new RemoveException();
                ejbEx.initCause(ex);
                inv.exception = ejbEx;
            } else {
                EJBException ejbEx = new EJBException();
                ejbEx.initCause(ex);
                inv.exception = ejbEx;
View Full Code Here

Examples of javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException.initCause()

            Deployment deployment = factory.createDeployment(protocolUri, username, password);
            return new OpenEJBDeploymentManager(deployment);
        } catch (RuntimeException e) {
            // some DeploymentManagerFactories suppress unchecked exceptions - log and rethrow
            DeploymentManagerCreationException creationException = new DeploymentManagerCreationException("Unexpected exception while creating deployment manager");
            creationException.initCause(e);
            throw creationException;
        } catch (AssertionError e) {
            // some DeploymentManagerFactories suppress unchecked exceptions - log and rethrow
            DeploymentManagerCreationException creationException = new DeploymentManagerCreationException("Assertion error while creating deployment manager");
            creationException.initCause(e);
View Full Code Here

Examples of javax.enterprise.deploy.spi.exceptions.InvalidModuleException.initCause()

            SunDeploymentConfiguration deploymentConfiguration = new SunDeploymentConfiguration(dObj);
            deploymentConfiguration.setDeploymentManager(this);
            return deploymentConfiguration;
        } catch(ConfigurationException e) {
            InvalidModuleException ime = new InvalidModuleException(e.getMessage());
            ime.initCause(e);
            throw ime;
        }
    }

View Full Code Here

Examples of javax.enterprise.deploy.spi.exceptions.TargetException.initCause()

         return targetModuleIDs;
      }
      catch (Exception e)
      {
         TargetException tex = new TargetException("Failed to get available modules");
         tex.initCause(e);
         throw tex;
      }
   }

   private void convertChildren(TargetModuleIDImpl parent, SerializableTargetModuleID parentID)
View Full Code Here

Examples of javax.imageio.metadata.IIOInvalidTreeException.initCause()

                data = (byte []) iioNode.getUserObject();
            } catch (Exception e) {
                IIOInvalidTreeException newGuy =
                    new IIOInvalidTreeException
                    ("Can't get User Object", node);
                newGuy.initCause(e);
                throw newGuy;
            }
        } else {
            throw new IIOInvalidTreeException
                ("Node must have User Object", node);
View Full Code Here

Examples of javax.jbi.JBIException.initCause()

      mLogger.severe( mStringTranslator.getString("SBC_ERROR_DETAILS") );
            JBIException jbiException =
                    new JBIException(
                       mStringTranslator.getString(
                                     "SBC_NORMALIZE_FAULT_MESSAGE_FAILURE") );
            jbiException.initCause(soapException);
            throw jbiException;
        }
    }

View Full Code Here

Examples of javax.jcr.RepositoryException.initCause()

        Throwable cause = getCause();
        if (cause instanceof RepositoryException) {
            RepositoryException e;
            try {
                e = (RepositoryException) cause.getClass().getConstructor().newInstance();
                e.initCause(this);
            }
            catch (Exception ex) {
                e = (RepositoryException) cause;
            }
View Full Code Here

Examples of javax.jms.IllegalStateException.initCause()

            ((JTATransactionChecker) cm).checkTransactionActive();
      }
      catch (Exception e)
      {
         IllegalStateException ex = new IllegalStateException("Transaction not active");
         ex.initCause(e);
         ex.setLinkedException(e);
         throw ex;
      }
   }
}
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.