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.
Init method creates a timer that executes a method in AWT thread that only posts some job to RP and later invokes another Runnable in AWT thread. The first replanning should be avoided the latter is OK. Invalid use of RequestProcessor - DD2beansDataObject has its own instance of RequestProcessor but tasks are actully post to an old default RP using static (and deprecated) postRequest method.
Fixed http://j2ee.netbeans.org/source/browse/j2ee/ddloaders/src/org/netbeans/modules/j2ee/ddloaders/common/DD2beansDataObject.java?r1=1.1&r2=1.2
v
Even better would be to use a single runnable for both RP and swing task, the code won't get uglier anyway ;-)
I don't think so. We do not want to run generateDocument() in AWT thread.
I think it is possible to have only one Runnable as Petr suggested however I agree that generateDocument() should not run in EDT.
Just to be clear, the pattern is like: ... new Runnable() { String value; public void run() { if (value == null) { // first round in RP value = generateValue(); assert value != null; SwingUtilities.invokeLater(this); } else { // second round in AWT component.setValue(value); } } }; It might be inapplicable to your very case, but generally we use this pattern.