I'm working on assignment project (part II) and found that it would be nice to work with JEE 5. As I'm studing EJB 3.0 specification I learnt that there are patterns that no longer match with EJB 3.0 approach. Two of the most common patterns do not have any sense for me:
Transfer Object (TO): If you're using Java Persistence API (JPA) the entities are itself TOs, so an specific TO for that does not make any sense.
Service Locator: Well, it's hard for me to think of a service locator because it's quite easy to lookup ejbs (both remote and local) and we also no longer have the home interface... Any thoughts on this?
Joined: Apr 07, 2003
I have'nt had a chance to look at JavaEE5 yet, and yes I agree that it may call some patterns. However, it may not kill the two you stated.
TransferObject(Value Object): This pattern does'nt have a lot to do with entity beans. So even if you just had entities a Transfer object could strip down the data from the entity or at times combine the data from more than one entity and give the relevant data to the client. I dont see this pattern getting killed.
Service Locator: Once again this is used to locate services (EJB(s) or not). And more over this pattern gives clear seperation of concerns from the client who needs a particular service and the lookup involved in getting that service. So once again, I dont see this pattern getting killed.
Others who are familar with JavaEE5 may have a different opinion though.