[jboss-jira] [JBoss JIRA] (WFLY-3754) EJB StatefulSessionComponentInstance methodMap includes final Object methods
James Livingston (JIRA)
issues at jboss.org
Wed Aug 20 23:29:29 EDT 2014
James Livingston created WFLY-3754:
--------------------------------------
Summary: EJB StatefulSessionComponentInstance methodMap includes final Object methods
Key: WFLY-3754
URL: https://issues.jboss.org/browse/WFLY-3754
Project: WildFly
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Components: EJB
Affects Versions: 8.1.0.Final
Reporter: James Livingston
Assignee: David Lloyd
StatefulSessionComponentInstance has a methodMap which maintains the ChainedInterceptors for each method. That currently includes final Object methods which are not Business Methods for EJBs (EJB 3.1 4.9.5 "The method must not be declared as final or static"), which results in extra memory overhead for what I believe is the useless interceptors.
The amount of memory a ChainedInterceptor consumes varies between JVMs, but it is between 280 and 400 bytes in some heap dumps I looked at. With 6 final methods (wait, notify*, getClass) on java.lang.Object that adds approximately 2kb of memory use to each instance of each SFSB.
This can affect all BasicComponentInstance subclasses, but it is most noticeable for SFSBs due to the larger number of instances.
The list of methods comes from ComponentConfiguration.getDefinedComponentMethods(), but I'm not sure if filtering the final methods out should be done there or an EJB-specific class since the rule about final methods is from the EJB spec. I'm also not sure if toString, equals and hashCode() should be treated as EJB business methods either.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the jboss-jira
mailing list