Originally posted by Vladas Razas:
Heh, I am afraid I am gonna get something like that in exam. I don't really understand how this work. And currently I dont see any reason to make local beans too. I think the performance gain from that would be maybe 10%, depends on what you do. But it compromises scalability and reusability of beans.
10%? Think about an entity bean with ten attributes. Using the remote interface to retrieve all ten attributes will have a larger performance impact over the local interface than 10% I'd bet. For larger business methods, yes, the performace gain of local interfaces is not as much, but for accessing entity beans I wouldn't have it any other way. In fact, I expose *only* the local interface for entity beans and both local and remote interfaces for session beans.