Discussion:
monitoring stateless bean pool usage through JMX?
Emmanuel Touzery
2017-12-20 14:31:11 UTC
Permalink
Hello,

    I'm interested in monitoring the tomee stateless bean pool usage
through JMX. I can't find the relevant object name. I was looking at:
Emmanuel Touzery
2017-12-20 14:32:01 UTC
Permalink
Hello,

    I'm interested in monitoring the tomee stateless bean pool usage
through JMX. I can't find the relevant object name. I was looking at:

openejb.management:ObjectType=containers,DataSource=Default Stateless
Container

    But I would not find information about the current pool usage (I
would be interested in pool capacity & current usage).

    Thank you!

Emmanuel
Romain Manni-Bucau
2017-12-20 14:44:01 UTC
Permalink
Hello

did you check

openejb.management:J2EEServer=openejb,J2EEApplication=<empty>,EJBModule=app,StatelessSessionBean=TheBean,name=TheBean,j2eeType=Pool


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau>

2017-12-20 15:32 GMT+01:00 Emmanuel Touzery <
Post by Emmanuel Touzery
Hello,
I'm interested in monitoring the tomee stateless bean pool usage
openejb.management:ObjectType=containers,DataSource=Default Stateless
Container
But I would not find information about the current pool usage (I would
be interested in pool capacity & current usage).
Thank you!
Emmanuel
Emmanuel Touzery
2017-12-20 15:42:28 UTC
Permalink
Hello,

    oh so we have accounting per-stateless bean? For a stateless bean
for instance, I see:

  MaxSize = 10
  MinSize = 0
  InstancesActive = 0
  InstancesIdle = 0

    and I guess that's what interesting to me. But I didn't expect
per-bean accounting.

    Isn't that a bit coarse then, we have accounting per individual
bean, but to set the maximum for instance, we must do it app-wide,
through a container "type=STATELESS" in the tomee.xml, right?

    so in the end if i was worried that my maxSize for my stateless
container was too low... I'd have to monitor "InstancesActive" for every
stateless bean in my application? Do I understand right? And if some
stateless bean has many more instances than the others, that may mean I
should consider redesigning my application right? Or would it make sense
to raise the maxSize which will affect other stateless beans too?

    Certainly I can't poll every stateless bean in my app, too many of
them, I think it'd have a performance impact on the app.

    Thank you!

Emmanuel
Post by Romain Manni-Bucau
Hello
did you check
openejb.management:J2EEServer=openejb,J2EEApplication=<empty>,EJBModule=app,StatelessSessionBean=TheBean,name=TheBean,j2eeType=Pool
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau>
2017-12-20 15:32 GMT+01:00 Emmanuel Touzery <
Post by Emmanuel Touzery
Hello,
I'm interested in monitoring the tomee stateless bean pool usage
openejb.management:ObjectType=containers,DataSource=Default Stateless
Container
But I would not find information about the current pool usage (I would
be interested in pool capacity & current usage).
Thank you!
Emmanuel
Emmanuel Touzery
2017-12-20 15:43:25 UTC
Permalink
Post by Emmanuel Touzery
    Certainly I can't poll every stateless bean in my app, too many of
them, I think it'd have a performance impact on the app.
(I meant I can't poll the active instances through JMX)

emmanuel
Romain Manni-Bucau
2017-12-20 15:45:30 UTC
Permalink
it is per bean yes, you can poll them all at once through JMX API

now on the impl itself there are almost no case where a stateless is really
relevant today with CDI (and potentially microprofile or deltaspike
throttler) so maybe check the app really need it before adding tooling on
top of it


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau>

2017-12-20 16:43 GMT+01:00 Emmanuel Touzery <
Post by Emmanuel Touzery
Post by Emmanuel Touzery
Certainly I can't poll every stateless bean in my app, too many of
them, I think it'd have a performance impact on the app.
(I meant I can't poll the active instances through JMX)
emmanuel
Emmanuel Touzery
2017-12-20 15:54:36 UTC
Permalink
Hello,

    thank you for the advice regarding the relevance. We've had issues
where we ran out of statelesses from the pool but it was mostly due to,
for instance, overloaded SQL so the real issue what elsewhere. Still it
made us wonder whether we should consider tuning this parameter too.

    Given that it's per bean, I guess the default of 10 is likely
appropriate after all yes..

    Thank you!

Emmanuel
Post by Romain Manni-Bucau
it is per bean yes, you can poll them all at once through JMX API
now on the impl itself there are almost no case where a stateless is really
relevant today with CDI (and potentially microprofile or deltaspike
throttler) so maybe check the app really need it before adding tooling on
top of it
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau>
2017-12-20 16:43 GMT+01:00 Emmanuel Touzery <
Post by Emmanuel Touzery
Post by Emmanuel Touzery
Certainly I can't poll every stateless bean in my app, too many of
them, I think it'd have a performance impact on the app.
(I meant I can't poll the active instances through JMX)
emmanuel
Romain Manni-Bucau
2017-12-20 17:29:28 UTC
Permalink
Depends if a bean is used for all http requests or not but aligning it on
the datasource pool is a good idea
Post by Emmanuel Touzery
Hello,
thank you for the advice regarding the relevance. We've had issues
where we ran out of statelesses from the pool but it was mostly due to, for
instance, overloaded SQL so the real issue what elsewhere. Still it made us
wonder whether we should consider tuning this parameter too.
Given that it's per bean, I guess the default of 10 is likely
appropriate after all yes..
Thank you!
Emmanuel
Post by Romain Manni-Bucau
it is per bean yes, you can poll them all at once through JMX API
now on the impl itself there are almost no case where a stateless is really
relevant today with CDI (and potentially microprofile or deltaspike
throttler) so maybe check the app really need it before adding tooling on
top of it
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <
https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau>
2017-12-20 16:43 GMT+01:00 Emmanuel Touzery <
Post by Emmanuel Touzery
Certainly I can't poll every stateless bean in my app, too many of
Post by Emmanuel Touzery
them, I think it'd have a performance impact on the app.
(I meant I can't poll the active instances through JMX)
emmanuel
Loading...