Community
Participate
Working Groups
Build ID: I20070323-1616 Steps To Reproduce: 1. Create an EJB project of EJB 2.0 specification 2. Create a session Bean. 3. Add a transient field to the session bean. 4. Build the project The following message is displayed in the Problems view. CHKJ2452W: A transient field should not be the {0} type (EJB 2.0: 7.4.1). This warning is reproduced regardless of the type of the field. Also, the type name is not replaced in the message. More information:
EJB 2.0 spec is quite old already to investigate team resources on this. However, any patch contributions by the community will be appreciated.
Created attachment 110771 [details] Patch I investigated the bug. There is the following descriptions in EJB specifications. --------------------------------------------- The Bean Provider must assume that the content of transient fields may be lost between the ejbPassivate and ejbActivate notifications. Therefore, the Bean Provider should not store in a transient field a reference to any of the following objects: SessionContext object; environment JNDI naming context and any its subcontexts; home and component interfaces; and the User-Transaction interface. --------------------------------------------- Therefore, there is processing that judges whether the type is JNDI naming context. But, the method is not actually implemented, and it always returns by true. I attach a patch that corrects the judgment processing as well as other types. The message problem (not embedding type name) is also corrected in the patch. Please refer to the patch for details.
Thanks for the patch, Masashi! Chuck, the patch looks good for me, but please have a review since the validation code is in the j2ee.core plugin.
looks good - approved
Committed to HEAD and R3_0_maintenance. Released to build.