Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up[WFLY-9954] Fixing too many services and dependencies created for EJBs issue #12215
Conversation
|
Just restating what this does, in case I'm wrong: This adds a service per component but by doing so reduces the number of dependencies another service has by replacing 5 dependencies with 1 dependency. |
| @@ -29,8 +29,11 @@ | |||
| import org.jboss.as.server.deployment.DeploymentUnitProcessingException; | |||
| import org.jboss.as.server.deployment.DeploymentUnitProcessor; | |||
|
|
|||
| import java.util.HashMap; | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| @@ -85,7 +90,9 @@ private void bindServices(DeploymentUnit deploymentUnit, ServiceTarget serviceTa | |||
| serviceTarget.addService(inAppClientServiceName, inAppClientContainerService) | |||
| .addDependency(contextServiceName, ServiceBasedNamingStore.class, inAppClientContainerService.getNamingStoreInjector()) | |||
| .install(); | |||
| deploymentUnit.addToAttachmentList(org.jboss.as.server.deployment.Attachments.JNDI_DEPENDENCIES, inAppClientServiceName); | |||
| final Map<ServiceName, Set<ServiceName>> jndiComponentDependencies = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.COMPONENT_JNDI_DEPENDENCIES); | |||
| final Set<ServiceName> jndiDependencies = jndiComponentDependencies.computeIfAbsent(contextServiceName, k-> new HashSet<>()); | |||
This comment has been minimized.
This comment has been minimized.
bstansberry
Apr 9, 2019
Contributor
Using a lambda like this instead a few lines to do a get and if null, a put, adds to the amount of metaspace the server needs.
This comment has been minimized.
This comment has been minimized.
from o.j.a.s.d.Attachments.JNDI_DEPENDENCIES to o.j.a.s.d.Attachments.COMPONENT_JNDI_DEPENDENCIES attachment. Before this fix JNDI_DEPENDENCY_SERVICE had too many dependencies. With this fix applied JNDI_DEPENDENCY_SERVICE will now depend on JNDI_AGGREGATION_SERVICES and these aggregation services will reference COMPONENT_JNDI_DEPENDENCIES that were referenced by JNDI_DEPENDENCY_SERVICE before. In other words we are decreasing JNDI_DEPENDENCY_SERVICE dependencies count and reorganizing (simplifying) its dependency tree.
This comment has been minimized.
This comment has been minimized.
|
Correct @bstansberry but we are replacing not 5 but just 4 dependencies with one intermediary aggregating dependency. This will allow us to deploy more than 7000 EJBs per deployment since now on. |
|
I count 5; two in TransactionJndiBindingProcessor. ;) |
This comment has been minimized.
This comment has been minimized.
|
You're of course right @bstansberry . I shouldn't even make elementary counting if I'm tired :) |
c3c150e
into
wildfly:master
ropalka commentedApr 5, 2019
https://issues.jboss.org/browse/WFLY-9954
Moving component related JNDI dependencies from o.j.a.s.d.Attachments.JNDI_DEPENDENCIES
to o.j.a.s.d.Attachments.COMPONENT_JNDI_DEPENDENCIES attachment.
Before this fix JNDI_DEPENDENCY_SERVICE had too many dependencies.
With this fix applied JNDI_DEPENDENCY_SERVICE will now depend on
JNDI_AGGREGATION_SERVICES and these aggregation services
will reference COMPONENT_JNDI_DEPENDENCIES that were referenced
by JNDI_DEPENDENCY_SERVICE before. In other words we are decreasing
JNDI_DEPENDENCY_SERVICE dependencies count and reorganizing (simplifying)
its dependency tree.