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 106885 - Changes to connections are not detected for visualweb projects
Summary: Changes to connections are not detected for visualweb projects
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 5.x
Hardware: PC All
: P3 blocker (vote)
Assignee: John Baker
URL:
Keywords:
Depends on:
Blocks: 105212
  Show dependency tree
 
Reported: 2007-06-15 21:09 UTC by John Baker
Modified: 2007-06-20 00:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Baker 2007-06-15 21:09:25 UTC
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.
Comment 1 John Baker 2007-06-15 22:13:10 UTC
I have a possible fix for this to listen for project close events .
When a project is closed, remove a connection listener.
Comment 2 John Baker 2007-06-15 23:05:11 UTC
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
Comment 3 John Baker 2007-06-18 02:28:00 UTC
Not fixed. 
Comment 4 John Baker 2007-06-20 00:04:00 UTC
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