Now here is a small extension of $JONAS_ROOT/example/src/eb/ClientAccount.java to 
demonstrate my problem. Running the example again and again makes memory usage just 
going up and up, and never diminishing.

*** 171,176 ****
--- 171,193 ----
            System.exit(2);
        }
  
+       // Test memory leak
+       System.out.println("Testing memory leak ...");
+       try {
+           utx.setTransactionTimeout( 3600 );
+           utx.begin();
+           System.out.println("Creating 10000 beans ...");
+           for(int i = 1000; i < 11000; i ++ )
+               home.create( i, "Mickey Mouse", 0 );
+           System.out.println("Removing 10000 beans ...");
+           for(int i = 1000; i < 11000; i ++ )
+               home.remove( new AccountBeanPK( i ) );
+           utx.commit();
+       } catch (Exception e) {
+           System.err.println("exception during 3rd Tx: " + e);
+           System.exit(2);
+       }
+ 
        // Exit program
        System.out.println("ClientAccount terminated");
      }

Any help would be appreciated
Achim


On Wed, 24 May 2000, Achim Derigs wrote:

> Our EJB server runs not a lot of CMP entity beans (<= 10000), but a daily update. 
>This means:
> 
> 1. Remove all entity beans.
> 2. Create new entity beans.
> 
> Step 1 and 2 are embedded in one transaction. I think removing an entity bean should 
>free memory respectively.
> 
> Regards
> Achim
> 
> On Wed, 24 May 2000, Tobias Seelinger wrote:
> 
> > Jonas2 doesn't implement the passivation and activation of beans. If a
> > bean is instantiated and loaded into memory, it stays there. Only a
> > passivation mechanism allows you to set a max number of beans currently
> > in memory. If you have to read lots of rows from your database, the
> > server has to instantiate one bean per row.
> > Couldn't this cause your problems ?
> > 
> > Tobias
> > 
> > Achim Derigs schrieb:
> > > 
> > > Hi Bryan,
> > > 
> > > I notice the same error and posted it to jonas-users some time ago. But I got no 
>response.
> > > 
> > > We have a pretty stable productive application, but this bug necessitates an 
>application restart every week. :-(
> > > 
> > > This bug causes Joans to run out of memory (OutOfMemoryError). In particular I 
>realize this behaviour, when creating and removing CMP entity beans.
> > > 
> > > Regards
> > > Achim
> > > 
> > > On Mon, 22 May 2000, Bryan Field-Elliot wrote:
> > > 
> > > > (Reposted, originally posted to jonas-users)
> > > >
> > > > I am using Jonas2, JDK 1.2, Windows NT 4.0.
> > > >
> > > > I have an application that is doing a LOT of work with CMP entity beans
> > > > (iterate through thousands of them, and perform work on each).
> > > >
> > > > After only a few thousand bean cycles (findByPrimaryKey, get()/set(), and
> > > > then setting the remote interface reference to null), I can see that the
> > > > Jonas server memory usage is just going up and up, and is never diminishing.
> > > >
> > > > Even when I quit out of my client application, the RAM used doesn't go down.
> > > >
> > > > My application eventually causes Joans to run out of memory, long before I'm
> > > >
> > > > finished (I need to get through 300,000 rows and it's dying after only
> > > > 10,000 or so, with a 200MB max JVM heap size).
> > > >
> > > > Anybody else see this behavior?
> > > >
> > > > Thank you,
> > > > Bryan
> > > >
> > ----
> > 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".
> > 
> 
> 


----
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".

Reply via email to