[JBoss JIRA] (WFLY-13661) Assignment of default bean instance pools for MDBs and SLSBs is unclear
by Richard Achmatowicz (Jira)
[ https://issues.redhat.com/browse/WFLY-13661?page=com.atlassian.jira.plugi... ]
Richard Achmatowicz updated WFLY-13661:
---------------------------------------
Description:
SLSB and MDB deployments benefit from bean instance pools, a pool of stateless beans of a given type which can be used to handle incoming requests. Bean deployments can be configured to use specific bean instance pools for the bean type, default bean instance pools for the bean type or no instance pool.
The configuration of default bean instance pools is achieved at the service level by associating a default bean instance pool service name (e.g. jboss.ejb.pool.default-slsb) with an existing bean instance pool from a bean-pool resource instance <pools><bean-instance-pools><strict-max-pool> (e.g. jboss.ejb.pool.the-bean-pool-for-the-slsb-default). However, the common names of the default pools need to be mapped somehow to specific bean pool resources defined in the subsystem.
The way that the configuration is currently set up to define the default-bean-pools is confusing:
# XSD
** there are no attributes on the top level subsystem element for default-slsb-instance-pool and default-mdb-instance-pool attributes, so these values cannot be set from XML
** there are bean-instance-pool-ref elements in the <mdb> element and the <session-beans><stateless> elements, and these bean-instance-pool-ref elements are *required*
** the parser takes the values from the bean-instance-pool-ref elements and uses them to initialise DEFAULT_SLSB_INSTANCE_POOL and DEFAULT_MDB_INSTANCE_POOL attribute defined in the EJB3SubsystemRootResourceDefinition via validateAndSet() methods to update the model
# Resource Definition
** there are three attributes defined DEFAULT_SLSB_INSTANCE_POOL, DEFAULT_MDB_INSTANCE_POOL and DEFAULT_ENTITY_INSTANCE_POOL in the EJB3 root resource definition, these attributes are registered, and whether they take a value or not is *optional*
** these attributes have custom read-write handlers EJB3SubsystemDefaultPoolWriteHandler.SLSB_POOL, EJB3SubsystemDefaultPoolWriteHandler.MDB_POOL, and EJB3SubsystemDefaultPoolWriteHandler.ENTITY_POOL
# AddHandler
** in the add handler, there are conditions final boolean defaultSlsbPoolAvailable = model.hasDefined(DEFAULT_SLSB_INSTANCE_POOL) and final boolean defaultMdbPoolAvailable = model.hasDefined(DEFAULT_MDB_INSTANCE_POOL) which are passed into the AnnotatedEJBComponentDescriptionDeploymentProcessor which will conditionally install a service representing the default SLSB and MDB pools if the default bean pool attributes are defined and have a value
** NOTE: I came across this issue as this arrangement of services requires conditional capabilities to be defined
# Summary
** because the bean-instance-pool-ref elements are required in the XML, and because they populate the elements DEFAULT_SLSB_INSTANCE_POOL, DEFAULT_MDB_INSTANCE_POOL, it would seem that there will always initially be default pools and so these conditional checks in the add handler might not seem not necessary
** on the other hand, because the resource attributes DEFAULT_SLSB_INSTANCE_POOL, DEFAULT_MDB_INSTANCE_POOL are defined and have handlers, and because their values are optional, they could be set to null by the user after the server boots up, resulting in no default bean pools for subsequent deployments
So, the EJB spec needs to be consulted to see if default-bean-instance-pools are required and if so, how we can better set up the configuration of these pools. Also, the DEAFULT_ENTITY_INSTANCE_POOL attribute does not seem to be used any more, but this could be a bug as well.
was:
Stateless SLSB and MDB deployments benefit from bean instance pools, a pool of beans of a given type which can be used to handle incoming requests. Bean deployments can be configured to use specific bean instance pools for the bean type, default bean instance pools for the bean type or no instance pool.
The configuration of default bean instance pools is achieved at the service level by associating a default bean instance pool service name (e.g. jboss.ejb.pool.default-slsb) with an existing bean instance pool from a bean-pool resource instance <pools><bean-instance-pools><strict-max-pool> (e.g. jboss.ejb.pool.the-bean-pool-for-the-slsb-default). However, the common names of the default pools need to be mapped somehow to specific bean pool resources defined in the subsystem.
The way that the configuration is currently set up to define the default-bean-pools is confusing:
# XSD
** there are no attributes on the top level subsystem element for default-slsb-instance-pool and default-mdb-instance-pool attributes, so these values cannot be set from XML
** there are bean-instance-pool-ref elements in the <mdb> element and the <session-beans><stateless> elements, and these bean-instance-pool-ref elements are *required*
** the parser takes the values from the bean-instance-pool-ref elements and uses them to initialise DEFAULT_SLSB_INSTANCE_POOL and DEFAULT_MDB_INSTANCE_POOL attribute defined in the EJB3SubsystemRootResourceDefinition via validateAndSet() methods to update the model
# Resource Definition
** there are three attributes defined DEFAULT_SLSB_INSTANCE_POOL, DEFAULT_MDB_INSTANCE_POOL and DEFAULT_ENTITY_INSTANCE_POOL in the EJB3 root resource definition, these attributes are registered, and whether they take a value or not is *optional*
** these attributes have custom read-write handlers EJB3SubsystemDefaultPoolWriteHandler.SLSB_POOL, EJB3SubsystemDefaultPoolWriteHandler.MDB_POOL, and EJB3SubsystemDefaultPoolWriteHandler.ENTITY_POOL
# AddHandler
** in the add handler, there are conditions final boolean defaultSlsbPoolAvailable = model.hasDefined(DEFAULT_SLSB_INSTANCE_POOL) and final boolean defaultMdbPoolAvailable = model.hasDefined(DEFAULT_MDB_INSTANCE_POOL) which are passed into the AnnotatedEJBComponentDescriptionDeploymentProcessor which will conditionally install a service representing the default SLSB and MDB pools if the default bean pool attributes are defined and have a value
** NOTE: I came across this issue as this arrangement of services requires conditional capabilities to be defined
# Summary
** because the bean-instance-pool-ref elements are required in the XML, and because they populate the elements DEFAULT_SLSB_INSTANCE_POOL, DEFAULT_MDB_INSTANCE_POOL, it would seem that there will always initially be default pools and so these conditional checks in the add handler might not seem not necessary
** on the other hand, because the resource attributes DEFAULT_SLSB_INSTANCE_POOL, DEFAULT_MDB_INSTANCE_POOL are defined and have handlers, and because their values are optional, they could be set to null by the user after the server boots up, resulting in no default bean pools for subsequent deployments
So, the EJB spec needs to be consulted to see if default-bean-instance-pools are required and if so, how we can better set up the configuration of these pools. Also, the DEAFULT_ENTITY_INSTANCE_POOL attribute does not seem to be used any more, but this could be a bug as well.
> Assignment of default bean instance pools for MDBs and SLSBs is unclear
> -----------------------------------------------------------------------
>
> Key: WFLY-13661
> URL: https://issues.redhat.com/browse/WFLY-13661
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 20.0.1.Final
> Reporter: Richard Achmatowicz
> Assignee: Cheng Fang
> Priority: Major
>
> SLSB and MDB deployments benefit from bean instance pools, a pool of stateless beans of a given type which can be used to handle incoming requests. Bean deployments can be configured to use specific bean instance pools for the bean type, default bean instance pools for the bean type or no instance pool.
> The configuration of default bean instance pools is achieved at the service level by associating a default bean instance pool service name (e.g. jboss.ejb.pool.default-slsb) with an existing bean instance pool from a bean-pool resource instance <pools><bean-instance-pools><strict-max-pool> (e.g. jboss.ejb.pool.the-bean-pool-for-the-slsb-default). However, the common names of the default pools need to be mapped somehow to specific bean pool resources defined in the subsystem.
> The way that the configuration is currently set up to define the default-bean-pools is confusing:
> # XSD
> ** there are no attributes on the top level subsystem element for default-slsb-instance-pool and default-mdb-instance-pool attributes, so these values cannot be set from XML
> ** there are bean-instance-pool-ref elements in the <mdb> element and the <session-beans><stateless> elements, and these bean-instance-pool-ref elements are *required*
> ** the parser takes the values from the bean-instance-pool-ref elements and uses them to initialise DEFAULT_SLSB_INSTANCE_POOL and DEFAULT_MDB_INSTANCE_POOL attribute defined in the EJB3SubsystemRootResourceDefinition via validateAndSet() methods to update the model
> # Resource Definition
> ** there are three attributes defined DEFAULT_SLSB_INSTANCE_POOL, DEFAULT_MDB_INSTANCE_POOL and DEFAULT_ENTITY_INSTANCE_POOL in the EJB3 root resource definition, these attributes are registered, and whether they take a value or not is *optional*
> ** these attributes have custom read-write handlers EJB3SubsystemDefaultPoolWriteHandler.SLSB_POOL, EJB3SubsystemDefaultPoolWriteHandler.MDB_POOL, and EJB3SubsystemDefaultPoolWriteHandler.ENTITY_POOL
> # AddHandler
> ** in the add handler, there are conditions final boolean defaultSlsbPoolAvailable = model.hasDefined(DEFAULT_SLSB_INSTANCE_POOL) and final boolean defaultMdbPoolAvailable = model.hasDefined(DEFAULT_MDB_INSTANCE_POOL) which are passed into the AnnotatedEJBComponentDescriptionDeploymentProcessor which will conditionally install a service representing the default SLSB and MDB pools if the default bean pool attributes are defined and have a value
> ** NOTE: I came across this issue as this arrangement of services requires conditional capabilities to be defined
> # Summary
> ** because the bean-instance-pool-ref elements are required in the XML, and because they populate the elements DEFAULT_SLSB_INSTANCE_POOL, DEFAULT_MDB_INSTANCE_POOL, it would seem that there will always initially be default pools and so these conditional checks in the add handler might not seem not necessary
> ** on the other hand, because the resource attributes DEFAULT_SLSB_INSTANCE_POOL, DEFAULT_MDB_INSTANCE_POOL are defined and have handlers, and because their values are optional, they could be set to null by the user after the server boots up, resulting in no default bean pools for subsequent deployments
> So, the EJB spec needs to be consulted to see if default-bean-instance-pools are required and if so, how we can better set up the configuration of these pools. Also, the DEAFULT_ENTITY_INSTANCE_POOL attribute does not seem to be used any more, but this could be a bug as well.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 3 months
[JBoss JIRA] (JGRP-2274) ASYM_ENCRYPT: deprecate sign_msgs
by Nick Sawadsky (Jira)
[ https://issues.redhat.com/browse/JGRP-2274?page=com.atlassian.jira.plugin... ]
Nick Sawadsky edited comment on JGRP-2274 at 7/10/20 12:19 PM:
---------------------------------------------------------------
[~belaban] To my knowledge the CBC mode of encryption does not provide integrity checking.
GCM does, and I believe it can be enabled in JGroups via:
{code:java}
sym_algorithm="AES/GCM/NoPadding"
sym_iv_length="12"{code}
However, GCM has a very strict requirement to avoid reuse of the same IV for a given key, which is difficult to guarantee when a static key is used.
As a result I'm still hoping TLS support can eventually be added to address the integrity checking requirement, as well as provide additional protections for cluster traffic.
was (Author: nsawadsky):
[~belaban] To my knowledge the CBC mode of encryption does not provide integrity checking.
GCM does, and I believe it can be enabled in JGroups via:
{code:java}
sym_algorithm="AES/GCM/NoPadding"
sym_iv_length="12"{code}
However, GCM has a very strict requirement to avoid reuse of the same IV for a given key, which is difficult to guarantee when a static key is used.
As a result I'm still hoping TLS support can eventually be added to address the integrity checking requirement, as well as provide a generally stronger story around security of cluster traffic.
> ASYM_ENCRYPT: deprecate sign_msgs
> ---------------------------------
>
> Key: JGRP-2274
> URL: https://issues.redhat.com/browse/JGRP-2274
> Project: JGroups
> Issue Type: Enhancement
> Reporter: Bela Ban
> Assignee: Bela Ban
> Priority: Major
> Fix For: 4.0.12
>
>
> In {{ASYM_ENCRYPT}}, signing messages means that the checksum of an encrypted message is computed and used together with the secret key of the sender to sign the message. On the receiver side, the public key of the sender is used to validate the signature.
> However, this is redundant, as decryption of a message will fail if the contents have been changed.
> If needed, signing of messages can be done in a separate protocol.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 3 months
[JBoss JIRA] (JGRP-2274) ASYM_ENCRYPT: deprecate sign_msgs
by Nick Sawadsky (Jira)
[ https://issues.redhat.com/browse/JGRP-2274?page=com.atlassian.jira.plugin... ]
Nick Sawadsky commented on JGRP-2274:
-------------------------------------
[~belaban] To my knowledge the CBC mode of encryption does not provide integrity checking.
GCM does, and I believe it can be enabled in JGroups via:
{code:java}
sym_algorithm="AES/GCM/NoPadding"
sym_iv_length="12"{code}
However, GCM has a very strict requirement to avoid reuse of the same IV for a given key, which is difficult to guarantee when a static key is used.
As a result I'm still hoping TLS support can eventually be added to address the integrity checking requirement, as well as provide a generally stronger story around security of cluster traffic.
> ASYM_ENCRYPT: deprecate sign_msgs
> ---------------------------------
>
> Key: JGRP-2274
> URL: https://issues.redhat.com/browse/JGRP-2274
> Project: JGroups
> Issue Type: Enhancement
> Reporter: Bela Ban
> Assignee: Bela Ban
> Priority: Major
> Fix For: 4.0.12
>
>
> In {{ASYM_ENCRYPT}}, signing messages means that the checksum of an encrypted message is computed and used together with the secret key of the sender to sign the message. On the receiver side, the public key of the sender is used to validate the signature.
> However, this is redundant, as decryption of a message will fail if the contents have been changed.
> If needed, signing of messages can be done in a separate protocol.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 3 months
[JBoss JIRA] (WFCORE-482) Add log4j2 support for WildFly
by James Perkins (Jira)
[ https://issues.redhat.com/browse/WFCORE-482?page=com.atlassian.jira.plugi... ]
James Perkins reopened WFCORE-482:
----------------------------------
I clicked the wrong button there. This is not resolved.
> Add log4j2 support for WildFly
> ------------------------------
>
> Key: WFCORE-482
> URL: https://issues.redhat.com/browse/WFCORE-482
> Project: WildFly Core
> Issue Type: Task
> Components: Logging
> Environment: Spring 3, Hibernate, Wicket, JBoss AS7
> Reporter: Amarkanth Ranganamayna
> Assignee: James Perkins
> Priority: Major
>
> I am trying to use Flume Appender which comes with Log4j2 (log4j 1.x doesn't support flume appender) (AND) inorder to acheive this, I am looking at how to configure JBoss AS7 to use log4j2.
> Looks like Jboss AS7 by default use log4j 1.x
> Are you guys already working on using log4j2 ?
> If NOT, can you please suggest how to configure Jboss AS7 such that it picks up "log4j2.xml" file and doesn't use its own logging.
> Thanks,
> Amar
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 3 months
[JBoss JIRA] (WFLY-13662) Weld Conversation Context Logs when not using Conversation Context
by Cody Lerum (Jira)
Cody Lerum created WFLY-13662:
---------------------------------
Summary: Weld Conversation Context Logs when not using Conversation Context
Key: WFLY-13662
URL: https://issues.redhat.com/browse/WFLY-13662
Project: WildFly
Issue Type: Bug
Components: CDI / Weld, JSF
Affects Versions: 20.0.1.Final
Reporter: Cody Lerum
Assignee: Matěj Novotný
After upgrading to Widfly 20.0.1 from 18.0.1 I'm starting to receive show log errors regarding the CDI conversation context even though it is not used anywhere in the application.
These did not present in the same application in 18.0.1.Final
{code:java}
020-07-10 15:42:47,561 ERROR [io.undertow.request] (default task-273) UT005023: Exception handling request to /s/c/voice/fax/view.xhtml: java.lang.NullPointerException2020-07-10 15:42:47,562 WARN [org.jboss.weld.Servlet] (default task-273) WELD-000717: Unable to deactivate context org.jboss.weld.module.web.context.http.LazyHttpConversationContextImpl@25333df0 when destroying request HttpServletRequestImpl [ GET /s/c/voice/fax/view.xhtml ]
2020-07-10 15:42:48,165 WARN [org.jboss.weld.Conversation] (default task-273) WELD-000335: Conversation context is already active, most likely it was not cleaned up properly during previous request processing: HttpServletRequestImpl [ GET /i/ticket/46893 ] {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 3 months
[JBoss JIRA] (WFCORE-5038) Compile using JDK 11
by Darran Lofthouse (Jira)
[ https://issues.redhat.com/browse/WFCORE-5038?page=com.atlassian.jira.plug... ]
Darran Lofthouse edited comment on WFCORE-5038 at 7/10/20 10:08 AM:
--------------------------------------------------------------------
Actually -release=8 is not the equivalent of -target=8 - but that is a good thing.
Probably also in a good way, -release=8 means the API is checked against the original Java 8 API not the latest Java 8 API.
was (Author: dlofthouse):
Actually -release=8 is not the equivalent of -target=8 - but that is a good thing.
> Compile using JDK 11
> --------------------
>
> Key: WFCORE-5038
> URL: https://issues.redhat.com/browse/WFCORE-5038
> Project: WildFly Core
> Issue Type: Task
> Components: Build System
> Affects Versions: 13.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
>
> As discussed on wildfly-dev mailing list, to enable the use of multi-release wildfly modules, we will:
> * Require JDK 11 to compile (for all modules except testsuite modules)
> ** Adjust compiler flags to use --release=8
> *** This is equivalent to: -source N -target N -bootclasspath <bootclasspath-from-N>
> * To ensure surefire tests are run against each supported JRE (wherever necessary), we will update the CI server maven settings to specify system properties for:
> ** java8.home
> ** java11.home
> * Update JDK8 specific CI servers to build with JDK 11, but run integration tests using Java 8.
> One complication is the wildfly-cli module, which contains a dependency on the jdk.jconsole module. Building on JDK 11 using -release 8 means that we cannot just include the --add-modules=jdk.jconsole compiler argument, we actually need to add a jar containing a jconsole stub to the classpath of the compiler.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 3 months
[JBoss JIRA] (WFCORE-5038) Compile using JDK 11
by Darran Lofthouse (Jira)
[ https://issues.redhat.com/browse/WFCORE-5038?page=com.atlassian.jira.plug... ]
Darran Lofthouse commented on WFCORE-5038:
------------------------------------------
Actually -release=8 is not the equivalent of -target=8 - but that is a good thing.
> Compile using JDK 11
> --------------------
>
> Key: WFCORE-5038
> URL: https://issues.redhat.com/browse/WFCORE-5038
> Project: WildFly Core
> Issue Type: Task
> Components: Build System
> Affects Versions: 13.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
>
> As discussed on wildfly-dev mailing list, to enable the use of multi-release wildfly modules, we will:
> * Require JDK 11 to compile (for all modules except testsuite modules)
> ** Adjust compiler flags to use --release=8
> *** This is equivalent to: -source N -target N -bootclasspath <bootclasspath-from-N>
> * To ensure surefire tests are run against each supported JRE (wherever necessary), we will update the CI server maven settings to specify system properties for:
> ** java8.home
> ** java11.home
> * Update JDK8 specific CI servers to build with JDK 11, but run integration tests using Java 8.
> One complication is the wildfly-cli module, which contains a dependency on the jdk.jconsole module. Building on JDK 11 using -release 8 means that we cannot just include the --add-modules=jdk.jconsole compiler argument, we actually need to add a jar containing a jconsole stub to the classpath of the compiler.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 3 months
[JBoss JIRA] (WFCORE-5038) Compile using JDK 11
by Paul Ferraro (Jira)
[ https://issues.redhat.com/browse/WFCORE-5038?page=com.atlassian.jira.plug... ]
Paul Ferraro updated WFCORE-5038:
---------------------------------
Description:
As discussed on wildfly-dev mailing list, to enable the use of multi-release wildfly modules, we will:
* Require JDK 11 to compile (for all modules except testsuite modules)
** Adjust compiler flags to use --release=8
*** This is equivalent to: -source N -target N -bootclasspath <bootclasspath-from-N>
* To ensure surefire tests are run against each supported JRE (wherever necessary), we will update the CI server maven settings to specify system properties for:
** java8.home
** java11.home
* Update JDK8 specific CI servers to build with JDK 11, but run integration tests using Java 8.
One complication is the wildfly-cli module, which contains a dependency on the jdk.jconsole module. Building on JDK 11 using -release 8 means that we cannot just include the --add-modules=jdk.jconsole compiler argument, we actually need to add a jar containing a jconsole stub to the classpath of the compiler.
was:
As discussed on wildfly-dev mailing list, to enable the use of multi-release wildfly modules, we will:
* Require JDK 11 to compile (for all modules except testsuite modules)
** Adjust compiler flags to use --release=8
*** This is equivalent to: -source N -target N -bootclasspath <bootclasspath-from-N>
* To ensure surefire tests are run against each supported JRE (wherever necessary), we will update the CI server maven settings to specify system properties for:
** java8.home
** java11.home
* Update JDK8 specific CI servers to build with JDK 11, but run integration tests using Java 8.
> Compile using JDK 11
> --------------------
>
> Key: WFCORE-5038
> URL: https://issues.redhat.com/browse/WFCORE-5038
> Project: WildFly Core
> Issue Type: Task
> Components: Build System
> Affects Versions: 13.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
>
> As discussed on wildfly-dev mailing list, to enable the use of multi-release wildfly modules, we will:
> * Require JDK 11 to compile (for all modules except testsuite modules)
> ** Adjust compiler flags to use --release=8
> *** This is equivalent to: -source N -target N -bootclasspath <bootclasspath-from-N>
> * To ensure surefire tests are run against each supported JRE (wherever necessary), we will update the CI server maven settings to specify system properties for:
> ** java8.home
> ** java11.home
> * Update JDK8 specific CI servers to build with JDK 11, but run integration tests using Java 8.
> One complication is the wildfly-cli module, which contains a dependency on the jdk.jconsole module. Building on JDK 11 using -release 8 means that we cannot just include the --add-modules=jdk.jconsole compiler argument, we actually need to add a jar containing a jconsole stub to the classpath of the compiler.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 3 months
[JBoss JIRA] (WFLY-13661) Assignment of default bean instance pools for MDBs and SLSBs is unclear
by Richard Achmatowicz (Jira)
[ https://issues.redhat.com/browse/WFLY-13661?page=com.atlassian.jira.plugi... ]
Richard Achmatowicz commented on WFLY-13661:
--------------------------------------------
>From chat with Paul F:
{quote}
What is the purpose of a default attribute if it cannot be set on server startup (i.e. via xml)
That sounds like a bug?
Or maybe those default attributes should be deprecated?
A quick search seems to indicate that these defaults were never configurable via xml - which make me think it was an oversight?
{quote}
> Assignment of default bean instance pools for MDBs and SLSBs is unclear
> -----------------------------------------------------------------------
>
> Key: WFLY-13661
> URL: https://issues.redhat.com/browse/WFLY-13661
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 20.0.1.Final
> Reporter: Richard Achmatowicz
> Assignee: Cheng Fang
> Priority: Major
>
> Stateless SLSB and MDB deployments benefit from bean instance pools, a pool of beans of a given type which can be used to handle incoming requests. Bean deployments can be configured to use specific bean instance pools for the bean type, default bean instance pools for the bean type or no instance pool.
> The configuration of default bean instance pools is achieved at the service level by associating a default bean instance pool service name (e.g. jboss.ejb.pool.default-slsb) with an existing bean instance pool from a bean-pool resource instance <pools><bean-instance-pools><strict-max-pool> (e.g. jboss.ejb.pool.the-bean-pool-for-the-slsb-default). However, the common names of the default pools need to be mapped somehow to specific bean pool resources defined in the subsystem.
> The way that the configuration is currently set up to define the default-bean-pools is confusing:
> # XSD
> ** there are no attributes on the top level subsystem element for default-slsb-instance-pool and default-mdb-instance-pool attributes, so these values cannot be set from XML
> ** there are bean-instance-pool-ref elements in the <mdb> element and the <session-beans><stateless> elements, and these bean-instance-pool-ref elements are *required*
> ** the parser takes the values from the bean-instance-pool-ref elements and uses them to initialise DEFAULT_SLSB_INSTANCE_POOL and DEFAULT_MDB_INSTANCE_POOL attribute defined in the EJB3SubsystemRootResourceDefinition via validateAndSet() methods to update the model
> # Resource Definition
> ** there are three attributes defined DEFAULT_SLSB_INSTANCE_POOL, DEFAULT_MDB_INSTANCE_POOL and DEFAULT_ENTITY_INSTANCE_POOL in the EJB3 root resource definition, these attributes are registered, and whether they take a value or not is *optional*
> ** these attributes have custom read-write handlers EJB3SubsystemDefaultPoolWriteHandler.SLSB_POOL, EJB3SubsystemDefaultPoolWriteHandler.MDB_POOL, and EJB3SubsystemDefaultPoolWriteHandler.ENTITY_POOL
> # AddHandler
> ** in the add handler, there are conditions final boolean defaultSlsbPoolAvailable = model.hasDefined(DEFAULT_SLSB_INSTANCE_POOL) and final boolean defaultMdbPoolAvailable = model.hasDefined(DEFAULT_MDB_INSTANCE_POOL) which are passed into the AnnotatedEJBComponentDescriptionDeploymentProcessor which will conditionally install a service representing the default SLSB and MDB pools if the default bean pool attributes are defined and have a value
> ** NOTE: I came across this issue as this arrangement of services requires conditional capabilities to be defined
> # Summary
> ** because the bean-instance-pool-ref elements are required in the XML, and because they populate the elements DEFAULT_SLSB_INSTANCE_POOL, DEFAULT_MDB_INSTANCE_POOL, it would seem that there will always initially be default pools and so these conditional checks in the add handler might not seem not necessary
> ** on the other hand, because the resource attributes DEFAULT_SLSB_INSTANCE_POOL, DEFAULT_MDB_INSTANCE_POOL are defined and have handlers, and because their values are optional, they could be set to null by the user after the server boots up, resulting in no default bean pools for subsequent deployments
> So, the EJB spec needs to be consulted to see if default-bean-instance-pools are required and if so, how we can better set up the configuration of these pools. Also, the DEAFULT_ENTITY_INSTANCE_POOL attribute does not seem to be used any more, but this could be a bug as well.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 3 months