Package javax.resource

Examples of javax.resource.ResourceException.initCause()


        checkEnv("commit");
        try {
            env.getThreadTransaction().commit();
        } catch (DatabaseException DE) {
            ResourceException ret = new ResourceException(DE.toString());
            ret.initCause(DE);
            throw ret;
        } finally {
            env.setThreadTransaction(null);
        }
View Full Code Here


        checkEnv("rollback");
        try {
            env.getThreadTransaction().abort();
        } catch (DatabaseException DE) {
            ResourceException ret = new ResourceException(DE.toString());
            ret.initCause(DE);
            throw ret;
        } finally {
            env.setThreadTransaction(null);
        }
View Full Code Here

        try {
            return txn.getTransaction();
        } catch (DatabaseException DE) {
            ResourceException ret = new ResourceException(DE.toString());
            ret.initCause(DE);
            throw ret;
        }
    }

    public void close() {
View Full Code Here

                //System.out.println("MQRA:EC:stopMessageConsumer:closing msgConsumer");
                ///////////////msgConsumer.close();
                //System.out.println("MQRA:EC:stopMessageConsumer:closed msgConsumer...........................");
            } catch (JMSException jmse) {
                ResourceException re = new ResourceException("MQRA:EC:Error on closing MessageConsumer");
                re.initCause(jmse);
                throw re;
            }
        }
        if (xac != null) {
            try {
View Full Code Here

        if (xac != null) {
            try {
                xac.close();
            } catch (JMSException jmse) {
                ResourceException re = new ResourceException("MQRA:EC:Error closing JMS Connection");
                re.initCause(jmse);
                throw re;
            }
        }
        }
    }
View Full Code Here

                    }
                } catch (JMSException jmse) {
                    ResourceException re =
                            new ResourceException(
                            "MQRA:EC:Error on closing Direct MessageConsumer");
                    re.initCause(jmse);
                    throw re;
                }
            }
            if (this.dc != null) {
                try {
View Full Code Here

                    this.dc.close();
                } catch (JMSException jmse) {
                    ResourceException re =
                            new ResourceException(
                            "MQRA:EC:Error closing DircetConnection");
                    re.initCause(jmse);
                    throw re;
                }
            }
        }
    }
View Full Code Here

                if (connectionSpec.getWriteConcern() != null) {
                    db.setWriteConcern(connectionSpec.getWriteConcern());
                }
            } catch (Exception exception) {
                ResourceException resourceException = new ResourceException(exception.toString());
                resourceException.initCause(exception);
                throw resourceException;
            }
        }

        return new MongoConnection(db, isExternal, connectionSpec);
View Full Code Here

  try {
      env.getThreadTransaction().commit();
  } catch (DatabaseException DE) {
      ResourceException ret = new ResourceException(DE.toString());
      ret.initCause(DE);
      throw ret;
  } finally {
      env.setThreadTransaction(null);
  }
View Full Code Here

  try {
      env.getThreadTransaction().abort();
  } catch (DatabaseException DE) {
      ResourceException ret = new ResourceException(DE.toString());
      ret.initCause(DE);
      throw ret;
  } finally {
      env.setThreadTransaction(null);
  }
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.