I'm learning EJB and have a few questions. Pardon me if the questions don't make sense (It would be great though if can tell me why they don't make sense).
Here are the questions:
Q1: Will the container clean up an entity bean if it decides to put the bean back in the pool (may be because it wants to load some other data in the bean)?
Q2: Why isnt there a method called unsetSessionContext() in the SessionBean interface, like we have unsetEntityContext() in the EntityBean interface?
Q3: Does it make sense to define our finder methods of an entity bean in a remote home interface? Or, for that matter, is it a good design choice to have only local interfaces for the all the entity beans and then have accessed by session beans, which are in turn accessed by the clients?
Q4: Other side of question 3, is there any scenario where it is a good design choice to distribute your entity and session beans in different machines, as in a distributed computing environment, i.e., your entity beans running on a server in Texas, your session beans running on a server in California and you have clients accessing the entity beans through the session beans (not directly)?