Dear All,
We have the following design for our application:
As you can see, the flow of the system is as follows:
The Struts action class locates the fa�ade remote interface through the service locator, and calls the desired method.The fa�ade delegates the call to the appropriate local stateless session bean.The local bean calls the corresponding stored procedure from the database, wraps the result in the appropriate value object, and hand it back to the caller. I have two questions:
1. The fa�ade methods are duplicated in the local beans, the only difference is that the local beans categorizes the methods in terms of functionality, otherwise they are exactly the same. Therefore, I feel that the fa�ade layer here is unnecessary; it should be removed and replaced by a Business Delegate at the client side. The local session beans interfaces should be converted to remote to be accessible to the delegate.
Is this correct? 2. I can�t see the point of EJBs existence here at all, since their only functionality is to call the stored procedure and wrap the result with the appropriate value object, and we are not using any of the features that the
EJB container provides, such as transactions and security. So I think that the EJB tier should be replaced by DAOs, which are POJOs of course, to do this job.
Am I right? Best regards,
[ March 28, 2006: Message edited by: Nadeem Awad ]