http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/428046ec/commons-dbcp-1.3/src/main/java/org/apache/commons/dbcp/BasicDataSource.java ---------------------------------------------------------------------- diff --git a/commons-dbcp-1.3/src/main/java/org/apache/commons/dbcp/BasicDataSource.java b/commons-dbcp-1.3/src/main/java/org/apache/commons/dbcp/BasicDataSource.java deleted file mode 100644 index 27560d7..0000000 --- a/commons-dbcp-1.3/src/main/java/org/apache/commons/dbcp/BasicDataSource.java +++ /dev/null @@ -1,1300 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.commons.dbcp; - -import java.io.PrintWriter; -import java.sql.Connection; -import java.sql.Driver; -import java.sql.DriverManager; -import java.sql.SQLException; -import java.util.Properties; - -import javax.sql.DataSource; - -import org.apache.commons.pool.impl.GenericKeyedObjectPool; -import org.apache.commons.pool.impl.GenericKeyedObjectPoolFactory; -import org.apache.commons.pool.impl.GenericObjectPool; - - -/** - * <p>Basic implementation of <code>javax.sql.DataSource</code> that is - * configured via JavaBeans properties. This is not the only way to - * combine the <em>commons-dbcp</em> and <em>commons-pool</em> packages, - * but provides a "one stop shopping" solution for basic requirements.</p> - * - * @author Glenn L. Nielsen - * @author Craig R. McClanahan - * @author Dirk Verbeeck - * @version $Revision$ $Date$ - */ -public class BasicDataSource implements DataSource { - - // ------------------------------------------------------------- Properties - - /** - * The default auto-commit state of connections created by this pool. - */ - protected boolean defaultAutoCommit = true; - - /** - * Returns the default auto-commit property. - * - * @return true if default auto-commit is enabled - */ - public synchronized boolean getDefaultAutoCommit() { - return this.defaultAutoCommit; - } - - /** - * <p>Sets default auto-commit state of connections returned by this - * datasource.</p> - * <p> - * Note: this method currently has no effect once the pool has been - * initialized. The pool is initialized the first time one of the - * following methods is invoked: <code>getConnection, setLogwriter, - * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p> - * - * @param defaultAutoCommit default auto-commit value - */ - public synchronized void setDefaultAutoCommit(boolean defaultAutoCommit) { - this.defaultAutoCommit = defaultAutoCommit; - this.restartNeeded = true; - } - - - /** - * The default read-only state of connections created by this pool. - */ - protected Boolean defaultReadOnly = null; - - /** - * Returns the default readOnly property. - * - * @return true if connections are readOnly by default - */ - public synchronized boolean getDefaultReadOnly() { - if (this.defaultReadOnly != null) { - return this.defaultReadOnly.booleanValue(); - } - return false; - } - - /** - * <p>Sets defaultReadonly property.</p> - * <p> - * Note: this method currently has no effect once the pool has been - * initialized. The pool is initialized the first time one of the - * following methods is invoked: <code>getConnection, setLogwriter, - * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p> - * - * @param defaultReadOnly default read-only value - */ - public synchronized void setDefaultReadOnly(boolean defaultReadOnly) { - this.defaultReadOnly = defaultReadOnly ? Boolean.TRUE : Boolean.FALSE; - this.restartNeeded = true; - } - - /** - * The default TransactionIsolation state of connections created by this pool. - */ - protected int defaultTransactionIsolation = PoolableConnectionFactory.UNKNOWN_TRANSACTIONISOLATION; - - /** - * Returns the default transaction isolation state of returned connections. - * - * @return the default value for transaction isolation state - * @see java.sql.Connection#getTransactionIsolation - */ - public synchronized int getDefaultTransactionIsolation() { - return this.defaultTransactionIsolation; - } - - /** - * <p>Sets the default transaction isolation state for returned - * connections.</p> - * <p> - * Note: this method currently has no effect once the pool has been - * initialized. The pool is initialized the first time one of the - * following methods is invoked: <code>getConnection, setLogwriter, - * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p> - * - * @param defaultTransactionIsolation the default transaction isolation - * state - * @see java.sql.Connection#getTransactionIsolation - */ - public synchronized void setDefaultTransactionIsolation(int defaultTransactionIsolation) { - this.defaultTransactionIsolation = defaultTransactionIsolation; - this.restartNeeded = true; - } - - - /** - * The default "catalog" of connections created by this pool. - */ - protected String defaultCatalog = null; - - /** - * Returns the default catalog. - * - * @return the default catalog - */ - public synchronized String getDefaultCatalog() { - return this.defaultCatalog; - } - - /** - * <p>Sets the default catalog.</p> - * <p> - * Note: this method currently has no effect once the pool has been - * initialized. The pool is initialized the first time one of the - * following methods is invoked: <code>getConnection, setLogwriter, - * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p> - * - * @param defaultCatalog the default catalog - */ - public synchronized void setDefaultCatalog(String defaultCatalog) { - if ((defaultCatalog != null) && (defaultCatalog.trim().length() > 0)) { - this.defaultCatalog = defaultCatalog; - } - else { - this.defaultCatalog = null; - } - this.restartNeeded = true; - } - - - /** - * The fully qualified Java class name of the JDBC driver to be used. - */ - protected String driverClassName = null; - - /** - * Returns the jdbc driver class name. - * - * @return the jdbc driver class name - */ - public synchronized String getDriverClassName() { - return this.driverClassName; - } - - /** - * <p>Sets the jdbc driver class name.</p> - * <p> - * Note: this method currently has no effect once the pool has been - * initialized. The pool is initialized the first time one of the - * following methods is invoked: <code>getConnection, setLogwriter, - * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p> - * - * @param driverClassName the class name of the jdbc driver - */ - public synchronized void setDriverClassName(String driverClassName) { - if ((driverClassName != null) && (driverClassName.trim().length() > 0)) { - this.driverClassName = driverClassName; - } - else { - this.driverClassName = null; - } - this.restartNeeded = true; - } - - - /** - * The maximum number of active connections that can be allocated from - * this pool at the same time, or non-positive for no limit. - */ - protected int maxActive = GenericObjectPool.DEFAULT_MAX_ACTIVE; - - /** - * <p>Returns the maximum number of active connections that can be - * allocated at the same time. - * </p> - * <p>A non-positive number means that there is no limit.</p> - * - * @return the maximum number of active connections - */ - public synchronized int getMaxActive() { - return this.maxActive; - } - - /** - * Sets the maximum number of active connections that can be - * allocated at the same time. - * - * @param maxActive the new value for maxActive - * @see #getMaxActive() - */ - public synchronized void setMaxActive(int maxActive) { - this.maxActive = maxActive; - if (connectionPool != null) { - connectionPool.setMaxActive(maxActive); - } - } - - /** - * The maximum number of connections that can remain idle in the - * pool, without extra ones being released, or negative for no limit. - */ - protected int maxIdle = GenericObjectPool.DEFAULT_MAX_IDLE; - - /** - * <p>Returns the maximum number of connections that can remain idle in the - * pool. - * </p> - * <p>A negative value indicates that there is no limit</p> - * - * @return the maximum number of idle connections - */ - public synchronized int getMaxIdle() { - return this.maxIdle; - } - - /** - * Sets the maximum number of connections that can remail idle in the - * pool. - * - * @see #getMaxIdle() - * @param maxIdle the new value for maxIdle - */ - public synchronized void setMaxIdle(int maxIdle) { - this.maxIdle = maxIdle; - if (connectionPool != null) { - connectionPool.setMaxIdle(maxIdle); - } - } - - /** - * The minimum number of active connections that can remain idle in the - * pool, without extra ones being created, or 0 to create none. - */ - protected int minIdle = GenericObjectPool.DEFAULT_MIN_IDLE; - - /** - * Returns the minimum number of idle connections in the pool - * - * @return the minimum number of idle connections - * @see GenericObjectPool#getMinIdle() - */ - public synchronized int getMinIdle() { - return this.minIdle; - } - - /** - * Sets the minimum number of idle connections in the pool. - * - * @param minIdle the new value for minIdle - * @see GenericObjectPool#setMinIdle(int) - */ - public synchronized void setMinIdle(int minIdle) { - this.minIdle = minIdle; - if (connectionPool != null) { - connectionPool.setMinIdle(minIdle); - } - } - - /** - * The initial number of connections that are created when the pool - * is started. - * - * @since 1.2 - */ - protected int initialSize = 0; - - /** - * Returns the initial size of the connection pool. - * - * @return the number of connections created when the pool is initialized - */ - public synchronized int getInitialSize() { - return this.initialSize; - } - - /** - * <p>Sets the initial size of the connection pool.</p> - * <p> - * Note: this method currently has no effect once the pool has been - * initialized. The pool is initialized the first time one of the - * following methods is invoked: <code>getConnection, setLogwriter, - * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p> - * - * @param initialSize the number of connections created when the pool - * is initialized - */ - public synchronized void setInitialSize(int initialSize) { - this.initialSize = initialSize; - this.restartNeeded = true; - } - - /** - * The maximum number of milliseconds that the pool will wait (when there - * are no available connections) for a connection to be returned before - * throwing an exception, or -1 to wait indefinitely. - */ - protected long maxWait = GenericObjectPool.DEFAULT_MAX_WAIT; - - /** - * <p>Returns the maximum number of milliseconds that the pool will wait - * for a connection to be returned before throwing an exception. - * </p> - * <p>Returns -1 if the pool is set to wait indefinitely.</p> - * - * @return the maxWait property value - */ - public synchronized long getMaxWait() { - return this.maxWait; - } - - /** - * Sets the maxWait property. - * - * @param maxWait the new value for maxWait - * @see #getMaxWait() - */ - public synchronized void setMaxWait(long maxWait) { - this.maxWait = maxWait; - if (connectionPool != null) { - connectionPool.setMaxWait(maxWait); - } - } - - /** - * Prepared statement pooling for this pool. - */ - protected boolean poolPreparedStatements = false; - - /** - * Returns true if we are pooling statements. - * - * @return true if prepared statements are pooled - */ - public synchronized boolean isPoolPreparedStatements() { - return this.poolPreparedStatements; - } - - /** - * <p>Sets whether to pool statements or not.</p> - * <p> - * Note: this method currently has no effect once the pool has been - * initialized. The pool is initialized the first time one of the - * following methods is invoked: <code>getConnection, setLogwriter, - * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p> - * - * @param poolingStatements pooling on or off - */ - public synchronized void setPoolPreparedStatements(boolean poolingStatements) { - this.poolPreparedStatements = poolingStatements; - this.restartNeeded = true; - } - - /** - * The maximum number of open statements that can be allocated from - * the statement pool at the same time, or non-positive for no limit. Since - * a connection usually only uses one or two statements at a time, this is - * mostly used to help detect resource leaks. - */ - protected int maxOpenPreparedStatements = GenericKeyedObjectPool.DEFAULT_MAX_TOTAL; - - /** - * Gets the value of the {@link #maxOpenPreparedStatements} property. - * - * @return the maximum number of open statements - * @see #maxOpenPreparedStatements - */ - public synchronized int getMaxOpenPreparedStatements() { - return this.maxOpenPreparedStatements; - } - - /** - * <p>Sets the value of the {@link #maxOpenPreparedStatements} - * property.</p> - * <p> - * Note: this method currently has no effect once the pool has been - * initialized. The pool is initialized the first time one of the - * following methods is invoked: <code>getConnection, setLogwriter, - * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p> - * - * @param maxOpenStatements the new maximum number of prepared statements - * @see #maxOpenPreparedStatements - */ - public synchronized void setMaxOpenPreparedStatements(int maxOpenStatements) { - this.maxOpenPreparedStatements = maxOpenStatements; - this.restartNeeded = true; - } - - /** - * The indication of whether objects will be validated before being - * borrowed from the pool. If the object fails to validate, it will be - * dropped from the pool, and we will attempt to borrow another. - */ - protected boolean testOnBorrow = true; - - /** - * Returns the {@link #testOnBorrow} property. - * - * @return true if objects are validated before being borrowed from the - * pool - * - * @see #testOnBorrow - */ - public synchronized boolean getTestOnBorrow() { - return this.testOnBorrow; - } - - /** - * Sets the {@link #testOnBorrow} property. This property determines - * whether or not the pool will validate objects before they are borrowed - * from the pool. For a <code>true</code> value to have any effect, the - * <code>validationQuery</code> property must be set to a non-null string. - * - * @param testOnBorrow new value for testOnBorrow property - */ - public synchronized void setTestOnBorrow(boolean testOnBorrow) { - this.testOnBorrow = testOnBorrow; - if (connectionPool != null) { - connectionPool.setTestOnBorrow(testOnBorrow); - } - } - - /** - * The indication of whether objects will be validated before being - * returned to the pool. - */ - protected boolean testOnReturn = false; - - /** - * Returns the value of the {@link #testOnReturn} property. - * - * @return true if objects are validated before being returned to the - * pool - * @see #testOnReturn - */ - public synchronized boolean getTestOnReturn() { - return this.testOnReturn; - } - - /** - * Sets the <code>testOnReturn</code> property. This property determines - * whether or not the pool will validate objects before they are returned - * to the pool. For a <code>true</code> value to have any effect, the - * <code>validationQuery</code> property must be set to a non-null string. - * - * @param testOnReturn new value for testOnReturn property - */ - public synchronized void setTestOnReturn(boolean testOnReturn) { - this.testOnReturn = testOnReturn; - if (connectionPool != null) { - connectionPool.setTestOnReturn(testOnReturn); - } - } - - /** - * The number of milliseconds to sleep between runs of the idle object - * evictor thread. When non-positive, no idle object evictor thread will - * be run. - */ - protected long timeBetweenEvictionRunsMillis = - GenericObjectPool.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS; - - /** - * Returns the value of the {@link #timeBetweenEvictionRunsMillis} - * property. - * - * @return the time (in miliseconds) between evictor runs - * @see #timeBetweenEvictionRunsMillis - */ - public synchronized long getTimeBetweenEvictionRunsMillis() { - return this.timeBetweenEvictionRunsMillis; - } - - /** - * Sets the {@link #timeBetweenEvictionRunsMillis} property. - * - * @param timeBetweenEvictionRunsMillis the new time between evictor runs - * @see #timeBetweenEvictionRunsMillis - */ - public synchronized void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis) { - this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis; - if (connectionPool != null) { - connectionPool.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); - } - } - - /** - * The number of objects to examine during each run of the idle object - * evictor thread (if any). - */ - protected int numTestsPerEvictionRun = - GenericObjectPool.DEFAULT_NUM_TESTS_PER_EVICTION_RUN; - - /** - * Returns the value of the {@link #numTestsPerEvictionRun} property. - * - * @return the number of objects to examine during idle object evictor - * runs - * @see #numTestsPerEvictionRun - */ - public synchronized int getNumTestsPerEvictionRun() { - return this.numTestsPerEvictionRun; - } - - /** - * Sets the value of the {@link #numTestsPerEvictionRun} property. - * - * @param numTestsPerEvictionRun the new {@link #numTestsPerEvictionRun} - * value - * @see #numTestsPerEvictionRun - */ - public synchronized void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) { - this.numTestsPerEvictionRun = numTestsPerEvictionRun; - if (connectionPool != null) { - connectionPool.setNumTestsPerEvictionRun(numTestsPerEvictionRun); - } - } - - /** - * The minimum amount of time an object may sit idle in the pool before it - * is eligable for eviction by the idle object evictor (if any). - */ - protected long minEvictableIdleTimeMillis = - GenericObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS; - - /** - * Returns the {@link #minEvictableIdleTimeMillis} property. - * - * @return the value of the {@link #minEvictableIdleTimeMillis} property - * @see #minEvictableIdleTimeMillis - */ - public synchronized long getMinEvictableIdleTimeMillis() { - return this.minEvictableIdleTimeMillis; - } - - /** - * Sets the {@link #minEvictableIdleTimeMillis} property. - * - * @param minEvictableIdleTimeMillis the minimum amount of time an object - * may sit idle in the pool - * @see #minEvictableIdleTimeMillis - */ - public synchronized void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis) { - this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis; - if (connectionPool != null) { - connectionPool.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis); - } - } - - /** - * The indication of whether objects will be validated by the idle object - * evictor (if any). If an object fails to validate, it will be dropped - * from the pool. - */ - protected boolean testWhileIdle = false; - - /** - * Returns the value of the {@link #testWhileIdle} property. - * - * @return true if objects examined by the idle object evictor are - * validated - * @see #testWhileIdle - */ - public synchronized boolean getTestWhileIdle() { - return this.testWhileIdle; - } - - /** - * Sets the <code>testWhileIdle</code> property. This property determines - * whether or not the idle object evictor will validate connections. For a - * <code>true</code> value to have any effect, the - * <code>validationQuery</code> property must be set to a non-null string. - * - * @param testWhileIdle new value for testWhileIdle property - */ - public synchronized void setTestWhileIdle(boolean testWhileIdle) { - this.testWhileIdle = testWhileIdle; - if (connectionPool != null) { - connectionPool.setTestWhileIdle(testWhileIdle); - } - } - - /** - * [Read Only] The current number of active connections that have been - * allocated from this data source. - * - * @return the current number of active connections - */ - public synchronized int getNumActive() { - if (connectionPool != null) { - return connectionPool.getNumActive(); - } else { - return 0; - } - } - - - /** - * [Read Only] The current number of idle connections that are waiting - * to be allocated from this data source. - * - * @return the current number of idle connections - */ - public synchronized int getNumIdle() { - if (connectionPool != null) { - return connectionPool.getNumIdle(); - } else { - return 0; - } - } - - /** - * The connection password to be passed to our JDBC driver to establish - * a connection. - */ - protected String password = null; - - /** - * Returns the password passed to the JDBC driver to establish connections. - * - * @return the connection password - */ - public synchronized String getPassword() { - return this.password; - } - - /** - * <p>Sets the {@link #password}.</p> - * <p> - * Note: this method currently has no effect once the pool has been - * initialized. The pool is initialized the first time one of the - * following methods is invoked: <code>getConnection, setLogwriter, - * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p> - * - * @param password new value for the password - */ - public synchronized void setPassword(String password) { - this.password = password; - this.restartNeeded = true; - } - - /** - * The connection URL to be passed to our JDBC driver to establish - * a connection. - */ - protected String url = null; - - /** - * Returns the JDBC connection {@link #url} property. - * - * @return the {@link #url} passed to the JDBC driver to establish - * connections - */ - public synchronized String getUrl() { - return this.url; - } - - /** - * <p>Sets the {@link #url}.</p> - * <p> - * Note: this method currently has no effect once the pool has been - * initialized. The pool is initialized the first time one of the - * following methods is invoked: <code>getConnection, setLogwriter, - * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p> - * - * @param url the new value for the JDBC connection url - */ - public synchronized void setUrl(String url) { - this.url = url; - this.restartNeeded = true; - } - - /** - * The connection username to be passed to our JDBC driver to - * establish a connection. - */ - protected String username = null; - - /** - * Returns the JDBC connection {@link #username} property. - * - * @return the {@link #username} passed to the JDBC driver to establish - * connections - */ - public synchronized String getUsername() { - return this.username; - } - - /** - * <p>Sets the {@link #username}.</p> - * <p> - * Note: this method currently has no effect once the pool has been - * initialized. The pool is initialized the first time one of the - * following methods is invoked: <code>getConnection, setLogwriter, - * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p> - * - * @param username the new value for the JDBC connection username - */ - public synchronized void setUsername(String username) { - this.username = username; - this.restartNeeded = true; - } - - /** - * The SQL query that will be used to validate connections from this pool - * before returning them to the caller. If specified, this query - * <strong>MUST</strong> be an SQL SELECT statement that returns at least - * one row. - */ - protected String validationQuery = null; - - /** - * Returns the validation query used to validate connections before - * returning them. - * - * @return the SQL validation query - * @see #validationQuery - */ - public synchronized String getValidationQuery() { - return this.validationQuery; - } - - /** - * <p>Sets the {@link #validationQuery}.</p> - * <p> - * Note: this method currently has no effect once the pool has been - * initialized. The pool is initialized the first time one of the - * following methods is invoked: <code>getConnection, setLogwriter, - * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p> - * - * @param validationQuery the new value for the validation query - */ - public synchronized void setValidationQuery(String validationQuery) { - if ((validationQuery != null) && (validationQuery.trim().length() > 0)) { - this.validationQuery = validationQuery; - } else { - this.validationQuery = null; - } - this.restartNeeded = true; - } - - /** - * Controls access to the underlying connection. - */ - private boolean accessToUnderlyingConnectionAllowed = false; - - /** - * Returns the value of the accessToUnderlyingConnectionAllowed property. - * - * @return true if access to the underlying connection is allowed, false - * otherwise. - */ - public synchronized boolean isAccessToUnderlyingConnectionAllowed() { - return this.accessToUnderlyingConnectionAllowed; - } - - /** - * <p>Sets the value of the accessToUnderlyingConnectionAllowed property. - * It controls if the PoolGuard allows access to the underlying connection. - * (Default: false)</p> - * <p> - * Note: this method currently has no effect once the pool has been - * initialized. The pool is initialized the first time one of the - * following methods is invoked: <code>getConnection, setLogwriter, - * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p> - * - * @param allow Access to the underlying connection is granted when true. - */ - public synchronized void setAccessToUnderlyingConnectionAllowed(boolean allow) { - this.accessToUnderlyingConnectionAllowed = allow; - this.restartNeeded = true; - } - - // ----------------------------------------------------- Instance Variables - - // TODO: review & make isRestartNeeded() public, restartNeeded protected - - /** - * A property setter has been invoked that will require the connection - * pool to be re-initialized. Currently, restart is not triggered, so - * this property has no effect. - */ - private boolean restartNeeded = false; - - /** - * Returns whether or not a restart is needed. - * - * Note: restart is not currently triggered by property changes. - * - * @return true if a restart is needed - */ - private synchronized boolean isRestartNeeded() { - return restartNeeded; - } - - /** - * The object pool that internally manages our connections. - */ - protected GenericObjectPool connectionPool = null; - - /** - * The connection properties that will be sent to our JDBC driver when - * establishing new connections. <strong>NOTE</strong> - The "user" and - * "password" properties will be passed explicitly, so they do not need - * to be included here. - */ - protected Properties connectionProperties = new Properties(); - - /** - * The data source we will use to manage connections. This object should - * be acquired <strong>ONLY</strong> by calls to the - * <code>createDataSource()</code> method. - */ - protected DataSource dataSource = null; - - /** - * The PrintWriter to which log messages should be directed. - */ - protected PrintWriter logWriter = new PrintWriter(System.out); - - - // ----------------------------------------------------- DataSource Methods - - - /** - * Create (if necessary) and return a connection to the database. - * - * @throws java.sql.SQLException if a database access error occurs - * @return a database connection - */ - public Connection getConnection() throws SQLException { - return createDataSource().getConnection(); - } - - - /** - * <strong>BasicDataSource does NOT support this method. - * </strong> - * - * @param username Database user on whose behalf the Connection - * is being made - * @param password The database user's password - * - * @throws UnsupportedOperationException - * @throws java.sql.SQLException if a database access error occurs - * @return nothing - always throws UnsupportedOperationException - */ - public Connection getConnection(String username, String password) throws SQLException { - // This method isn't supported by the PoolingDataSource returned by - // the createDataSource - throw new UnsupportedOperationException("Not supported by BasicDataSource"); - // return createDataSource().getConnection(username, password); - } - - - /** - * <p>Returns the login timeout (in seconds) for connecting to the database. - * </p> - * <p>Calls {@link #createDataSource()}, so has the side effect - * of initializing the connection pool.</p> - * - * @throws java.sql.SQLException if a database access error occurs - * @throws UnsupportedOperationException If the DataSource implementation - * does not support the login timeout feature. - * @return login timeout in seconds - */ - public int getLoginTimeout() throws SQLException { - return createDataSource().getLoginTimeout(); - } - - - /** - * <p>Returns the log writer being used by this data source.</p> - * <p> - * Calls {@link #createDataSource()}, so has the side effect - * of initializing the connection pool.</p> - * - * @throws java.sql.SQLException if a database access error occurs - * @return log writer in use - */ - public PrintWriter getLogWriter() throws SQLException { - return createDataSource().getLogWriter(); - } - - - /** - * <p>Set the login timeout (in seconds) for connecting to the - * database.</p> - * <p> - * Calls {@link #createDataSource()}, so has the side effect - * of initializing the connection pool.</p> - * - * @param loginTimeout The new login timeout, or zero for no timeout - * @throws java.sql.SQLException if a database access error occurs - */ - public void setLoginTimeout(int loginTimeout) throws SQLException { - createDataSource().setLoginTimeout(loginTimeout); - } - - - /** - * <p>Sets the log writer being used by this data source.</p> - * <p> - * Calls {@link #createDataSource()}, so has the side effect - * of initializing the connection pool.</p> - * - * @param logWriter The new log writer - * @throws java.sql.SQLException if a database access error occurs - */ - public void setLogWriter(PrintWriter logWriter) throws SQLException { - createDataSource().setLogWriter(logWriter); - this.logWriter = logWriter; - } - - private AbandonedConfig abandonedConfig; - - /** - * Flag to remove abandoned connections if they exceed the - * removeAbandonedTimout. - * - * Set to true or false, default false. - * If set to true a connection is considered abandoned and eligible - * for removal if it has been idle longer than the removeAbandonedTimeout. - * Setting this to true can recover db connections from poorly written - * applications which fail to close a connection. - * @deprecated - */ - public boolean getRemoveAbandoned() { - if (abandonedConfig != null) { - return abandonedConfig.getRemoveAbandoned(); - } - return false; - } - - /** - * @deprecated - * @param removeAbandoned new removeAbandoned property value - */ - public void setRemoveAbandoned(boolean removeAbandoned) { - if (abandonedConfig == null) { - abandonedConfig = new AbandonedConfig(); - } - abandonedConfig.setRemoveAbandoned(removeAbandoned); - this.restartNeeded = true; - } - - /** - * Timeout in seconds before an abandoned connection can be removed. - * - * Defaults to 300 seconds. - * @return abandoned connection timeout - * @deprecated - */ - public int getRemoveAbandonedTimeout() { - if (abandonedConfig != null) { - return abandonedConfig.getRemoveAbandonedTimeout(); - } - return 300; - } - - /** - * @deprecated - * @param removeAbandonedTimeout new removeAbandonedTimeout value - */ - public void setRemoveAbandonedTimeout(int removeAbandonedTimeout) { - if (abandonedConfig == null) { - abandonedConfig = new AbandonedConfig(); - } - abandonedConfig.setRemoveAbandonedTimeout(removeAbandonedTimeout); - this.restartNeeded = true; - } - - /** - * <p>Flag to log stack traces for application code which abandoned - * a Statement or Connection. - * </p> - * <p>Defaults to false. - * </p> - * <p>Logging of abandoned Statements and Connections adds overhead - * for every Connection open or new Statement because a stack - * trace has to be generated. </p> - * - * @deprecated - */ - public boolean getLogAbandoned() { - if (abandonedConfig != null) { - return abandonedConfig.getLogAbandoned(); - } - return false; - } - - /** - * @deprecated - * @param logAbandoned new logAbandoned property value - */ - public void setLogAbandoned(boolean logAbandoned) { - if (abandonedConfig == null) { - abandonedConfig = new AbandonedConfig(); - } - abandonedConfig.setLogAbandoned(logAbandoned); - this.restartNeeded = true; - } - - // --------------------------------------------------------- Public Methods - - /** - * Add a custom connection property to the set that will be passed to our - * JDBC driver. This <strong>MUST</strong> be called before the first - * connection is retrieved (along with all the other configuration - * property setters). Calls to this method after the connection pool - * has been initialized have no effect. - * - * @param name Name of the custom connection property - * @param value Value of the custom connection property - */ - public void addConnectionProperty(String name, String value) { - connectionProperties.put(name, value); - this.restartNeeded = true; - } - - /** - * Remove a custom connection property. - * - * @param name Name of the custom connection property to remove - * @see #addConnectionProperty(String, String) - */ - public void removeConnectionProperty(String name) { - connectionProperties.remove(name); - this.restartNeeded = true; - } - - /** - * Close and release all connections that are currently stored in the - * connection pool associated with our data source. - * - * @throws java.sql.SQLException if a database error occurs - */ - public synchronized void close() throws SQLException { - GenericObjectPool oldpool = connectionPool; - connectionPool = null; - dataSource = null; - try { - if (oldpool != null) { - oldpool.close(); - } - } catch(SQLException e) { - throw e; - } catch(RuntimeException e) { - throw e; - } catch(Exception e) { - throw new SQLNestedException("Cannot close connection pool", e); - } - } - - - // ------------------------------------------------------ Protected Methods - - - /** - * <p>Create (if necessary) and return the internal data source we are - * using to manage our connections.</p> - * - * <p><strong>IMPLEMENTATION NOTE</strong> - It is tempting to use the - * "double checked locking" idiom in an attempt to avoid synchronizing - * on every single call to this method. However, this idiom fails to - * work correctly in the face of some optimizations that are legal for - * a JVM to perform.</p> - * - * @throws java.sql.SQLException if the object pool cannot be created. - */ - protected synchronized DataSource createDataSource() - throws SQLException { - - // Return the pool if we have already created it - if (dataSource != null) { - return (dataSource); - } - - // Load the JDBC driver class - Class driverFromCCL = null; - if (driverClassName != null) { - try { - try { - Class.forName(driverClassName); - } catch (ClassNotFoundException e) { - driverFromCCL = Thread.currentThread().getContextClassLoader().loadClass(driverClassName); - } - } catch (Throwable t) { - String message = "Cannot load JDBC driver class '" + - driverClassName + "'"; - logWriter.println(message); - t.printStackTrace(logWriter); - throw new SQLNestedException(message, t); - } - } - - // Create a JDBC driver instance - Driver driver = null; - try { - if (driverFromCCL != null) { - driver = (Driver) driverFromCCL.newInstance(); - if (!driver.acceptsURL(url)) { - new SQLException("No suitable driver", "08001"); - } - } else { - driver = DriverManager.getDriver(url); - } - } catch (Throwable t) { - String message = "Cannot create JDBC driver of class '" + - (driverClassName != null ? driverClassName : "") + - "' for connect URL '" + url + "'"; - logWriter.println(message); - t.printStackTrace(logWriter); - throw new SQLNestedException(message, t); - } - - // Can't test without a validationQuery - if (validationQuery == null) { - setTestOnBorrow(false); - setTestOnReturn(false); - setTestWhileIdle(false); - } - - // Create an object pool to contain our active connections - if ((abandonedConfig != null) && (abandonedConfig.getRemoveAbandoned())) { - connectionPool = new AbandonedObjectPool(null,abandonedConfig); - } - else { - connectionPool = new GenericObjectPool(); - } - connectionPool.setMaxActive(maxActive); - connectionPool.setMaxIdle(maxIdle); - connectionPool.setMinIdle(minIdle); - connectionPool.setMaxWait(maxWait); - connectionPool.setTestOnBorrow(testOnBorrow); - connectionPool.setTestOnReturn(testOnReturn); - connectionPool.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); - connectionPool.setNumTestsPerEvictionRun(numTestsPerEvictionRun); - connectionPool.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis); - connectionPool.setTestWhileIdle(testWhileIdle); - - // Set up statement pool, if desired - GenericKeyedObjectPoolFactory statementPoolFactory = null; - if (isPoolPreparedStatements()) { - statementPoolFactory = new GenericKeyedObjectPoolFactory(null, - -1, // unlimited maxActive (per key) - GenericKeyedObjectPool.WHEN_EXHAUSTED_FAIL, - 0, // maxWait - 1, // maxIdle (per key) - maxOpenPreparedStatements); - } - - // Set up the driver connection factory we will use - if (username != null) { - connectionProperties.put("user", username); - } else { - log("DBCP DataSource configured without a 'username'"); - } - - if (password != null) { - connectionProperties.put("password", password); - } else { - log("DBCP DataSource configured without a 'password'"); - } - - DriverConnectionFactory driverConnectionFactory = - new DriverConnectionFactory(driver, url, connectionProperties); - - // Set up the poolable connection factory we will use - PoolableConnectionFactory connectionFactory = null; - try { - connectionFactory = - new PoolableConnectionFactory(driverConnectionFactory, - connectionPool, - statementPoolFactory, - validationQuery, - defaultReadOnly, - defaultAutoCommit, - defaultTransactionIsolation, - defaultCatalog, - abandonedConfig); - if (connectionFactory == null) { - throw new SQLException("Cannot create PoolableConnectionFactory"); - } - validateConnectionFactory(connectionFactory); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new SQLNestedException("Cannot create PoolableConnectionFactory (" + e.getMessage() + ")", e); - } - - // Create and return the pooling data source to manage the connections - dataSource = new PoolingDataSource(connectionPool); - ((PoolingDataSource) dataSource).setAccessToUnderlyingConnectionAllowed(isAccessToUnderlyingConnectionAllowed()); - dataSource.setLogWriter(logWriter); - - try { - for (int i = 0 ; i < initialSize ; i++) { - connectionPool.addObject(); - } - } catch (Exception e) { - throw new SQLNestedException("Error preloading the connection pool", e); - } - - return dataSource; - } - - private static void validateConnectionFactory(PoolableConnectionFactory connectionFactory) throws Exception { - Connection conn = null; - try { - conn = (Connection) connectionFactory.makeObject(); - connectionFactory.activateObject(conn); - connectionFactory.validateConnection(conn); - connectionFactory.passivateObject(conn); - } - finally { - connectionFactory.destroyObject(conn); - } - } - - /** - * Not used currently - */ - private void restart() { - try { - close(); - } catch (SQLException e) { - log("Could not restart DataSource, cause: " + e.getMessage()); - } - } - - private void log(String message) { - if (logWriter != null) { - logWriter.println(message); - } - } - - /* (non-Javadoc) - * @see java.sql.Wrapper#isWrapperFor(java.lang.Class) - */ - public boolean isWrapperFor(Class iface) throws SQLException { - return false; - } - - /* (non-Javadoc) - * @see java.sql.Wrapper#unwrap(java.lang.Class) - */ - public Object unwrap(Class iface) throws SQLException { - throw new SQLException("BasicDataSource is not a wrapper."); - } -}
http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/428046ec/commons-dbcp-1.3/src/main/resources/OSGI-INF/bundles.info ---------------------------------------------------------------------- diff --git a/commons-dbcp-1.3/src/main/resources/OSGI-INF/bundles.info b/commons-dbcp-1.3/src/main/resources/OSGI-INF/bundles.info deleted file mode 100644 index 8419c32..0000000 --- a/commons-dbcp-1.3/src/main/resources/OSGI-INF/bundles.info +++ /dev/null @@ -1,38 +0,0 @@ -\u001B[1mSYNOPSIS\u001B[0m - ${project.description} - - Original Maven URL: - \u001B[33mmvn:${pkgGroupId}/${pkgArtifactId}/${pkgVersion}\u001B[0m - -\u001B[1mDESCRIPTION\u001B[0m - Many Apache projects support interaction with a relational database. Creating a new connection for each user - can be time consuming (often requiring multiple seconds of clock time), in order to perform a database - transaction that might take milliseconds. Opening a connection per user can be unfeasible in a - publicly-hosted Internet application where the number of simultaneous users can be very large. Accordingly, - developers often wish to share a "pool" of open connections between all of the application's current users. - The number of users actually performing a request at any given time is usually a very small percentage of - the total number of active users, and during request processing is the only time that a database connection - is required. The application itself logs into the DBMS, and handles any user account issues internally. - - There are several Database Connection Pools already available, both within Apache products and elsewhere. - This Commons package provides an opportunity to coordinate the efforts required to create and maintain an - efficient, feature-rich package under the ASF license. - - The commons-dbcp package relies on code in the commons-pool package to provide the underlying object pool - mechanisms that it utilizes. - - DBCP now comes in two different versions, one to support JDBC 3 and one to support JDBC 4. - Here is how it works: - - * DBCP 1.4 compiles and runs under JDK 1.6 only (JDBC 4) - * DBCP 1.3 compiles and runs under JDK 1.4-1.5 only (JDBC 3) - - DBCP 1.4 binaries should be used by applications running under JDK 1.6. - - DBCP 1.3 should be used when running under JDK 1.4 or 1.5. - - There is no difference in the codebase supporting these two versions, other than that the code implementing - methods added to support JDBC 4 has been filtered out of the DBCP 1.3 sources. - -\u001B[1mSEE ALSO\u001B[0m - \u001B[36mhttp://commons.apache.org/dbcp/\u001B[0m http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/428046ec/commons-httpclient-2.0.2/pom.xml ---------------------------------------------------------------------- diff --git a/commons-httpclient-2.0.2/pom.xml b/commons-httpclient-2.0.2/pom.xml deleted file mode 100644 index cdd094c..0000000 --- a/commons-httpclient-2.0.2/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.bundles</groupId> - <artifactId>bundles-pom</artifactId> - <version>11</version> - <relativePath>../bundles-pom/pom.xml</relativePath> - </parent> - - <groupId>org.apache.servicemix.bundles</groupId> - <artifactId>org.apache.servicemix.bundles.commons-httpclient</artifactId> - <version>2.0.2_2-SNAPSHOT</version> - <packaging>bundle</packaging> - <name>Apache ServiceMix :: Bundles :: ${pkgArtifactId}</name> - <description>This OSGi bundle wraps ${pkgArtifactId} ${pkgVersion} jar file.</description> - - <properties> - <pkgGroupId>commons-httpclient</pkgGroupId> - <pkgArtifactId>commons-httpclient</pkgArtifactId> - <pkgVersion>2.0.2</pkgVersion> - <servicemix.osgi.export.pkg> - org.apache.commons.httpclient - </servicemix.osgi.export.pkg> - <servicemix.osgi.import.pkg> - javax.crypto*, - javax.net*, - org.apache.commons.codec*;version="[1.2,2)", - org.apache.commons.logging*;resolution:=optional, - </servicemix.osgi.import.pkg> - </properties> - - <dependencies> - <dependency> - <groupId>${pkgGroupId}</groupId> - <artifactId>${pkgArtifactId}</artifactId> - <version>${pkgVersion}</version> - <optional>true</optional> - </dependency> - - <!-- sources --> - <dependency> - <groupId>${pkgGroupId}</groupId> - <artifactId>${pkgArtifactId}</artifactId> - <version>${pkgVersion}</version> - <classifier>sources</classifier> - <optional>true</optional> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <artifactSet> - <includes> - <include>${pkgGroupId}:${pkgArtifactId}</include> - </includes> - </artifactSet> - <filters> - <filter> - <artifact>${pkgGroupId}:${pkgArtifactId}</artifact> - <excludes> - <exclude>**</exclude> - </excludes> - </filter> - </filters> - <promoteTransitiveDependencies>true</promoteTransitiveDependencies> - <createDependencyReducedPom>true</createDependencyReducedPom> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/428046ec/commons-httpclient-2.0.2/src/main/resources/OSGI-INF/bundle.info ---------------------------------------------------------------------- diff --git a/commons-httpclient-2.0.2/src/main/resources/OSGI-INF/bundle.info b/commons-httpclient-2.0.2/src/main/resources/OSGI-INF/bundle.info deleted file mode 100644 index 68579ad..0000000 --- a/commons-httpclient-2.0.2/src/main/resources/OSGI-INF/bundle.info +++ /dev/null @@ -1,19 +0,0 @@ -\u001B[1mSYNOPSIS\u001B[0m - ${project.description} - - Original Maven URL: - \u001B[33mmvn:${pkgGroupId}/${pkgArtifactId}/${pkgVersion}\u001B[0m - -\u001B[1mDESCRIPTION\u001B[0m - The Hyper-Text Transfer Protocol (HTTP) is perhaps the most significant protocol used on the Internet today. - Web services, network-enabled appliances and the growth of network computing continue to expand the role of - the HTTP protocol beyond user-driven web browsers, while increasing the number of applications that require - HTTP support. - - Designed for extension while providing robust support for the base HTTP protocol, the HttpComponents may be - of interest to anyone building HTTP-aware client and server applications such as web browsers, web spiders, - HTTP proxies, web service transport libraries, or systems that leverage or extend the HTTP protocol for - distributed communication. - -\u001B[1mSEE ALSO\u001B[0m - \u001B[36mhttp://hc.apache.org/\u001B[0m http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/428046ec/commons-io-1.3.2/pom.xml ---------------------------------------------------------------------- diff --git a/commons-io-1.3.2/pom.xml b/commons-io-1.3.2/pom.xml deleted file mode 100644 index 82a9f85..0000000 --- a/commons-io-1.3.2/pom.xml +++ /dev/null @@ -1,102 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.bundles</groupId> - <artifactId>bundles-pom</artifactId> - <version>9-SNAPSHOT</version> - <relativePath>../bundles-pom/pom.xml</relativePath> - </parent> - - <groupId>org.apache.servicemix.bundles</groupId> - <artifactId>org.apache.servicemix.bundles.commons-io</artifactId> - <version>1.3.2_6-SNAPSHOT</version> - <packaging>bundle</packaging> - <name>Apache ServiceMix :: Bundles :: ${pkgArtifactId}</name> - <description>This OSGi bundle wraps ${pkgArtifactId} ${pkgVersion} jar file.</description> - - <properties> - <pkgGroupId>commons-io</pkgGroupId> - <pkgArtifactId>commons-io</pkgArtifactId> - <pkgVersion>1.3.2</pkgVersion> - <servicemix.osgi.export.pkg> - org.apache.commons.io - </servicemix.osgi.export.pkg> - <servicemix.osgi.import.pkg> - - </servicemix.osgi.import.pkg> - </properties> - - <dependencies> - <dependency> - <groupId>${pkgGroupId}</groupId> - <artifactId>${pkgArtifactId}</artifactId> - <version>${pkgVersion}</version> - <optional>true</optional> - </dependency> - - <!-- sources --> - <dependency> - <groupId>${pkgGroupId}</groupId> - <artifactId>${pkgArtifactId}</artifactId> - <version>${pkgVersion}</version> - <classifier>sources</classifier> - <optional>true</optional> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <artifactSet> - <includes> - <include>${pkgGroupId}:${pkgArtifactId}</include> - </includes> - </artifactSet> - <filters> - <filter> - <artifact>${pkgGroupId}:${pkgArtifactId}</artifact> - <excludes> - <exclude>**</exclude> - </excludes> - </filter> - </filters> - <promoteTransitiveDependencies>true</promoteTransitiveDependencies> - <createDependencyReducedPom>true</createDependencyReducedPom> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/428046ec/commons-io-1.3.2/src/main/resources/OSGI-INF/bundle.info ---------------------------------------------------------------------- diff --git a/commons-io-1.3.2/src/main/resources/OSGI-INF/bundle.info b/commons-io-1.3.2/src/main/resources/OSGI-INF/bundle.info deleted file mode 100644 index 2b5b6b9..0000000 --- a/commons-io-1.3.2/src/main/resources/OSGI-INF/bundle.info +++ /dev/null @@ -1,20 +0,0 @@ -\u001B[1mSYNOPSIS\u001B[0m - ${project.description} - - Original Maven URL: - \u001B[33mmvn:${pkgGroupId}/${pkgArtifactId}/${pkgVersion}\u001B[0m - -\u001B[1mDESCRIPTION\u001B[0m - Commons IO is a library of utilities to assist with developing IO functionality. - - There are six main areas included: - - * Utility classes - with static methods to perform common tasks - * Input - useful Input Stream and Reader implementations - * Output - useful Output Stream and Writer implementations - * Filters - various implementations of file filters - * Comparators - various implementations of java.util.Comparator for files - * File Monitor - a component for monitoring file system events - -\u001B[1mSEE ALSO\u001B[0m - \u001B[36mhttp://commons.apache.org/io/\u001B[0m http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/428046ec/commons-jxpath-1.2/pom.xml ---------------------------------------------------------------------- diff --git a/commons-jxpath-1.2/pom.xml b/commons-jxpath-1.2/pom.xml deleted file mode 100644 index 50860fe..0000000 --- a/commons-jxpath-1.2/pom.xml +++ /dev/null @@ -1,109 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.bundles</groupId> - <artifactId>bundles-pom</artifactId> - <version>9-SNAPSHOT</version> - <relativePath>../bundles-pom/pom.xml</relativePath> - </parent> - - <groupId>org.apache.servicemix.bundles</groupId> - <artifactId>org.apache.servicemix.bundles.commons-jxpath</artifactId> - <version>1.2_6-SNAPSHOT</version> - <packaging>bundle</packaging> - <name>Apache ServiceMix :: Bundles :: ${pkgArtifactId}</name> - <description>This OSGi bundle wraps ${pkgArtifactId} ${pkgVersion} jar file.</description> - - <properties> - <pkgGroupId>commons-jxpath</pkgGroupId> - <pkgArtifactId>commons-jxpath</pkgArtifactId> - <pkgVersion>1.2</pkgVersion> - <servicemix.osgi.export.pkg> - org.apache.commons.jxpath - </servicemix.osgi.export.pkg> - <servicemix.osgi.import.pkg> - javax.xml*, - org.w3c.dom, - org.apache.commons.beanutils*;version="[1.4,2)", - javax.servlet*;resolution:=optional;version="[2.2,3)", - org.jdom*;resolution:=optional;version="[1.0,2)" - </servicemix.osgi.import.pkg> - <servicemix.osgi.failok>true</servicemix.osgi.failok> - </properties> - - <dependencies> - <dependency> - <groupId>${pkgGroupId}</groupId> - <artifactId>${pkgArtifactId}</artifactId> - <version>${pkgVersion}</version> - <optional>true</optional> - </dependency> - - <!-- sources --> - <!-- Not available on Central - <dependency> - <groupId>${pkgGroupId}</groupId> - <artifactId>${pkgArtifactId}</artifactId> - <version>${pkgVersion}</version> - <classifier>sources</classifier> - <optional>true</optional> - </dependency> - --> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <artifactSet> - <includes> - <include>${pkgGroupId}:${pkgArtifactId}</include> - </includes> - </artifactSet> - <filters> - <filter> - <artifact>${pkgGroupId}:${pkgArtifactId}</artifact> - <excludes> - <exclude>**</exclude> - </excludes> - </filter> - </filters> - <promoteTransitiveDependencies>true</promoteTransitiveDependencies> - <createDependencyReducedPom>true</createDependencyReducedPom> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/428046ec/commons-jxpath-1.2/src/main/resources/OSGI-INF/bundle.info ---------------------------------------------------------------------- diff --git a/commons-jxpath-1.2/src/main/resources/OSGI-INF/bundle.info b/commons-jxpath-1.2/src/main/resources/OSGI-INF/bundle.info deleted file mode 100644 index f1a3838..0000000 --- a/commons-jxpath-1.2/src/main/resources/OSGI-INF/bundle.info +++ /dev/null @@ -1,43 +0,0 @@ -\u001B[1mSYNOPSIS\u001B[0m - ${project.description} - - Original Maven URL: - \u001B[33mmvn:${pkgGroupId}/${pkgArtifactId}/${pkgVersion}\u001B[0m - -\u001B[1mDESCRIPTION\u001B[0m - The org.apache.commons.jxpath package defines a simple interpreter of an expression language called XPath. - JXPath applies XPath expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet contexts, - DOM etc, including mixtures thereof. - - Consider this example: - - \u001B[32mAddress address = (Address)JXPathContext.newContext(vendor).\u001B[0m - \u001B[32mgetValue("locations[address/zipCode='90210']/address");\u001B[0m - - This XPath expression is equivalent to the following Java code: - - \u001B[32mAddress address = null;\u001B[0m - \u001B[32mCollection locations = vendor.getLocations();\u001B[0m - \u001B[32mIterator it = locations.iterator();\u001B[0m - \u001B[32mwhile (it.hasNext()){\u001B[0m - \u001B[32mLocation location = (Location)it.next();\u001B[0m - \u001B[32mString zipCode = location.getAddress().getZipCode();\u001B[0m - \u001B[32mif (zipCode.equals("90210")){\u001B[0m - \u001B[32maddress = location.getAddress();\u001B[0m - \u001B[32mbreak;\u001B[0m - \u001B[32m}\u001B[0m - \u001B[32m}\u001B[0m - - XPath was standardized by W3C and is used in both XSLT and XPointer. - - If you want to find out more about XPath, a good place to start is an excellent XPath Tutorial by W3Schools - - The official definition of XPath by W3C can be found at XML Path Language (XPath) Version 1.0 - - Primary applications of JXPath are in scripting: JSP and similar template/script based technologies. - However, programmers who prefer XML-flavored APIs, should consider JXPath as an alternative to other - expression languages as well. JXPath is a must-have tool for those who work with mixtures of Java objects - and XML and need to frequently traverse through graphs of those. - -\u001B[1mSEE ALSO\u001B[0m - \u001B[36mhttp://commons.apache.org/jxpath/\u001B[0m http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/428046ec/commons-pool-1.4/pom.xml ---------------------------------------------------------------------- diff --git a/commons-pool-1.4/pom.xml b/commons-pool-1.4/pom.xml deleted file mode 100644 index 9a6242e..0000000 --- a/commons-pool-1.4/pom.xml +++ /dev/null @@ -1,102 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.bundles</groupId> - <artifactId>bundles-pom</artifactId> - <version>9-SNAPSHOT</version> - <relativePath>../bundles-pom/pom.xml</relativePath> - </parent> - - <groupId>org.apache.servicemix.bundles</groupId> - <artifactId>org.apache.servicemix.bundles.commons-pool</artifactId> - <version>1.4_4-SNAPSHOT</version> - <packaging>bundle</packaging> - <name>Apache ServiceMix :: Bundles :: ${pkgArtifactId}</name> - <description>This OSGi bundle wraps ${pkgArtifactId} ${pkgVersion} jar file.</description> - - <properties> - <pkgGroupId>commons-pool</pkgGroupId> - <pkgArtifactId>commons-pool</pkgArtifactId> - <pkgVersion>1.4</pkgVersion> - <servicemix.osgi.export.pkg> - org.apache.commons.pool - </servicemix.osgi.export.pkg> - <servicemix.osgi.import.pkg> - - </servicemix.osgi.import.pkg> - </properties> - - <dependencies> - <dependency> - <groupId>${pkgGroupId}</groupId> - <artifactId>${pkgArtifactId}</artifactId> - <version>${pkgVersion}</version> - <optional>true</optional> - </dependency> - - <!-- sources --> - <dependency> - <groupId>${pkgGroupId}</groupId> - <artifactId>${pkgArtifactId}</artifactId> - <version>${pkgVersion}</version> - <classifier>sources</classifier> - <optional>true</optional> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <artifactSet> - <includes> - <include>${pkgGroupId}:${pkgArtifactId}</include> - </includes> - </artifactSet> - <filters> - <filter> - <artifact>${pkgGroupId}:${pkgArtifactId}</artifact> - <excludes> - <exclude>**</exclude> - </excludes> - </filter> - </filters> - <promoteTransitiveDependencies>true</promoteTransitiveDependencies> - <createDependencyReducedPom>true</createDependencyReducedPom> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/428046ec/commons-pool-1.4/src/main/resources/OSGI-INF/bundle.info ---------------------------------------------------------------------- diff --git a/commons-pool-1.4/src/main/resources/OSGI-INF/bundle.info b/commons-pool-1.4/src/main/resources/OSGI-INF/bundle.info deleted file mode 100644 index 7d2755a..0000000 --- a/commons-pool-1.4/src/main/resources/OSGI-INF/bundle.info +++ /dev/null @@ -1,16 +0,0 @@ -\u001B[1mSYNOPSIS\u001B[0m - ${project.description} - - Original Maven URL: - \u001B[33mmvn:${pkgGroupId}/${pkgArtifactId}/${pkgVersion}\u001B[0m - -\u001B[1mDESCRIPTION\u001B[0m - Pool provides an Object-pooling API, with three major aspects: - - 1. A generic object pool interface that clients and implementors can use to provide easily - interchangable pooling implementations. - 2. A toolkit for creating modular object pools. - 3. Several general purpose pool implementations. - -\u001B[1mSEE ALSO\u001B[0m - \u001B[36mhttp://commons.apache.org/pool/\u001B[1m http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/428046ec/concurrent-1.3.1/pom.xml ---------------------------------------------------------------------- diff --git a/concurrent-1.3.1/pom.xml b/concurrent-1.3.1/pom.xml deleted file mode 100644 index 9136917..0000000 --- a/concurrent-1.3.1/pom.xml +++ /dev/null @@ -1,101 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.bundles</groupId> - <artifactId>bundles-pom</artifactId> - <version>10</version> - <relativePath>../bundles-pom/pom.xml</relativePath> - </parent> - - <groupId>org.apache.servicemix.bundles</groupId> - <artifactId>org.apache.servicemix.bundles.concurrent</artifactId> - <version>1.3.1_2-SNAPSHOT</version> - <packaging>bundle</packaging> - <name>Apache ServiceMix :: Bundles :: ${pkgArtifactId}</name> - <description>This OSGi bundle wraps ${pkgArtifactId} ${pkgVersion} jar file.</description> - - <properties> - <pkgGroupId>concurrent</pkgGroupId> - <pkgArtifactId>concurrent</pkgArtifactId> - <pkgVersion>1.3.1</pkgVersion> - <servicemix.osgi.export.pkg> - EDU.oswego.cs.dl.util.concurrent - </servicemix.osgi.export.pkg> - <servicemix.osgi.import.pkg> - - </servicemix.osgi.import.pkg> - </properties> - - <dependencies> - <dependency> - <groupId>${pkgGroupId}</groupId> - <artifactId>${pkgArtifactId}</artifactId> - <version>${pkgVersion}</version> - </dependency> - - <!-- sources --> - <!-- - <dependency> - <groupId>${pkgGroupId}</groupId> - <artifactId>${pkgArtifactId}</artifactId> - <version>${pkgVersion}</version> - <classifier>sources</classifier> - </dependency> - --> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <artifactSet> - <includes> - <include>${pkgGroupId}:${pkgArtifactId}</include> - </includes> - </artifactSet> - <filters> - <filter> - <artifact>${pkgGroupId}:${pkgArtifactId}</artifact> - <excludes> - <exclude>**</exclude> - </excludes> - </filter> - </filters> - <promoteTransitiveDependencies>true</promoteTransitiveDependencies> - <createDependencyReducedPom>true</createDependencyReducedPom> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/428046ec/concurrent-1.3.1/src/main/resources/OSGI-INF/bundle.info ---------------------------------------------------------------------- diff --git a/concurrent-1.3.1/src/main/resources/OSGI-INF/bundle.info b/concurrent-1.3.1/src/main/resources/OSGI-INF/bundle.info deleted file mode 100644 index 284e582..0000000 --- a/concurrent-1.3.1/src/main/resources/OSGI-INF/bundle.info +++ /dev/null @@ -1,27 +0,0 @@ -\u001B[1mSYNOPSIS\u001B[0m - ${project.description} - - Original Maven URL: - \u001B[33mmvn:${pkgGroupId}/${pkgArtifactId}/${pkgVersion}\u001B[0m - -\u001B[1mDESCRIPTION\u001B[0m - This package provides standardized, efficient versions of utility classes commonly - encountered in concurrent Java programming. This code consists of implementations of - ideas that have been around for ages, and is merely intended to save you the trouble - of coding them. Discussions of the rationale and applications of several of these - classes can be found in the second edition of Concurrent Programming in Java. There - are also pdf slides providing an overview of the package. - - The package mainly consists of implementations of a few interfaces: - - Sync -- locks, conditions - Channel -- queues, buffers - Barrier -- multi-party synchronization - SynchronizedVariable -- atomic ints, refs etc - java.util.Collection -- collections - Executor -- replacements for direct use of Thread - - Plus some utilities and frameworks that build upon these. - -\u001B[1mSEE ALSO\u001B[0m - \u001B[36mhttp://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html\u001B[0m http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/428046ec/concurrent-1.3.2/pom.xml ---------------------------------------------------------------------- diff --git a/concurrent-1.3.2/pom.xml b/concurrent-1.3.2/pom.xml deleted file mode 100644 index c611005..0000000 --- a/concurrent-1.3.2/pom.xml +++ /dev/null @@ -1,101 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.bundles</groupId> - <artifactId>bundles-pom</artifactId> - <version>10</version> - <relativePath>../bundles-pom/pom.xml</relativePath> - </parent> - - <groupId>org.apache.servicemix.bundles</groupId> - <artifactId>org.apache.servicemix.bundles.concurrent</artifactId> - <version>1.3.2_2-SNAPSHOT</version> - <packaging>bundle</packaging> - <name>Apache ServiceMix :: Bundles :: ${pkgArtifactId}</name> - <description>This OSGi bundle wraps ${pkgArtifactId} ${pkgVersion} jar file.</description> - - <properties> - <pkgGroupId>concurrent</pkgGroupId> - <pkgArtifactId>concurrent</pkgArtifactId> - <pkgVersion>1.3.2</pkgVersion> - <servicemix.osgi.export.pkg> - EDU.oswego.cs.dl.util.concurrent - </servicemix.osgi.export.pkg> - <servicemix.osgi.import.pkg> - - </servicemix.osgi.import.pkg> - </properties> - - <dependencies> - <dependency> - <groupId>${pkgGroupId}</groupId> - <artifactId>${pkgArtifactId}</artifactId> - <version>${pkgVersion}</version> - </dependency> - - <!-- sources --> - <!-- - <dependency> - <groupId>${pkgGroupId}</groupId> - <artifactId>${pkgArtifactId}</artifactId> - <version>${pkgVersion}</version> - <classifier>sources</classifier> - </dependency> - --> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <artifactSet> - <includes> - <include>${pkgGroupId}:${pkgArtifactId}</include> - </includes> - </artifactSet> - <filters> - <filter> - <artifact>${pkgGroupId}:${pkgArtifactId}</artifact> - <excludes> - <exclude>**</exclude> - </excludes> - </filter> - </filters> - <promoteTransitiveDependencies>true</promoteTransitiveDependencies> - <createDependencyReducedPom>true</createDependencyReducedPom> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/428046ec/concurrent-1.3.2/src/main/resources/OSGI-INF/bundle.info ---------------------------------------------------------------------- diff --git a/concurrent-1.3.2/src/main/resources/OSGI-INF/bundle.info b/concurrent-1.3.2/src/main/resources/OSGI-INF/bundle.info deleted file mode 100644 index 284e582..0000000 --- a/concurrent-1.3.2/src/main/resources/OSGI-INF/bundle.info +++ /dev/null @@ -1,27 +0,0 @@ -\u001B[1mSYNOPSIS\u001B[0m - ${project.description} - - Original Maven URL: - \u001B[33mmvn:${pkgGroupId}/${pkgArtifactId}/${pkgVersion}\u001B[0m - -\u001B[1mDESCRIPTION\u001B[0m - This package provides standardized, efficient versions of utility classes commonly - encountered in concurrent Java programming. This code consists of implementations of - ideas that have been around for ages, and is merely intended to save you the trouble - of coding them. Discussions of the rationale and applications of several of these - classes can be found in the second edition of Concurrent Programming in Java. There - are also pdf slides providing an overview of the package. - - The package mainly consists of implementations of a few interfaces: - - Sync -- locks, conditions - Channel -- queues, buffers - Barrier -- multi-party synchronization - SynchronizedVariable -- atomic ints, refs etc - java.util.Collection -- collections - Executor -- replacements for direct use of Thread - - Plus some utilities and frameworks that build upon these. - -\u001B[1mSEE ALSO\u001B[0m - \u001B[36mhttp://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html\u001B[0m
