Package javax.resource.spi

Examples of javax.resource.spi.ApplicationServerInternalException


            next.getConnection(connectionInfo);
        } else {
            Subject oldSubject = originalManagedConnectionInfo.getSubject();
            if (currentSubject == null ? oldSubject != null : !currentSubject.equals(oldSubject)) {
                if (connectionInfo.isUnshareable()) {
                    throw new ApplicationServerInternalException("Unshareable resource is attempting to change security context: expected request under: " + oldSubject + ", received request under: " + currentSubject);
                } else {
                    //existing managed connection, wrong subject: must re-associate.
                    //make a ConnectionInfo to process removing the handle from the old mc
                    ConnectionInfo returningConnectionInfo = new ConnectionInfo();
                    returningConnectionInfo.setManagedConnectionInfo(originalManagedConnectionInfo);
View Full Code Here


                    currentTx.enlistResource(xaRes);
            }
        }
        catch(Throwable t) {
            doPrivileged(contextClassLoader(previousClassLoader));
            throw new ApplicationServerInternalException(t);
        }
    }
View Full Code Here

            next.getConnection(connectionInfo);
        } else {
            Subject oldSubject = originalManagedConnectionInfo.getSubject();
            if (currentSubject == null ? oldSubject != null : !currentSubject.equals(oldSubject)) {
                if (connectionInfo.isUnshareable()) {
                    throw new ApplicationServerInternalException("Unshareable resource is attempting to change security context: expected request under: " + oldSubject + ", received request under: " + currentSubject);
                } else {
                    //existing managed connection, wrong subject: must re-associate.
                    //make a ConnectionInfo to process removing the handle from the old mc
                    ConnectionInfo returningConnectionInfo = new ConnectionInfo();
                    returningConnectionInfo.setManagedConnectionInfo(originalManagedConnectionInfo);
View Full Code Here

                Transaction tx = getTransactionManager().getTransaction();
                if (tx != null) {
                    tx.registerSynchronization(new Synchronizer(conn.getLocalTransaction()));
                }
            } catch (SystemException se) {
                throw new ApplicationServerInternalException("Can not obtain a Transaction object from TransactionManager. " + se.getMessage(), se);
            } catch (RollbackException re) {
                throw new ApplicationServerInternalException("Can not register org.apache.openejb.resource.LocalTransacton with transaciton manager. Transaction has already been rolled back" + re.getMessage(), re);
            }

            if (connectionCache != null) {
                connectionCache.putConnection(factory, conn);
            }
View Full Code Here

                    currentTx.enlistResource(xaRes);
            }
        }
        catch(Throwable t) {
            doPrivileged(contextClassLoader(previousClassLoader));
            throw new ApplicationServerInternalException(t);
        }
    }
View Full Code Here

        // call beforeDelivery on the container
        try {
            container.beforeDelivery(deployment, instance, method, xaResource);
        } catch (SystemException se) {
            Throwable throwable = (se.getRootCause() != null) ? se.getRootCause() : se;
            throw new ApplicationServerInternalException(throwable);
        }

        // before completed successfully we are now ready to invoke bean
        state = State.BEFORE_CALLED;
    }
View Full Code Here

        } catch (SystemException se) {
            exceptionThrown = true;

            Throwable throwable = (se.getRootCause() != null) ? se.getRootCause() : se;
            throwable.printStackTrace();
            throw new ApplicationServerInternalException(throwable);
        } finally {
            if (state == State.SYSTEM_EXCEPTION) {
                recreateInstance(exceptionThrown);
            }
            // we are now in the default NONE state
View Full Code Here

      this.previousContextClassLoader = null;
      try {
        this.transactionDelegate.endTransaction();
      }
      catch (Throwable ex) {
        throw new ApplicationServerInternalException("Failed to complete transaction", ex);
      }
    }
View Full Code Here

            next.getConnection(connectionInfo);
        } else {
            Subject oldSubject = originalManagedConnectionInfo.getSubject();
            if (currentSubject == null ? oldSubject != null : !currentSubject.equals(oldSubject)) {
                if (connectionInfo.isUnshareable()) {
                    throw new ApplicationServerInternalException("Unshareable resource is attempting to change security context: expected request under: " + oldSubject + ", received request under: " + currentSubject);
                } else {
                    //existing managed connection, wrong subject: must re-associate.
                    //make a ConnectionInfo to process removing the handle from the old mc
                    ConnectionInfo returningConnectionInfo = new ConnectionInfo();
                    returningConnectionInfo.setManagedConnectionInfo(originalManagedConnectionInfo);
View Full Code Here

            next.getConnection(connectionInfo);
        } else {
            Subject oldSubject = originalManagedConnectionInfo.getSubject();
            if (currentSubject == null ? oldSubject != null : !currentSubject.equals(oldSubject)) {
                if (connectionInfo.isUnshareable()) {
                    throw new ApplicationServerInternalException("Unshareable resource is attempting to change security context: expected request under: " + oldSubject + ", received request under: " + currentSubject);
                } else {
                    //existing managed connection, wrong subject: must re-associate.
                    //make a ConnectionInfo to process removing the handle from the old mc
                    ConnectionInfo returningConnectionInfo = new ConnectionInfo();
                    returningConnectionInfo.setManagedConnectionInfo(originalManagedConnectionInfo);
View Full Code Here

TOP

Related Classes of javax.resource.spi.ApplicationServerInternalException

Copyright © 2018 www.massapicom. 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.