Bug 400 : Autofetch serializing on shutdown when not required
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.7.7
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
27/05/2012
Updated 
27/05/2012
Type 
Bug
 
Attachments 
No attachments

Hello,

I have set ebean.autofetch.useFileLogging to false. In DefaultAutoFetchManager I see this (2.7.4):

public void shutdown() {
collectUsageViaGC(-1);
if (useFileLogging) {
serialize();
}
}

useFileLogging is false, so no serialization is done, but collectUsageViaGC is still called even though we aren't going to serialize the data. Why is this done?

I introduced Ebean into my project a couple of months ago. I have almost 30 applications on tomcat deployed using Ebean. I've noticed it takes longer than it used to to shutdown tomcat. I've introduced other technologies as well, so can't say for sure that the cause is Ebean. I'm wondering if the call to System.gc() is contributing to the slow shutdown.

Should collectUsageViaGC be skipped if useFileLogging is false?

Thanks.

 
Rob 27 May 02:51
Yes it should

Yes it should.

Rob 27 May 10:26
Fixed in HEAD

Fixed in HEAD.

woResponse

Upload a file