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.
[Build 20050208] Steps: 1) create bean 2) select bean in logical view and invoke Add | Create method 3) change method name to MethodCreate1 The home is created instead of create method: public test.BMPLocal ejbHomeMethodCreate1(java.lang.String param1) throws javax.ejb.CreateException { //TODO implement ejbHomeMethodCreate1 }
As the EJB 2.1 spec (10.6.4 and 12.2.3) says: The entity bean class must implement the ejbCreate<METHOD> methods that correspond to the create<METHOD> methods specified in the entity bean's home interface. It means, create method must always start with "create" prefix.
The IDE should generate right methods in bean class, e.g. when user create select method METHOD1 then the ejbSelectMETHOD1 must be generated in abstract class and in DD
I need to discuss this issue with HIE, what is the best way to force user to write method name in given format (ejbSelect<REST-OF-NAME>)
Okay, based on the discussion we had I propose to do a basic and simple solution with inline error messages and disabling the OK button if the name provided by the user doesn't match the required name pattern. Lets use this inline error messages for method types... Select method must start with "ejbSelect" prefix. Create method must start with "create" prefix. Finder method must start with "find" prefix. John (Geertjan) please check that it is in English. For every method type that requires a certain prefix the default value should have only the portion, which is possible to change, selected. For select method the default name would be something like: "ejbSelectByColumn" where only "ByColumn" is selected so that if the user starts typing she doesn't modify the prefix. For other methods it would be: createBean (Bean is selected) findByKey (ByKey is selected)
Fixed. UI change! Checking in Bundle.properties; /cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/nodes/Bundle.properties,v <-- Bundle.properties new revision: 1.2; previous revision: 1.1 done Checking in MethodCollectorFactory.java; /cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/nodes/MethodCollectorFactory.java,v <-- MethodCollectorFactory.java new revision: 1.2; previous revision: 1.1 done Checking in MethodCustomizer.java; /cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/nodes/MethodCustomizer.java,v <-- MethodCustomizer.java new revision: 1.5; previous revision: 1.4 done
The english is fine. Thanks for the heads up. Please mark all UI bugs with the UI keyword so we can search for them.
Unfortunately there is a minor problem with the latest fix for this issue. Last line in file Bundle.properties was added without linefeed. bash-2.05$ cd j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/nodes/ bash-2.05$ tail -1 Bundle.properties LBL_MethodName_Empty_Error=Specify method name.bash-2.05$ We have automated process, that integrates changes from CVS repository to TeamWare workspaces (where files are under SCCS control), and SCCS utilities treat file as "binary", if there is no linefeed at the end of file. So, originally file Bundle.properties was checked in as "text", and now 'sccs delta' cannot update file, because it cannot change type of file. We can find a workaround, but the easiest way is to fix this problem in CVS repository. Please, add linefeed to the end of file Bundle.properties (or let me know if this is undesired or impossible, and I'll implement a workaround). Thanks in advance, Nikolay Molchanov (Nikolay.Molchanov@sun.com)
Done. Thanks for info! Checking in Bundle.properties; /cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/nodes/Bundle.properties,v <-- Bundle.properties new revision: 1.3; previous revision: 1.2 done
[Build 20050314]