Community
Participate
Working Groups
Build Identifier: Build id: M20110105-0951 Please see the 'Steps to Reproduce' section Reproducible: Always Steps to Reproduce: 1. Create an 'old' EJB project - version EJB 2.1, from the wizard choose to add it to an EAR project, but don't choose to create a client JAR. 2. So, we have the EJB and the EAR projects created. Create, for example, a stateless session bean. Choose to have all interfaces created. 3. Refactor, for example, its home interface to be nested: put it in an enclosing class. 4. Fix all issues related to the previous step: replace the FQN name of the interface in the ejb-jar.xml with the new one, fix some import statements as well. 5. Trigger the EJB client JAR creation action: right click on the EJB project -> 'Java EE Tools' -> 'Create EJB Client Jar'. Problem: After the action completes, we have the client JAR project created, but the home interface of our stateless session bean is not moved to it. According to the EJB 2.1 specification, the session bean classes must be top-level classes, so they cannot be nested/inner classes. But there is no such restriction for the home/component interfaces of the session beans. So, this is a possible use-case. Notes: Within org.eclipse.jst.j2ee.internal.ejb.archiveoperations.EJBClientJarCreationHelper, the files that have to be moved to the new project, are obtained via the getFilesToMove() method. Internally, it uses the private void computeJavaTypes(JavaClass javaClass) method, which uses the JavaClass API of JEM. The problem is that, when such a reference refers to a nested interfacee type, the used getJavaPackage() and getSimpleName() methods don't yield correct results.
Krum, judging by your build ID, I am assuming that this was done with Eclipse Indigo M4, which corresponds to WTP 3.3 M4. If that is incorrect, please let us know the correct version.