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 41214 - Regression: XpathEvent.BEAN_ADDED no longer being sent
Summary: Regression: XpathEvent.BEAN_ADDED no longer being sent
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 3.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Nam Nguyen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-23 02:25 UTC by _ pcw
Modified: 2004-08-13 12:11 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 _ pcw 2004-03-23 02:25:51 UTC
Plugin is no longer receiving
XpathEvent.BEAN_ADDED events via xpath listener
for added DConfigBeans.  For example, in a
web-app, if a servlet is added, I would expect the
DConfigBean for the web-app to be sent this event.

The web-app DConfigBean used to receive this event
when a servlet was added, but not any more.  Also,
while BEAN_REMOVED is also still fired, it is only
received by the bean being removed, not the parent
DConfigBean (which also used to happen.)

Possible hint: I noticed in
ModuleDeploymentSupport.XpathListenerStorage that
the normalized xpath seemed incorrect (and when
corrected in the debugger, caused the events to
fire again.)  Currently, the normalized xpath for
any given DDBean will be a doubled version for
that bean, e.g. "\web-app\servlet\web-app\servlet"
for a servlet, etc.)
Comment 1 Milan Kuchtiak 2004-03-23 16:41:18 UTC
The "\web-app\servlet\web-app\servlet" xpath is really strange.
Comment 2 Nam Nguyen 2004-03-23 17:53:14 UTC
Peter, what build you are using?  In my release36 build, I do see the
left-hand panel explorer tree on sun-web-app get updated with a new
servlet node whenever I add new servlet.  Same thing with removal of
servlets. Please confirm that you seeing the samething, only that
expected events are not received by configbeans.  
If so, for evaluation of the bug, what is the net effect on user view
and data.
Comment 3 _ pcw 2004-03-23 18:01:58 UTC
I'm using RC1 build from 3/14.  Yes, the servlet DConfigBeans are
created/destroyed and displayed or not accordingly.

However, XpathEvent.BEAN_ADDED is not being received any DConfigBeans
(in particular by the DConfigBean bound to \web-app which is the
parent of the new servlet DConfigBean) via the xPathListener
interface, which is what this bug is reporting. 
XpathEvent.BEAN_REMOVED is only being received by the bean that is
removed (but not received by the parent, where I would actually use it.)

I figured it would not be fixed for 3.6, so I've worked around it.  I
was using this to notify the customizer UI of changes to the servlet
list, as there are places where this is needed (cache mappings that
refer to servlet names).
Comment 4 Nam Nguyen 2004-03-24 00:51:57 UTC
Fix in trunk.  Since the bug does not reflect in UI or user data
(S1AS8 plugin already have work-around), I don't think this need to be
put into release36.
Comment 5 Jan Chalupa 2004-03-31 20:15:22 UTC
Waiver approved.