Bryan Field-Elliot wrote:
> 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.
>
Just a blind shot: Could it be that the equals method of your beans is not well
implemented, and Jonas is duplicating the EJBObjects associated with your
records in its internal structures?
I have been using Jonas along weeks in a environment with several thousands
objects, and never noticed an increase of memory beyond the (aprox) 16MB when
everything is in.
>
> //
> // 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.
> //
>
> ----
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "unsubscribe jonas-users".
> For general help, send email to [EMAIL PROTECTED] and
> include in the body of the message "help".
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".