Discussion:
Increase JOnAS-EJB / EasyBeans Pool Timeout ? (avoid org.ow2.util.pool.impl.enhanced.api.TimeoutPoolException)
Hans J. Prueller
2011-09-07 15:10:34 UTC
Permalink
Hi all,

it seems that sometimes when I am working and testing our JOnAS 5.2
based EAR on a slow machine or the machine is under heavy load,
several org.ow2.util.pool.impl.enhanced.api.TimeoutPoolException are
occuring during startup / initialisation of the application.

(the app is initialized by doing some EJB calls in a servlet init()
method after deployment)

Is there a way to increase this timeout to a larger value on our dev
machines to avoid above error ?


regards,
Hans
Florent BENOIT
2011-09-07 15:55:20 UTC
Permalink
Hi,

You may use -Deasybeans.useSimplePool=true in JAVA_OPTS/JONAS_OPTS so
that you'll get previous pool which is using lazy mode and do not
populate the pool with an init size.

Also, with @PoolConfiguration or <pool> element in
META-INF/easybeans.xml, you can tune the size of the pool with the
timeout value that you're expecting

Regards,

Florent
Post by Hans J. Prueller
Hi all,
it seems that sometimes when I am working and testing our JOnAS 5.2
based EAR on a slow machine or the machine is under heavy load,
several org.ow2.util.pool.impl.enhanced.api.TimeoutPoolException are
occuring during startup / initialisation of the application.
(the app is initialized by doing some EJB calls in a servlet init()
method after deployment)
Is there a way to increase this timeout to a larger value on our dev
machines to avoid above error ?
regards,
Hans
Hans J. Prueller
2011-09-07 18:34:52 UTC
Permalink
Thanks Florent !

I will give it a try and keep you updated.

Can you tell me the default value for the timeout ? (so I can set a
useful larger value for my tests)

regards,
Hans
Post by Florent BENOIT
Hi,
You may use -Deasybeans.useSimplePool=true in JAVA_OPTS/JONAS_OPTS so
that you'll get previous pool which is using lazy mode and do not
populate the pool with an init size.
META-INF/easybeans.xml, you can tune the size of the pool with the
timeout value that you're expecting
Regards,
Florent
Post by Hans J. Prueller
Hi all,
it seems that sometimes when I am working and testing our JOnAS 5.2
based EAR on a slow machine or the machine is under heavy load,
several org.ow2.util.pool.impl.enhanced.api.TimeoutPoolException are
occuring during startup / initialisation of the application.
(the app is initialized by doing some EJB calls in a servlet init()
method after deployment)
Is there a way to increase this timeout to a larger value on our dev
machines to avoid above error ?
regards,
Hans
Florent BENOIT
2011-09-08 14:10:48 UTC
Permalink
Default timeout is 10seconds in IPoolConfiguration interface class

Regards,

Florent
Post by Hans J. Prueller
Thanks Florent !
I will give it a try and keep you updated.
Can you tell me the default value for the timeout ? (so I can set a
useful larger value for my tests)
regards,
Hans
Post by Florent BENOIT
Hi,
You may use -Deasybeans.useSimplePool=true in JAVA_OPTS/JONAS_OPTS so
that you'll get previous pool which is using lazy mode and do not
populate the pool with an init size.
META-INF/easybeans.xml, you can tune the size of the pool with the
timeout value that you're expecting
Regards,
Florent
Post by Hans J. Prueller
Hi all,
it seems that sometimes when I am working and testing our JOnAS 5.2
based EAR on a slow machine or the machine is under heavy load,
several org.ow2.util.pool.impl.enhanced.api.TimeoutPoolException are
occuring during startup / initialisation of the application.
(the app is initialized by doing some EJB calls in a servlet init()
method after deployment)
Is there a way to increase this timeout to a larger value on our dev
machines to avoid above error ?
regards,
Hans
Hans J. Prueller
2011-09-07 18:49:44 UTC
Permalink
Hi again,

I was curious about setting the timeout value and gave it a try by just
setting it to 5 seconds (guess the value to be set is in millis):

@Pool (timeout=5000)

the problem ist, that I now get a ClassCastException when deploying the
EAR:

Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast
to java.lang.Integer
at
org.ow2.util.pool.impl.visitor.PoolVisitor.visit(PoolVisitor.java:122)
at
org.ow2.util.scan.impl.ScanAnnotationVisitor.visit(ScanAnnotationVisitor.java:66)

looks like abug in annotation processing or did I set something
wrong ???

regards,
Hans
Post by Florent BENOIT
Hi,
You may use -Deasybeans.useSimplePool=true in JAVA_OPTS/JONAS_OPTS so
that you'll get previous pool which is using lazy mode and do not
populate the pool with an init size.
META-INF/easybeans.xml, you can tune the size of the pool with the
timeout value that you're expecting
Regards,
Florent
Post by Hans J. Prueller
Hi all,
it seems that sometimes when I am working and testing our JOnAS 5.2
based EAR on a slow machine or the machine is under heavy load,
several org.ow2.util.pool.impl.enhanced.api.TimeoutPoolException are
occuring during startup / initialisation of the application.
(the app is initialized by doing some EJB calls in a servlet init()
method after deployment)
Is there a way to increase this timeout to a larger value on our dev
machines to avoid above error ?
regards,
Hans
Florent BENOIT
2011-09-08 14:11:16 UTC
Permalink
Maybe a bug, could you open a JIRA issue ?

Regards,

Florent
Post by Hans J. Prueller
Hi again,
I was curious about setting the timeout value and gave it a try by
@Pool (timeout=5000)
the problem ist, that I now get a ClassCastException when deploying
Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast
to java.lang.Integer
at org.ow2.util.pool.impl.visitor.PoolVisitor.visit(PoolVisitor.java:122)
at
org.ow2.util.scan.impl.ScanAnnotationVisitor.visit(ScanAnnotationVisitor.java:66)
looks like abug in annotation processing or did I set something wrong ???
regards,
Hans
Post by Florent BENOIT
Hi,
You may use -Deasybeans.useSimplePool=true in JAVA_OPTS/JONAS_OPTS so
that you'll get previous pool which is using lazy mode and do not
populate the pool with an init size.
META-INF/easybeans.xml, you can tune the size of the pool with the
timeout value that you're expecting
Regards,
Florent
Post by Hans J. Prueller
Hi all,
it seems that sometimes when I am working and testing our JOnAS 5.2
based EAR on a slow machine or the machine is under heavy load,
several org.ow2.util.pool.impl.enhanced.api.TimeoutPoolException are
occuring during startup / initialisation of the application.
(the app is initialized by doing some EJB calls in a servlet init()
method after deployment)
Is there a way to increase this timeout to a larger value on our dev
machines to avoid above error ?
regards,
Hans
Loading...