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.
When a visualweb project that has connections to databases is opened and the connections are unavailable then when the user removes a connection or adds a connection to the Databases node in Services the project is unaware of the changes. WebLogicalViewProvider.BrokenDatasourceAction registers a ConnectionListener and when changes to connections occur event is fired and received. However, when all connections are available to the opened projects, the listener is removed. As a result, when a user makes changes to connections in the Services tab, the project node is not badged, display name is not changed to red and no alert dialog is posted.
I have a possible fix for this to listen for project close events . When a project is closed, remove a connection listener.
Add support to listen for a project change event. If the list of open projects shortens then I remove a connection listener belonging to the closed project. Checking in web/project/src/org/netbeans/modules/web/project/ui/WebLogicalViewProvider.java; /cvs/web/project/src/org/netbeans/modules/web/project/ui/WebLogicalViewProvider.java,v <-- WebLogicalViewProvider.java new revision: 1.8; previous revision: 1.7
Not fixed.
Fixed Checking in web/project/src/org/netbeans/modules/web/project/ui/WebLogicalViewProvider.java; /cvs/web/project/src/org/netbeans/modules/web/project/ui/WebLogicalViewProvider.java,v <-- WebLogicalViewProvider.java new revision: 1.11; previous revision: 1.10 Also tested the fix by dumping the heap then using the NetBeans profiler to make sure the listener is removed after closing the project and running GC