Following is a simple client code example which, when run a few hundred
times, generates a noticable memory leak in the Jonas2 process. I am using
Jonas2,
SUN JDK 1.2.2, Windows NT 4.0. Any help, or comments, would be appreciated.
//
// Begin code fragment
// Memory leak checking
//
Context initialContext = null;
initialContext = new InitialContext();
MyBeanHome home = null;
MyBean bean = null;
home =
(MyBeanHome)PortableRemoteObject.narrow(initialContext.lookup("MyBeanHome"),
MyBeanHome.class);
bean = home.findByPrimaryKey(new MyBeanPK("A"));
bean = home.findByPrimaryKey(new MyBeanPK("B"));
bean = home.findByPrimaryKey(new MyBeanPK("C"));
bean = home.findByPrimaryKey(new MyBeanPK("D"));
bean = home.findByPrimaryKey(new MyBeanPK("E"));
bean = home.findByPrimaryKey(new MyBeanPK("F"));
bean = home.findByPrimaryKey(new MyBeanPK("G"));
bean = home.findByPrimaryKey(new MyBeanPK("H"));
bean = home.findByPrimaryKey(new MyBeanPK("I"));
bean = home.findByPrimaryKey(new MyBeanPK("J"));
bean = home.findByPrimaryKey(new MyBeanPK("K"));
bean = home.findByPrimaryKey(new MyBeanPK("L"));
bean = home.findByPrimaryKey(new MyBeanPK("M"));
bean = home.findByPrimaryKey(new MyBeanPK("N"));
bean = home.findByPrimaryKey(new MyBeanPK("O"));
bean = home.findByPrimaryKey(new MyBeanPK("P"));
bean = home.findByPrimaryKey(new MyBeanPK("Q"));
bean = home.findByPrimaryKey(new MyBeanPK("R"));
bean = home.findByPrimaryKey(new MyBeanPK("S"));
bean = home.findByPrimaryKey(new MyBeanPK("T"));
//
// end of code fragment. Run this many times
// in repitition and watch the Jonas JVM heap use
// go up, and never go down.
//
----
This list is cross-posted to two mail lists. To unsubscribe,
follow the instructions below for the list you subscribed to.
For objectweb.org: send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe ejb-container-group".
For enhydra.org: send email to [EMAIL PROTECTED] and include
in the body of the message "unsubscribe ejb-container-group".