well the definition of cdi beans is pretty explicit: each beans are a singleton in a particular scope. So basically no pool with defaults scopes (you can still imagine your own weird scope ;).
that said, this thread is interesting but the title doesn't match anymore the content, if you want to continue maybe we should open another thread, no? *Romain Manni-Bucau* *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/3/14 James Green <[email protected]> > By comparison, are beans held in a CDI scope managed in a pool with min/max > boundaries? > > I've been trying to avoid using EJBs - probably due to seeing them being > registered at boot and my thinking that it's probably a waste of RAM when > they are idle. Right now I have @Stateless on my JAX-RS and JAX-WS classes > but use CDI on the backend. > > A repercussion of this was that @Dependant beans were being reused by the > JAX-RS classes across invocations which I hadn't appreciated would be the > case. I tried switching to @RequestScoped but something blew up. Elsewhere > an @RequestScoped bean with a constructor that had @Inject parameter also > blew up. I had to remove these quickly to get a demo up and running again > but it revealed a level of interaction complexity I had not anticipated > from skim reading what I found in examples on the web. > > > On 14 March 2013 03:59, Anthony Fryer <[email protected]> wrote: > > > +1 for Stateless Session Beans. I've never had an issue with them and > find > > them a good way to control resource utilization. The only things to keep > > in > > mind is what your min and max pool sizes are for the beans. If you make > > that match up with the number of threads, then you shouldn't have any > > threads blocking waiting for a free bean. I usually set min and max to > the > > same value since i don't see much value in having a pool shrink or grow. > > Also good to keep in mind if you inject other EJBs into an EJB, then its > > the > > EJB with the smallest pool size that could cause a thread to block. > > > > > > > > -- > > View this message in context: > > > http://openejb.979440.n4.nabble.com/ConcurrentAccessTimeoutException-tp4661288p4661516.html > > Sent from the OpenEJB User mailing list archive at Nabble.com. > > >
