[jboss-dev-forums] [Design of POJO Server] - Re: Generalizing dependency injection
adrian@jboss.org
do-not-reply at jboss.com
Thu Mar 13 12:53:02 EDT 2008
"wolfc" wrote : OFF-TOPIC :-)
|
| Suppose I have a data source pool of 100 and I have two session beans which make use of that data source. One performs the search function for end users, the other is the admin interface.
| Now I don't want to starve the data source by having 100 searchers active (and more in queue) while the admin is waiting to get anything done. So search bean will be pool limited to 75 and admin will receive similar treatment.
| I say EJB 3 is all about resource management. :-)
What you are describing is called "flow control". You can do it outside an EJB
with an aspect, e.g. a semaphore controlling access to a singleton.
If the semaphore/pool uses priority queuing the admin request
can "jump the queue" based on a higher privilege.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4136390#4136390
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4136390
More information about the jboss-dev-forums
mailing list