Package javax.resource.spi

Examples of javax.resource.spi.IllegalStateException


        }
    }
 
    public String getUserName() throws ResourceException {
        if (mc.isDestroyed()) {
            throw new IllegalStateException
                ("ManagedConnection has been destroyed");
        }
       
        return mc.getPasswordCredential() == null
            ? null
View Full Code Here


        throws ResourceException {
       
        try {
            checkIfValid();
        } catch (ResourceException ex) {
            throw new IllegalStateException("Connection is invalid");
        }
        // dissociate handle with current managed connection
        mc.removeCciConnection(this);
        // associate handle with new managed connection
        newMc.addCciConnection(this);
View Full Code Here

        mc = null;
    }

    private void checkIfDestroyed() throws ResourceException {
        if (destroyed) {
            throw new IllegalStateException("Managed connection is closed");
        }
    }
View Full Code Here

        checkIfDestroyed();
        if (connection instanceof CciConnection) {
            CciConnection cciCon = (CciConnection) connection;
            cciCon.associateConnection(this);
        } else {
            throw new IllegalStateException("Invalid connection object: " +
                                            connection);
        }
    }
View Full Code Here

        connectionSet.add(cciCon);
    }

    private void checkIfDestroyed() throws ResourceException {
        if (destroyed) {
            throw new IllegalStateException("Managed connection is closed");
        }
    }
View Full Code Here

        // TODO
        // cnx.sessions.add((org.objectweb.joram.client.jms.Session) session);
      } else if (! (session instanceof javax.jms.XASession)) {
          if (out != null)
              out.print("Managed connection not involved in a local transaction.");
        throw new IllegalStateException("Managed connection not involved "
                                        + "in a local transaction.");
      }


      if (AdapterTracing.dbgAdapter.isLoggable(BasicLevel.DEBUG))
View Full Code Here

      if (session == null)
        session = cnx.createSession(true, 0);
      else if (session instanceof javax.jms.XASession) {
          if (out != null)
              out.print("Managed connection already involved in a distributed transaction.");
        throw new IllegalStateException("Managed connection already involved "
                                        + "in a distributed transaction.");
      }

      return this;
    }
View Full Code Here

        throws ResourceException {
       
        try {
            checkIfValid();
        } catch (SQLException ex) {
            throw new IllegalStateException("Connection is invalid");
        }
        // dissociate handle with current managed connection
        mc.removeJdbcConnection(this);
        // associate handle with new managed connection
        newMc.addJdbcConnection(this);
View Full Code Here

  {
    if (AdapterTracing.dbgAdapter.isLoggable(BasicLevel.DEBUG))
      AdapterTracing.dbgAdapter.log(BasicLevel.DEBUG, this + " setResourceAdapter(" + ra + ")");

    if (this.ra != null)
      throw new IllegalStateException("Can not change resource adapter"
                                      + " association.");

    if (! (ra instanceof JoramAdapter))
      throw new ResourceException("Provided resource adapter is not a JORAM "
                                  + "resource adapter: "
View Full Code Here

        checkIfDestroyed();
        if (connection instanceof JdbcConnection) {
            JdbcConnection jdbcCon = (JdbcConnection) connection;
            jdbcCon.associateConnection(this);
        } else {
            throw new IllegalStateException("Invalid connection object: " +
                                            connection);
        }
    }
View Full Code Here

TOP

Related Classes of javax.resource.spi.IllegalStateException

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.