Hans-Dieter Mader [
https://community.jboss.org/people/maderhan] created the discussion
"Stateful Session Bean memory leak in AS 7.1.1 (win 7, redhat linux)"
To view the discussion, visit:
https://community.jboss.org/message/773137#773137
--------------------------------------------------------------
Hi,
I have got a SFSB running on 7.1.1 standalone.
The SFSB has been migrated from ejb2 to ejb3.1 (Home, Remote, Bean impl., ejb-jar.xml).
Passivation on server is NoPassivate (simple).
The client calls come from a tomcat 7.
*After running a time with a number of remote calls, the AS 7 vm is out of memory.*
*Force GC does not free the jvm memory pool "tenured gen" on windows or "ps
old gen" on linux!*
*Only when I disable the Bean, the memory is freed.*
Client:
Properties jndiProps = new Properties();
jndiProps.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jboss.naming.remote.client.InitialContextFactory");
jndiProps.put("jboss.naming.client.ejb.context", true);
jndiProps.put(Context.PROVIDER_URL,"remote://myserver:4447");
jndiProps.put(Context.URL_PKG_PREFIXES,
"org.jboss.ejb.client.naming");
jndiProps.put(Context.SECURITY_PRINCIPAL, "username");
jndiProps.put(Context.SECURITY_CREDENTIALS, "password");
InitialContext context=new InitialContext( jndiProps );
PortalHome pHome =
(PortalHome)c.lookup("ejb:/PortalBean/PortalBean!uiportal.ejb.session.PortalHome?stateful");
Portal pRemote = pHome.create();
pRemote.doSomeStuff();
pRemote.ejbRemove(); // Bean Method annotaded with @Remove, also in Remote
Interface -> the @PreDestroy method will be called by the server!!!!
context.close();
Any idea is highliy appreciated!!!!
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/773137#773137]
Start a new discussion in JBoss AS 7 Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]