This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 57194

Summary: Eager registration of DatabaseRuntimes
Product: db Reporter: _ rkubacki <rkubacki>
Component: CodeAssignee: Andrei Badea <abadea>
Status: CLOSED FIXED    
Severity: blocker CC: apireviews, issues
Priority: P3 Keywords: API, PERFORMANCE
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description _ rkubacki 2005-03-30 13:37:35 UTC
org.netbeans.modules.db.runtime.DatabaseRuntimeManager.register() is an API that
allows pluging of DB runtimes. Unfortunatelly is it too eager contract and does
not allow lazy initialization and thus forces loading of too many classes and
performing of useless work during startup if there is any module using this API
Comment 1 Andrei Badea 2005-07-25 12:07:42 UTC
Radime, could you please elaborate on this? What is the flaw? Is it that the
registration must be done by each module in a ModuleInstall.restored() method?

What would be the right way to make this lazy? What about registering the
DatabaseRuntimes in the default lookup and retrieving them only when they are
needed (i.e., when a db connection is made)?
Comment 2 _ rkubacki 2005-07-25 12:34:12 UTC
Yes, the need for ModuleInstall.restored is bad. It is called even if the user
has no intent to do anything related to DB. 

Registering through lookup is OK IMO.
Comment 3 Andrei Badea 2005-08-18 10:06:27 UTC
Fixed by the new Database Explorer API developer under issue #61439.
Comment 4 Martin Schovanek 2005-11-21 10:27:19 UTC
VERIFIED