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 134153 - Need event notification to track model transaction state
Summary: Need event notification to track model transaction state
Status: RESOLVED WONTFIX
Alias: None
Product: xml
Classification: Unclassified
Component: XAM (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on: 160903
Blocks: 132316
  Show dependency tree
 
Reported: 2008-04-29 12:11 UTC by Alexey Yarmolenko
Modified: 2015-05-14 14:00 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Yarmolenko 2008-04-29 12:11:32 UTC
Some XSM model clients, such as XSLT mapper or Transformmap editors, will benefit from having a special notification
from model, telling when model enters and leaving transaction. 

This can help to improve application performance, when transaction contains more than one change, so editor's component
should be updated only once - for event which is closing transaction. Editor UIs mentioned above perform full reload of
diagram content when model changes, ignoring the content of each specific even, so the only thing they need to know is
when the transaction is closed. 

This can be implemented in form of PropertyChange event, delivered to subscribers by the same sink as MODEL_STATE events.

Existing workaround we use in XSLT and Transformmap editors - is to set up a timer, which resets to 0 when new change
event received from model. When timer ticks to 100ms, UI update process is kicked of. This approach is creating risk of
bugs and other complexities, which can be avoided by proposed fix.
Comment 1 Samaresh Panda 2008-05-28 16:53:28 UTC
I need more concrete use-cases to understand what is needed here. Can you not extend xam to do this at the BPEL side?
Comment 2 Sergey Lunegov 2008-11-21 14:09:50 UTC
Sam, we'd like this one to be implemented in 7.0.
Comment 3 Samaresh Panda 2008-12-05 01:04:50 UTC
XAM is an abstract model and you write domain specific models on top of it. You could override the start and end
transaction on your side and provide what is needed.

There are at least three known domain models (axi, schema, wsdl) based on XAM and all of them have a rich UI set that
gets updated on various events. So far we have not seen any performance issue as a result of this.

Have you done proper homework as to why you've performance issues in the first place?
Comment 4 Sergey Lunegov 2008-12-05 13:34:21 UTC
Sam, yes we did. Reopen the issue. Needs some discussion.
Comment 5 Samaresh Panda 2008-12-05 14:41:43 UTC
Can you attach the analysis of performance issue? Also I said that your domain model could overwrite start and end
transaction and fire events. Have you tried that?
Comment 6 Nikita Krjukov 2009-03-20 16:47:53 UTC
There are many difficulties with improving XAM model because it has a public status. So only small changes can be done. 
The XAM already provide a kind of notification about transactions' ending. I mean an abstract method
AbstractModel.transactionCompleted(). But it isn't convenient for using because a model's owner has to implement its own
notification mechanism (XXXEvent class, XXXListener class, addXXXListener(), removeXXXListener(), ...). It is impossible
to reuse PropertyChangeEvent, which is already used by XAM, for example, for notification about model's status changes.
It is impossible to do out of the AbstractModel class because of access restrictions. 

My suggestion is to send a new PropertyChangeEvent directly from the AbstractModel class. The only changes to XAM API is
adding the new TRANSACTION_COMPLETE_PROPERTY string constant. 

Comment 7 Nikita Krjukov 2009-03-20 17:16:53 UTC
Initially it was suggested to notify about entering and leaving transaction. But it looks like only leaving is required.
Moreover the end of transaction can be successful or not (endTransaciton() or rollbackTransaction()). The client's side
code is interested only in getting notification about successful end of transaction. 

So it is suggested to introduce only one new event. It is better in order to minimize XAM API changes. 
Comment 8 Sergey Lunegov 2009-07-30 13:52:10 UTC
Nikita, what is the progress with this issue ?
Comment 9 Svata Dedic 2015-05-14 14:00:29 UTC
No demand, no response, no progress in past 6 years.