[jboss-jira] [JBoss JIRA] (WFLY-3754) EJB StatefulSessionComponentInstance methodMap includes final Object methods

Stuart Douglas (JIRA) issues at jboss.org
Tue Aug 26 22:03:59 EDT 2014


     [ https://issues.jboss.org/browse/WFLY-3754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Douglas reassigned WFLY-3754:
------------------------------------

    Assignee: Stuart Douglas  (was: David Lloyd)


> 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: Stuart Douglas
>
> 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.3.1#6329)


More information about the jboss-jira mailing list