Fix (APAR): PI63621 Status: Fix Release: 9.0.0.0 Operating System: AIX,HP-UX,IBM i,Inspur K-UX,Linux,OS X,Solaris,Windows,iOS,z/OS Supersedes Fixes: CMVC Defect: xxxxxx Byte size of APAR: 261709 Date: 2016-07-14 Abstract: added incorrectly for annotation only singleton bean Description/symptom of problem: PI63621 resolves the following problem: ERROR DESCRIPTION: Singleton beans which are created from annotations may be incorrectly marked as local beans. LOCAL FIX: PROBLEM SUMMARY USERS AFFECTED: All users of IBM WebSphere Application Server PROBLEM DESCRIPTION: The processing of a singleton bean which is defined through annotations incorrectly marks the singleton bean as a local bean. RECOMMENDATION: None The processing of a singleton bean which is defined through annotations incorrectly marks the singleton bean as a local bean. The problem can be be detected by reviewing the metadata generated for the bean. Metadata for an EJB JAR file, including metadata which is obtained from annotations, is written to the META-INF/ejb-jar_merged.xml file. The file is stored in a profile specific folder for the EJB JAR file, for example: WAS_HOME/profiles/PROFILE_NAME/config/cells/CELL_NAME/applicatio ns/ APPLICATION_NAME.ear/deployments/ APPLICATION_NAME/EJBJAR_NAME.jar/ META-INF/ejb-jar_merged.xml For example, for the following singleton bean: @Singleton @Local(LocalBusinessInterface.class) @Remote(RemoteBusinessInterface.class) public class AnnotationSingletonBean { @PostConstruct public void postConstruct() { } @PreDestroy public void preDestroy() { } } The following incorrect metadata for the single bean is written: AnnotationSingletonBean suite.r90.ejb32.ejbendpoints.content.ejb.LocalBu sinessInterface suite.r90.ejb32.ejbendpoints.content.ejb.Remote BusinessInterface suite.r90.ejb32.ejbendpoints.content.ejb.AnnotationSi ngletonBean Singleton Container suite.r90.ejb32.ejbendpoints.content.e jb.AnnotationSingletonBean postConstruct suite.r90.ejb32.ejbendpoints.content.e jb.AnnotationSingletonBean preDestroy The metadata is correct except for the element. The element should not be present for this bean. Because this singleton bean does not have an @LocalBean annotation and does have @Local and @Remote annotations, the element should not have been added. The element should only be added when the bean has no other endpoint. A bean should not be marked as a local bean if at least one endpoint is specified for the bean. An endpoint for a bean can be specified through a deployment descriptor, by using an annotation supplied directly on the bean class, or specified by using an annotation supplied on an interface implemented by the bean class. An endpoint for a bean is specified as a local endpoint, as a remote endpoint, as a local home endpoint, as a remote home endpoint, or as a web service endpoint. More than one type of endpoint can be specified. PROBLEM CONCLUSION: A code update was made which corrects the processing of singleton beans. The fix for this APAR is currently targeted for inclusion in fix pack 9.0.0.1. Please refer to the Recommended Updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980 Directions to apply fix: Install Fix to all WebSphere installations unless special instructions are included below. Special Instructions: None NOTE: The user must: * Logged in with the same authority level when unpacking a fix, fix pack or refresh pack. * Be at V1.8.5 or newer of the Installation Manager. Certain iFixes may require a newer version of the Installation Manager and the Installation Manager will inform you during the installation process if a newer version is required. The IBM Information Center can provide details, if needed, on the use of the Installation Manager to apply the iFixes. http://www.ibm.com/support/knowledgecenter/SSDV2W_1.8.5/com.ibm.cic.agent.ui.doc/helpindex_imic.html. Shutdown WebSphere Application Server before applying the iFixes. Restart WebSphere Application Server after applying the iFixes. Directions to remove fix: The IBM Information Center can provide details, if needed, on the use of the Installation Manager to remove the iFixes. http://www.ibm.com/support/knowledgecenter/SSDV2W_1.8.5/com.ibm.cic.agent.ui.doc/helpindex_imic.html. Shutdown WebSphere Application Server before removing the iFixes. Restart WebSphere Application Server after removing the iFixes. Directions to re-apply fix: 1) Shutdown WebSphere Application Server. 2) Follow the Fix instructions to apply the fix. 3) Restart WebSphere Application Server. Additional Information: