Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The EJBThreadPoolExecutor is not created when MaxPoolSize < CorePoolSize is set. #23706

Closed
kaido207 opened this issue Nov 12, 2021 · 0 comments · Fixed by #23707
Closed

The EJBThreadPoolExecutor is not created when MaxPoolSize < CorePoolSize is set. #23706

kaido207 opened this issue Nov 12, 2021 · 0 comments · Fixed by #23707

Comments

@kaido207
Copy link
Contributor

Environment Details

  • GlassFish Version (and build number): GlassFish 6.2.3
  • JDK version: OpenJDK version 11.0.12
  • OS: CentOS Linux release 7
  • Database: none

Problem Description

There is a message in the server.log when MaxPoolSize and CorePoolSize is set valid value.

[2019-10-24T15:13:35.422+0900] [glassfish 5.1] [FINE] [] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=46 _ThreadName=admin-listener(1)] [timeMillis: 1571897615422] [levelValue: 500] [CLASSNAME: com.sun.ejb.containers.EjbContainerUtilImpl] [METHODNAME: createThreadPoolExecutor] [[
  Created EjbThreadPoolExecutor with thread-core-pool-size 16 thread-max-pool-size 16 thread-keep-alive-seconds 60 thread-queue-capacity 2147483647 allow-core-thread-timeout false ]]

But there are no message as described above in the server.log when MaxPoolSize < CorePoolSize is set.
Base on the source code, no message means that the EJBThreadPoolExecutor is not created.
https://github.com/eclipse-ee4j/glassfish/blob/master/appserver/ejb/ejb-container/src/main/java/com/sun/ejb/containers/EjbContainerUtilImpl.java#L437-L481

Steps to reproduce

  1. asadmin start-domain
  2. asadmin set-log-levels javax.enterprise.system.container.ejb=FINE
  3. asadmin create-jdbc-connection-pool --datasourceclassname oracle.jdbc.pool.OracleConnectionPoolDataSource test
  4. asadmin create-jdbc-resource --connectionpoolid test testResource
  5. open web console.
  6. open server-config and open EJB Container.
  7. click Add Property twice and set the below.
  • Name: thread-core-pool-size, Value: 32
  • Name: thread-max-pool-size, Value: 16
  1. asadmin restart-domain
  2. open web console.

Impact of Issue

If it is occured, user can't use the EJBThreadPoolExecutor and lead to unexpected bugs.

kaido207 added a commit to kaido207/glassfish that referenced this issue Nov 12, 2021
… and KeepAliveSeconds.

Signed-off-by: kaido207 <kaido.hiroki@fujitsu.com>
hs536 added a commit that referenced this issue Nov 15, 2021
Fix #23706 Add validation about CorePoolSize, MaxPoolSize and KeepAliveSeconds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant