org.broadleafcommerce.openadmin.server.service.persistence.entitymanager.pool
Class DefaultEntityManagerPool

java.lang.Object
  extended by org.apache.commons.pool.BaseObjectPool
      extended by org.apache.commons.pool.impl.GenericObjectPool
          extended by org.broadleafcommerce.openadmin.server.service.persistence.entitymanager.pool.DefaultEntityManagerPool
All Implemented Interfaces:
org.apache.commons.pool.ObjectPool, org.springframework.context.ApplicationContextAware

public class DefaultEntityManagerPool
extends org.apache.commons.pool.impl.GenericObjectPool
implements org.springframework.context.ApplicationContextAware

Created by IntelliJ IDEA. User: jfischer Date: 7/29/11 Time: 1:34 PM To change this template use File | Settings | File Templates.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.commons.pool.impl.GenericObjectPool
org.apache.commons.pool.impl.GenericObjectPool.Config
 
Field Summary
protected  String mySharedEntityManagerBeanRef
           
protected  org.apache.commons.pool.impl.GenericObjectPool sandboxPool
           
 
Fields inherited from class org.apache.commons.pool.impl.GenericObjectPool
DEFAULT_LIFO, DEFAULT_MAX_ACTIVE, DEFAULT_MAX_IDLE, DEFAULT_MAX_WAIT, DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS, DEFAULT_MIN_IDLE, DEFAULT_NUM_TESTS_PER_EVICTION_RUN, DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS, DEFAULT_TEST_ON_BORROW, DEFAULT_TEST_ON_RETURN, DEFAULT_TEST_WHILE_IDLE, DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS, DEFAULT_WHEN_EXHAUSTED_ACTION, WHEN_EXHAUSTED_BLOCK, WHEN_EXHAUSTED_FAIL, WHEN_EXHAUSTED_GROW
 
Constructor Summary
DefaultEntityManagerPool()
           
 
Method Summary
 Object borrowObject()
           
 int getMaxActive()
           
 int getMaxIdle()
           
 long getMaxWait()
           
 long getMinEvictableIdleTimeMillis()
           
 int getMinIdle()
           
 String getMySharedEntityManagerBeanRef()
           
 int getNumActive()
           
 boolean getTestOnBorrow()
           
 boolean getTestOnReturn()
           
 boolean getTestWhileIdle()
           
 long getTimeBetweenEvictionRunsMillis()
           
 byte getWhenExhaustedAction()
           
 void invalidateObject(Object obj)
           
 void returnObject(Object obj)
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setMaxActive(int maxActive)
           
 void setMaxIdle(int maxIdle)
           
 void setMaxWait(long maxWait)
           
 void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
           
 void setMinIdle(int minIdle)
           
 void setMySharedEntityManagerBeanRef(String mySharedEntityManagerBeanRef)
           
 void setTestOnBorrow(boolean testOnBorrow)
           
 void setTestOnReturn(boolean testOnReturn)
           
 void setTestWhileIdle(boolean testWhileIdle)
           
 void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
           
 void setWhenExhaustedAction(byte whenExhaustedAction)
           
 
Methods inherited from class org.apache.commons.pool.impl.GenericObjectPool
addObject, clear, close, evict, getLifo, getNumIdle, getNumTestsPerEvictionRun, getSoftMinEvictableIdleTimeMillis, setConfig, setFactory, setLifo, setNumTestsPerEvictionRun, setSoftMinEvictableIdleTimeMillis, startEvictor
 
Methods inherited from class org.apache.commons.pool.BaseObjectPool
assertOpen, isClosed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mySharedEntityManagerBeanRef

protected String mySharedEntityManagerBeanRef

sandboxPool

protected org.apache.commons.pool.impl.GenericObjectPool sandboxPool
Constructor Detail

DefaultEntityManagerPool

public DefaultEntityManagerPool()
Method Detail

invalidateObject

public void invalidateObject(Object obj)
                      throws Exception
Specified by:
invalidateObject in interface org.apache.commons.pool.ObjectPool
Overrides:
invalidateObject in class org.apache.commons.pool.impl.GenericObjectPool
Throws:
Exception

borrowObject

public Object borrowObject()
                    throws Exception
Specified by:
borrowObject in interface org.apache.commons.pool.ObjectPool
Overrides:
borrowObject in class org.apache.commons.pool.impl.GenericObjectPool
Throws:
Exception

getMaxActive

public int getMaxActive()
Overrides:
getMaxActive in class org.apache.commons.pool.impl.GenericObjectPool

getMaxIdle

public int getMaxIdle()
Overrides:
getMaxIdle in class org.apache.commons.pool.impl.GenericObjectPool

getMaxWait

public long getMaxWait()
Overrides:
getMaxWait in class org.apache.commons.pool.impl.GenericObjectPool

getMinEvictableIdleTimeMillis

public long getMinEvictableIdleTimeMillis()
Overrides:
getMinEvictableIdleTimeMillis in class org.apache.commons.pool.impl.GenericObjectPool

getMinIdle

public int getMinIdle()
Overrides:
getMinIdle in class org.apache.commons.pool.impl.GenericObjectPool

getNumActive

public int getNumActive()
Specified by:
getNumActive in interface org.apache.commons.pool.ObjectPool
Overrides:
getNumActive in class org.apache.commons.pool.impl.GenericObjectPool

getTestOnBorrow

public boolean getTestOnBorrow()
Overrides:
getTestOnBorrow in class org.apache.commons.pool.impl.GenericObjectPool

getTestOnReturn

public boolean getTestOnReturn()
Overrides:
getTestOnReturn in class org.apache.commons.pool.impl.GenericObjectPool

getTestWhileIdle

public boolean getTestWhileIdle()
Overrides:
getTestWhileIdle in class org.apache.commons.pool.impl.GenericObjectPool

getTimeBetweenEvictionRunsMillis

public long getTimeBetweenEvictionRunsMillis()
Overrides:
getTimeBetweenEvictionRunsMillis in class org.apache.commons.pool.impl.GenericObjectPool

getWhenExhaustedAction

public byte getWhenExhaustedAction()
Overrides:
getWhenExhaustedAction in class org.apache.commons.pool.impl.GenericObjectPool

returnObject

public void returnObject(Object obj)
                  throws Exception
Specified by:
returnObject in interface org.apache.commons.pool.ObjectPool
Overrides:
returnObject in class org.apache.commons.pool.impl.GenericObjectPool
Throws:
Exception

setMaxActive

public void setMaxActive(int maxActive)
Overrides:
setMaxActive in class org.apache.commons.pool.impl.GenericObjectPool

setMaxIdle

public void setMaxIdle(int maxIdle)
Overrides:
setMaxIdle in class org.apache.commons.pool.impl.GenericObjectPool

setMaxWait

public void setMaxWait(long maxWait)
Overrides:
setMaxWait in class org.apache.commons.pool.impl.GenericObjectPool

setMinEvictableIdleTimeMillis

public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
Overrides:
setMinEvictableIdleTimeMillis in class org.apache.commons.pool.impl.GenericObjectPool

setMinIdle

public void setMinIdle(int minIdle)
Overrides:
setMinIdle in class org.apache.commons.pool.impl.GenericObjectPool

setTestOnBorrow

public void setTestOnBorrow(boolean testOnBorrow)
Overrides:
setTestOnBorrow in class org.apache.commons.pool.impl.GenericObjectPool

setTestOnReturn

public void setTestOnReturn(boolean testOnReturn)
Overrides:
setTestOnReturn in class org.apache.commons.pool.impl.GenericObjectPool

setTestWhileIdle

public void setTestWhileIdle(boolean testWhileIdle)
Overrides:
setTestWhileIdle in class org.apache.commons.pool.impl.GenericObjectPool

setTimeBetweenEvictionRunsMillis

public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
Overrides:
setTimeBetweenEvictionRunsMillis in class org.apache.commons.pool.impl.GenericObjectPool

setWhenExhaustedAction

public void setWhenExhaustedAction(byte whenExhaustedAction)
Overrides:
setWhenExhaustedAction in class org.apache.commons.pool.impl.GenericObjectPool

getMySharedEntityManagerBeanRef

public String getMySharedEntityManagerBeanRef()

setMySharedEntityManagerBeanRef

public void setMySharedEntityManagerBeanRef(String mySharedEntityManagerBeanRef)

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException


Copyright © 2012. All Rights Reserved.