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.
Use case: user DnD DB table onto GUI form in order to display DB data in this form. When the user drags the table we have to be able to find out whether there (=in the project) is an entity class that corresponds to the DB table. If there is not such a class, we will generate it. We need to be able to find a persistence unit for the given DB connection (e.g. given DB url, driver, username and password) to be able to find out whether the entity class exists and if not, to be able to add the generated class into the right persistence unit. By now, we are able to find the existing persistence unit using ProviderUtil.getProvider(pUnit), Provider.*, ProviderUtil.getProperty(pUnit, propertyName) methods. If these methods are going to survive in NB 6.0, it is sufficient to add us (org.netbeans.modules.form.j2ee) as friends to j2ee\persistence module.
I see that the relevant methods in ProviderUtil still exist in the trunk codebase, and Matisse is a friend of the persistence module. So if there are no changes planned for 6.0, then we are done, right? Are we done then?
From my point of view, though the methods still exist, I'd keep this open until the j2ee/persistence friend API has been cleaned up a bit (similarly to issue 96777). There might be a need for some minor changes in some of the ProviderUtils methods.
I cleaned up the ProviderUtil class a bit and added / improved JavaDocs. The methods you need for this are still there and you've been added as a friend, so I'm closing this now.