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.
NB 5.5 build from April 12, 2005 1. Create a web project 2. Launch the New Persistence Unit wizard 3. "Persistence Provider" field lists all three providers (TopLink, Hibernate, KODO plus DEFAULT) => it should only list those that are actually available on the server
BTW, I will use the same code in PU visual editor, once you create the code to check the available providers pls fix it also there.
PU panel and PU wizard panel are prepared for getting the available persistence providers from the server plugins. The providers (Hibernate, TopLink, Kodo) are checked for availability by calling J2eePlatform.isToolSupported(toolName:String):boolean where toolName == [org.netbeans.modules.j2ee.persistence.provider.Provider implementation].getProviderClass(). There is also mechanism to find out whether some available provider is default for the platform. For this purpose J2eePlatform.isToolSupported(toolName:String):boolean is called with toolName equal to one of following literals: "hibernatePersistenceProviderIsDefault" for Hibernate, "toplinkPersistenceProviderIsDefault" for TopLink, "kodoPersistenceProviderIsDefault" for Kodo. The typical implementation on the server plugin side may be following: class J2eePlatformImplForSomePlugin extends J2eePlatformImpl { ... public boolean isToolSupported(String toolName) { ... //"org.hibernate.ejb.HibernatePersistence" == Provider.HIBERNATE_PROVIDER.getProviderClass() if ("org.hibernate.ejb.HibernatePersistence".equals(toolName)) { return <does this plugin contain Hibernate persistence provider?>; } if ("hibernatePersistenceProviderIsDefault".equals(toolName)) { return true; } ... return false; } ... } The toolName values and the whole mechanism of finding out the available persistence providers are considered to be a temporary solution until we have some API/SPI for that. ----------------------------------------------------- cvs server: scheduling file `PersistenceProviderComboboxHelper.java' for addition on branch `release55' cvs server: use 'cvs commit' to add this file permanently Checking in unit/PersistenceUnitPanel.form; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/unit/Attic/PersistenceUnitPanel.form,v <-- PersistenceUnitPanel.form new revision: 1.1.2.4.2.12; previous revision: 1.1.2.4.2.11 done Checking in unit/PersistenceUnitPanel.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/unit/Attic/PersistenceUnitPanel.java,v <-- PersistenceUnitPanel.java new revision: 1.1.2.7.2.21; previous revision: 1.1.2.7.2.20 done Checking in wizard/unit/PersistenceUnitWizardPanelDS.form; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/wizard/unit/Attic/PersistenceUnitWizardPanelDS.form,v <-- PersistenceUnitWizardPanelDS.form new revision: 1.1.2.2; previous revision: 1.1.2.1 done Checking in wizard/unit/PersistenceUnitWizardPanelDS.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/wizard/unit/Attic/PersistenceUnitWizardPanelDS.java,v <-- PersistenceUnitWizardPanelDS.java new revision: 1.1.2.4; previous revision: 1.1.2.3 done RCS file: /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/util/Attic/PersistenceProviderComboboxHelper.java,v done Checking in util/PersistenceProviderComboboxHelper.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/util/Attic/PersistenceProviderComboboxHelper.java,v <-- PersistenceProviderComboboxHelper.java new revision: 1.1.2.1; previous revision: 1.1 done
This issue can be closed if the implementation for the AS plugin is done, see the issue 75356.
*** Issue 75356 has been marked as a duplicate of this issue. ***
Implementation for the AS plugin is done
Verified NetBeans5.5Dev200606220200