skydunk...@gmail.com commented on revision r80 in project jgentle.
Details are at
http://code.google.com/p/jgentle/source/detail?r=80
General Comment:
Hoàn tất hệ thống pool service. Việc cấu hình một pool đơn giản chỉ là chỉ
định @Pooling annotation ngay tại khai báo class, vd:
@Pooling(enable=true,MinPoolSize=1, MaxPoolSize=8, JustInTime=false)
public class Services {
}
sau đó là việc cấu hình instance trên scope:
abstract class Config implements Configurable {
public void configure() {
attach(Services.class).to(Services.class).scope(PoolScope.CommonPool);
hoặc
bind().in(Services.class).id("PooledBean").scope(PoolScope.StackPool);
}
}
từ bây giờ bất kì khi nào một instance được khởi tạo (được get ra từ
container hay được inject như một dependency) từ service class đều sẽ nằm
trong CommonPool scope, với thông tin cấu hình được quy định trên @Pooling
(nếu @Pooling không được chỉ định tường minh trên class, pool scope sẽ sử
dụng dữ liệu cấu hình mặc định)
Respond to these comments at
http://code.google.com/p/jgentle/source/detail?r=80
--
You received this message because you starred this review, or because
your project has directed all notifications to a mailing list that you
subscribe to.
You may adjust your review notification preferences at:
http://code.google.com/hosting/settings