Community
Participate
Working Groups
An adopter is requesting to backport this bug to WTP 3.2.5P +++ This bug was initially created as a clone of Bug #365653 +++ I need to generate an EJB project, and an EJB Client jar project. But I do not want to add the result to an EAR. I have a different containing application that contains both my EJB and EJB Client projects. The property IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR need to be set to false. This would disable the page where a user can select to generate an EJB Client Jar. We tried to set IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR to true, to enable the UI, and then set it to false only when the user selects to Finish, but that did not work either. Because the underneath Code blocks the EJB Client generation if the IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR is set to false (not only the UI is blocked). The following code snippet in the EjbFacetInstallDataModelProvider class propertySet() method is just the tip of the problem: } else if (propertyName.equals(ADD_TO_EAR)) { boolean addToEar = (Boolean) propertyValue; if (!addToEar && isPropertySet(CREATE_CLIENT)) { model.setBooleanProperty(CREATE_CLIENT, false); // create client disabled! } else { If we leave the IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR to true, the wizard would finish and generates an EAR project , and this is not what we need. Seems this property is used for a double purpose. It actually means a creation of an EAR project and it is used to enable the EJB Client generation. Now we either have no Client jar generation , or we have to end up with an EAR getting generated in the workspace. We need to decouple these two logic with two separate flags. Suggest to add a new flag like ADD_TO_APPLICATION, which does not imply creation of an application, but means that the project would be part of an application.
Created attachment 208340 [details] Proposed patch Proposed patch built using R3_2_5_patches
This same patch was reviewed by the PMC for WTP 3.3.2, and as such merits inclusion in our WTP 3.2.5 patches.
Code committed and released to R3_2_5_patches. Resolving bug.