| Summary: | [DB] Too many unreasonably opened connections to DB | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Egidijus Vaisnora <vaisegid> | ||||||||||
| Component: | cdo.db | Assignee: | Egidijus Vaisnora <vaisegid> | ||||||||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | Flags: | vaisegid:
review?
|
||||||||||
| Version: | 4.0 | ||||||||||||
| Target Milestone: | --- | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Egidijus Vaisnora
Created attachment 188574 [details]
Patch v1
MetaDataManager modified to get Accessor from StoreThreadLocal (it seems to be always present).
Advantage is that now methods getMetaID and getMetaInstance from MetaDataManager always will check cache first and no new accessors will be created
Created attachment 188575 [details]
Patch v2 - fixed conflict with remote changes
There are few other places, where code opens new DB connection, like in method Repository.initSystemPackages, which consumes connection from pool, but doesn't put it back. And there is a comment like "Don't let the null-context accessor go to the pool!". Why we cannot put accessor back to the pool? Your patch is not workspace-relative ;-( Created attachment 188665 [details]
Patch v3 - now it looks to be workspace patch
Created attachment 188687 [details]
Patch v4 - ready to be committed
committed to trunk revision 7055 Available in R20110608-1407 |