Package org.apache.derby.impl.sql

Examples of org.apache.derby.impl.sql.GenericPreparedStatement


    Cacheable cachedItem = statementCache.find(statement);

    CachedStatement cs = (CachedStatement) cachedItem;


    GenericPreparedStatement ps = cs.getPreparedStatement();

    synchronized (ps) {
      if (ps.upToDate()) {
        GeneratedClass ac = ps.getActivationClass();

        // Check to see if the statement was prepared before some change
        // in the class loading set. If this is the case then force it to be invalid
        int currentClasses =
            getLanguageConnectionFactory().getClassFactory().getClassLoaderVersion();

        if (ac.getClassLoaderVersion() != currentClasses) {
          ps.makeInvalid(DependencyManager.INTERNAL_RECOMPILE_REQUEST, this);
        }

        // note that the PreparedStatement is not kept in the cache. This is because
        // having items kept in the cache that ultimately are held onto by
        // user code is impossible to manage. E.g. an open ResultSet would hold onto
View Full Code Here


        Cacheable cachedItem = statementCache.find(statement);

        CachedStatement cs = (CachedStatement) cachedItem;


        GenericPreparedStatement ps = cs.getPreparedStatement();

        synchronized (ps) {
            if (ps.upToDate()) {
                GeneratedClass ac = ps.getActivationClass();

                // Check to see if the statement was prepared before some change
                // in the class loading set. If this is the case then force it to be invalid
                int currentClasses =
                        getLanguageConnectionFactory().getClassFactory().getClassLoaderVersion();

                if (ac.getClassLoaderVersion() != currentClasses) {
                    ps.makeInvalid(DependencyManager.INTERNAL_RECOMPILE_REQUEST, this);
                }

                // note that the PreparedStatement is not kept in the cache. This is because
                // having items kept in the cache that ultimately are held onto by
                // user code is impossible to manage. E.g. an open ResultSet would hold onto
View Full Code Here

    if (statementCache != null) {
      final Collection values = statementCache.values();
      data = new Vector(values.size());
      for (Iterator i = values.iterator(); i.hasNext(); ) {
        final CachedStatement cs = (CachedStatement) i.next();
        final GenericPreparedStatement ps =
          (GenericPreparedStatement) cs.getPreparedStatement();
        data.add(ps);
      }
    }
  }
View Full Code Here

          double optimizerEstimatedRowCount,
          double optimizerEstimatedCost)
    throws StandardException
  {
    super(a, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost);
    final GenericPreparedStatement gp =
      (GenericPreparedStatement)a.getPreparedStatement();
    final Object[] saved = gp.getSavedObjects();

    scoci = (StaticCompiledOpenConglomInfo)saved[scociItem];
    TransactionController tc = activation.getTransactionController();
    dcoci = tc.getDynamicCompiledConglomInfo(conglomId);
        this.source = source;
View Full Code Here


        CachedItem ci = (CachedItem) e.nextElement();
        CachedStatement cs = (CachedStatement) ci.getEntry();

        GenericPreparedStatement ps = (GenericPreparedStatement) cs.getPreparedStatement();

        data.addElement(ps);
      }
    }
View Full Code Here

  /**
  */
  public Cacheable setIdentity(Object key) {

    identity = key;
    ps = new GenericPreparedStatement((GenericStatement) key);
    ps.setCacheHolder(this);

    return this;
  }
View Full Code Here

    Cacheable cachedItem = statementCache.find(statement);

    CachedStatement cs = (CachedStatement) cachedItem;


    GenericPreparedStatement ps = cs.getPreparedStatement();

    synchronized (ps) {
      if (ps.upToDate()) {
        GeneratedClass ac = ps.getActivationClass();

        // Check to see if the statement was prepared before some change
        // in the class loading set. If this is the case then force it to be invalid
        int currentClasses =
            getLanguageConnectionFactory().getClassFactory().getClassLoaderVersion();

        if (ac.getClassLoaderVersion() != currentClasses) {
          ps.makeInvalid(DependencyManager.INTERNAL_RECOMPILE_REQUEST, this);
        }

        // note that the PreparedStatement is not kept in the cache. This is because
        // having items kept in the cache that ultimately are held onto by
        // user code is impossible to manage. E.g. an open ResultSet would hold onto
View Full Code Here

    Cacheable cachedItem = statementCache.find(statement);

    CachedStatement cs = (CachedStatement) cachedItem;


    GenericPreparedStatement ps = cs.getPreparedStatement();

    synchronized (ps) {
      if (ps.upToDate()) {
        GeneratedClass ac = ps.getActivationClass();

        // Check to see if the statement was prepared before some change
        // in the class loading set. If this is the case then force it to be invalid
        int currentClasses =
            getLanguageConnectionFactory().getClassFactory().getClassLoaderVersion();

        if (ac.getClassLoaderVersion() != currentClasses) {
          ps.makeInvalid(DependencyManager.INTERNAL_RECOMPILE_REQUEST, this);
        }

        // note that the PreparedStatement is not kept in the cache. This is because
        // having items kept in the cache that ultimately are held onto by
        // user code is impossible to manage. E.g. an open ResultSet would hold onto
View Full Code Here

    Cacheable cachedItem = statementCache.find(statement);

    CachedStatement cs = (CachedStatement) cachedItem;


    GenericPreparedStatement ps = cs.getPreparedStatement();

    synchronized (ps) {
      if (ps.upToDate()) {
        GeneratedClass ac = ps.getActivationClass();

        // Check to see if the statement was prepared before some change
        // in the class loading set. If this is the case then force it to be invalid
        int currentClasses =
            getLanguageConnectionFactory().getClassFactory().getClassLoaderVersion();

        if (ac.getClassLoaderVersion() != currentClasses) {
          ps.makeInvalid(DependencyManager.INTERNAL_RECOMPILE_REQUEST, this);
        }

        // note that the PreparedStatement is not kept in the cache. This is because
        // having items kept in the cache that ultimately are held onto by
        // user code is impossible to manage. E.g. an open ResultSet would hold onto
View Full Code Here

    Cacheable cachedItem = statementCache.find(statement);

    CachedStatement cs = (CachedStatement) cachedItem;


    GenericPreparedStatement ps = cs.getPreparedStatement();

    synchronized (ps) {
      if (ps.upToDate()) {
        GeneratedClass ac = ps.getActivationClass();

        // Check to see if the statement was prepared before some change
        // in the class loading set. If this is the case then force it to be invalid
        int currentClasses =
            getLanguageConnectionFactory().getClassFactory().getClassLoaderVersion();

        if (ac.getClassLoaderVersion() != currentClasses) {
          ps.makeInvalid(DependencyManager.INTERNAL_RECOMPILE_REQUEST, this);
        }

        // note that the PreparedStatement is not kept in the cache. This is because
        // having items kept in the cache that ultimately are held onto by
        // user code is impossible to manage. E.g. an open ResultSet would hold onto
View Full Code Here

TOP

Related Classes of org.apache.derby.impl.sql.GenericPreparedStatement

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.