You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Nocker <li...@gmail.com> on 2016/02/11 00:11:39 UTC

Stateless Session Bean pool limit error

Hi,

Im using TomEE 1.6.0+
I have a few REST webservices that interact with database via Hibernate
entity injection.
To enable the entity injection I'v added @Stateless to the class.
This has been working perfectly for about 2 years, recently we have had an
additional 20,000 users added to the system and I'm now getting an error:
org.apache.cxf.interceptor.Fault: No instances available in Stateless
Session Bean pool. Waited 30 SECONDS while invoking public....

In trying to fix the issue Iv been trying to learn about @Stateless and
@Singleton

Iv read http://tomee.apache.org/statelesscontainer-config.html

Does declaring a statelessContainer configuration effect all stateless beans
within the application or can I specify that only one bean has a larger
maxSize than the others?

I have about 20 stateless beans (REST WS) and not all of them are hit in the
same way, one in particular is pounded a lot harder than others.
The service that is pounded is primarily a read from database service.

For my circumstances should I be using @Singleton() with @Lock(READ)?
I need this to be highly available so I don't, like the idea of locking.

Thanks
Nocker



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Stateless-Session-Bean-pool-limit-error-tp4677587.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Stateless Session Bean pool limit error

Posted by Nocker <li...@gmail.com>.
Thank Romain,
I'll give it a go.

-Nocker



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Stateless-Session-Bean-pool-limit-error-tp4677587p4677613.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Stateless Session Bean pool limit error

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

Le 11 févr. 2016 09:11, "Nocker" <li...@gmail.com> a écrit :
>
> Hi,
>
> Im using TomEE 1.6.0+
> I have a few REST webservices that interact with database via Hibernate
> entity injection.
> To enable the entity injection I'v added @Stateless to the class.
> This has been working perfectly for about 2 years, recently we have had an
> additional 20,000 users added to the system and I'm now getting an error:
> org.apache.cxf.interceptor.Fault: No instances available in Stateless
> Session Bean pool. Waited 30 SECONDS while invoking public....
>
> In trying to fix the issue Iv been trying to learn about @Stateless and
> @Singleton
>
> Iv read http://tomee.apache.org/statelesscontainer-config.html
>
> Does declaring a statelessContainer configuration effect all stateless
beans
> within the application or can I specify that only one bean has a larger
> maxSize than the others?
>

The first one met will be the default then you can bind one to a bean in
openejb-jar.xml using container-id.

> I have about 20 stateless beans (REST WS) and not all of them are hit in
the
> same way, one in particular is pounded a lot harder than others.
> The service that is pounded is primarily a read from database service.
>
> For my circumstances should I be using @Singleton() with @Lock(READ)?
> I need this to be highly available so I don't, like the idea of locking.
>

Or concurrencyManagement(BEAN) yes. But keep in mind then the container
will not limit the database access at all then so you can also create a
hard time for the db or hit a not enough connection issue cause database
pool sizing so ensure you adjust the whole chain and not only the place
where an exception occurs.

> Thanks
> Nocker
>
>
>
> --
> View this message in context:
http://tomee-openejb.979440.n4.nabble.com/Stateless-Session-Bean-pool-limit-error-tp4677587.html
> Sent from the TomEE Users mailing list archive at Nabble.com.