|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.openeai.OpenEaiObject
|
+--org.openeai.jms.producer.ProducerPool
The ProducerPool is a class that contains a list of producers for use by an application or command. It is very similar to a Database Connection pool in that it is filled with pre-configured and started producers when the application starts up. This is to allow developers to affect the performance of an application by adding producers to a pool relative to the amount of processing and number of threads present in the application. Since OpenEAI producers are by default thread safe, it does not do anything to limit the number of threads accessing a producer at the same time. It simply makes the number of producers producing to the same queue higher so their will be a smaller number of synchronizations occurring within the producers (when a message is produced and Session synchronization occurrs).
ProducerConfig| Field Summary |
| Fields inherited from class org.openeai.OpenEaiObject |
logger |
| Constructor Summary | |
ProducerPool()
Constructor |
|
ProducerPool(java.util.List vProducers)
|
|
| Method Summary | |
MessageProducer |
getProducer()
Returns the next producer from the pool. |
java.util.List |
getProducers()
Returns the list of OpenEAI producers associated to this pool. |
void |
setProducers(java.util.List vProducers)
Sets the list of OpenEAI producers to what's passed in. |
int |
size()
Returns the size of the pool. |
| Methods inherited from class org.openeai.OpenEaiObject |
addLog4jProperty, getAppName, getDebug, getFromAddr, getLog4jProperties, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setAppName, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ProducerPool()
public ProducerPool(java.util.List vProducers)
| Method Detail |
public final void setProducers(java.util.List vProducers)
public final java.util.List getProducers()
public final int size()
public final MessageProducer getProducer()
throws javax.jms.JMSException
If a producer is not started, it will not be returned.
javax.jms.JMSException - if no started producers can be found in the pool.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||