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.
|Summary:||Bean's methods invoked in thread with invalid context classloader|
|Product:||guibuilder||Reporter:||Jan Stola <jstola>|
|Issue Type:||ENHANCEMENT||Exception Reporter:|
Description Jan Stola 2006-02-16 11:08:54 UTC
The constructor of the bean and its getters and setters are invoked in the event-dispatch thread with the context classloader set to NetBeans system classloader. This causes problems to beans that try to utilize thread's context classloader (like DriverManager invoked through RowSet.execute()). We cannot set the context classloader for all invocations (e.g. painting methods), but we should consider temporary setting of the context classloader when invoking constructor and setters.
Comment 1 Jan Stola 2008-01-10 14:39:14 UTC
Noone reported issue caused by this imperfection. So, it doesn't seem to cause problems in real-world forms => changing to enhancement.
Comment 2 Tomas Pavek 2013-08-20 17:11:27 UTC
Bug 231916 would need this context classloader - to be able to load Hibernate copies for particular user projects, which seemed to work (kind of) when experimenting with it, but this example is not a suitable case either as Hibernate is too big to be fooled this way (not designed for such use), easy to fail on something else. But the idea of setting the context classloader to the project class loader when instantiating beans (or executing any code in FormLAF block) seems generally reasonable.