I've seen a number of articles where a facade session bean caches an instance of an entity bean local home interface in a session bean field.
Where a entity bean local home interface instance is required in multiple situations is it valid to create a separate singleton class that acts much like a factory and use that to hold the entity bean local home instance. This would at least centralize the code.
Thoughts?
It is a common pattern. See the code that XDoclet generates to do this.
Regards,
Adrian