We have all gotten used to resolving homes of related objects and other resources in either ejbCreate/setSessionContext (for Session beans) or in setEntityContext (for Entity beans), however, does the same thing apply to actual Entity bean references as well?
For example, suppose that there is a set of mostly “static” (never changing) Entity beans in the system. Things such as GenderEntityBean (Male, Female or Unknown). Further suppose, that some stateless Session bean needs to use these entities. There are many different ways that these Entities can be obtained:
1. Look them up in the function which uses them 2. Look them up in the setEntityContext of the Session and “cache” them as member variables 3. Call a helper Session bean to retrieve the Entities (helper Session bean could either do 1 or 2 above)
The same can be said if another Entity bean needs to do similar caching.
Which, if any, of the above methods is recommended. If options 2 or 3 are used, will this work correctly with transactions? Will the cached object “enter” an existing transaction when it is first referenced from such a transaction.
Thanks.
-- -AP_ http://www.myprofiles.com/member/profile/apara_personal http://www.myprofiles.com/member/profile/apara_business
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
