Package com.mchange.v2.util

Examples of com.mchange.v2.util.DoubleWeakHashMap$UserEntrySet


                    AbstractPoolBackedDataSource apbds = ((AbstractPoolBackedDataSource) pds);
                    apbds.setFactoryClassLocation( val );
                    ConnectionPoolDataSource checkDs1 = apbds.getConnectionPoolDataSource();
                    if (checkDs1 instanceof WrapperConnectionPoolDataSource)
                    {
                        WrapperConnectionPoolDataSource wcheckDs1 = (WrapperConnectionPoolDataSource) checkDs1;
                        wcheckDs1.setFactoryClassLocation( val );
                        DataSource checkDs2 = wcheckDs1.getNestedDataSource();
                        if (checkDs2 instanceof DriverManagerDataSource)
                            ((DriverManagerDataSource) checkDs2).setFactoryClassLocation( val );
                    }
                    return;
                }
View Full Code Here


                    return;
                }
                else if (pds instanceof AbstractPoolBackedDataSource)
                {
                    String val = (String) attrObj.getValue();
                    AbstractPoolBackedDataSource apbds = ((AbstractPoolBackedDataSource) pds);
                    apbds.setFactoryClassLocation( val );
                    ConnectionPoolDataSource checkDs1 = apbds.getConnectionPoolDataSource();
                    if (checkDs1 instanceof WrapperConnectionPoolDataSource)
                    {
                        WrapperConnectionPoolDataSource wcheckDs1 = (WrapperConnectionPoolDataSource) checkDs1;
                        wcheckDs1.setFactoryClassLocation( val );
                        DataSource checkDs2 = wcheckDs1.getNestedDataSource();
View Full Code Here

        }
       
        if (idt.getIdentityToken() == null)
            throw new RuntimeException("[c3p0 issue] The identityToken of a registered object should be set prior to registration.");

        IdentityTokenized coalesceCheck = (IdentityTokenized) idtCoalescer.coalesce(idt);

        if (! isIncorporated( coalesceCheck ))
            incorporate( coalesceCheck );

        return coalesceCheck;
View Full Code Here

                arglist[0] = ReflectionUtils.invokeMethod(conn, "getUnderlyingConnection", null);
                tempBlob = createTempMethod.invoke(null, arglist); // null is valid because of static method
            }
            // C3P0 pool managed connection.
            else if (NewProxyConnection.class.isAssignableFrom(connClassInCurrentClassLoader)) {
                NewProxyConnection castCon = (NewProxyConnection) conn;
                arglist[0] = C3P0ProxyConnection.RAW_CONNECTION;
                tempBlob = castCon.rawConnectionOperation(createTempMethod, C3P0ProxyConnection.RAW_CONNECTION, arglist);
            }
            // Apache's DBCP pool managed connection.
            else if (PoolableConnection.class.isAssignableFrom(connClassInCurrentClassLoader)) {
                arglist[0] = ((PoolableConnection) statement.getConnection()).getDelegate();
                tempBlob = createTempMethod.invoke(null, arglist); // null is valid because of static method
View Full Code Here

            if (Class.forName(ORACLE_JDBC_ORACLE_CONNECTION).isAssignableFrom(conn.getClass())) {
                tempBlob = createTempMethod.invoke(null, arglist); // null is valid because of static method
            }
            // The connection has been opened by the C3P0 pool.
            else if (NewProxyConnection.class.isAssignableFrom(conn.getClass())) {
                NewProxyConnection castCon = (NewProxyConnection) conn;
                arglist[0] = C3P0ProxyConnection.RAW_CONNECTION;
                tempBlob = castCon.rawConnectionOperation(createTempMethod, C3P0ProxyConnection.RAW_CONNECTION, arglist);
            }
            // The connection has been configured as a Tomcat data source.
            else if (PoolableConnection.class.isAssignableFrom(conn.getClass())) {
                arglist[0] = ((PoolableConnection) statement.getConnection()).getDelegate();
                tempBlob = createTempMethod.invoke(null, arglist); // null is valid because of static method
View Full Code Here

    public synchronized void generate( ClassInfo info, Property[] props, Writer w) throws IOException
    {
  this.info = info;
  this.props = props;
  Arrays.sort( props, BeangenUtils.PROPERTY_COMPARATOR );
  this.iw = ( w instanceof IndentedWriter ? (IndentedWriter) w : new IndentedWriter(w));

  this.generalImports = new TreeSet();
  if ( info.getGeneralImports() != null )
      generalImports.addAll( Arrays.asList( info.getGeneralImports() ) );
View Full Code Here

    public synchronized void generate( ClassInfo info, Property[] props, Writer w) throws IOException
    {
  this.info = info;
  this.props = props;
  Arrays.sort( props, BeangenUtils.PROPERTY_COMPARATOR );
  this.iw = ( w instanceof IndentedWriter ? (IndentedWriter) w : new IndentedWriter(w));

  this.generalImports = new TreeSet();
  if ( info.getGeneralImports() != null )
      generalImports.addAll( Arrays.asList( info.getGeneralImports() ) );
View Full Code Here

    public synchronized void generate( ClassInfo info, Property[] props, Writer w) throws IOException
    {
  this.info = info;
  this.props = props;
  Arrays.sort( props, BeangenUtils.PROPERTY_COMPARATOR );
  this.iw = ( w instanceof IndentedWriter ? (IndentedWriter) w : new IndentedWriter(w));

  this.generalImports = new TreeSet();
  if ( info.getGeneralImports() != null )
      generalImports.addAll( Arrays.asList( info.getGeneralImports() ) );
View Full Code Here

    public synchronized void generate( ClassInfo info, Property[] props, Writer w) throws IOException
    {
  this.info = info;
  this.props = props;
  Arrays.sort( props, BeangenUtils.PROPERTY_COMPARATOR );
  this.iw = ( w instanceof IndentedWriter ? (IndentedWriter) w : new IndentedWriter(w));

  this.generalImports = new TreeSet();
  if ( info.getGeneralImports() != null )
      generalImports.addAll( Arrays.asList( info.getGeneralImports() ) );
View Full Code Here

             cxnStmtMgr.getNumConnectionsWithCachedStatements());
        logger.log(MLevel.FINEST, "Set of statements for connection: " + cSet + (cSet != null ? "; size: " + cSet.size() : ""));
          }
        }
   
    ChangeNotifyingSynchronizedIntHolder counter = new ChangeNotifyingSynchronizedIntHolder(0, true);
    synchronized ( counter )
        {
      if (cSet != null)
          {
        //the removeStatement(...) removes from cSet, so we can't be iterating over cSet directly
        Set stmtSet = new HashSet( cSet );
        int sz = stmtSet.size();
        //System.err.println("SIZE FOR CONNECTION SET: " + stmtSet.size());
        for (Iterator ii = stmtSet.iterator(); ii.hasNext(); )
            {
          Object stmt = ii.next();
         
          synchronized ( this )
              { removeStatement( stmt, true, counter ); }
            }
        try
            {
          while (counter.getValue() < sz)
              {
            //System.err.println( "counter.getValue(): " + counter.getValue() + "; sz: " + sz );
            counter.wait();
              }
          //System.err.println( "FINAL: counter.getValue(): " + counter.getValue() + "; sz: " + sz );
            }
        catch (InterruptedException e)
            {
View Full Code Here

TOP

Related Classes of com.mchange.v2.util.DoubleWeakHashMap$UserEntrySet

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.