Hello, We are developing a business application based on James for which we are considering the following architectural ideas/rules:
1) Do not put any business logic in the Mailets, for the same reason as why we don't put any business logic in the Servlets. 2) When a Mailet is called, it will package the information from the incoming Mail object into a special "Business Object" (BO). The Mailet may also retrieve data from some other sources, such as LDAP, and put it in the BO. 3) Once the BO is built, the Mailet will pass it on to a Bean. This bean will act as a Session Facade that will control the overall flow of the use case. It will provide services such as "Transaction Management" etc. 4) This Bean will be instantiated as a Singleton. 5) We will use EasyMock to create mock BOs so that we can write stand-alone unit tests that don't require us to start/stop James. I am assuming this is a fairly standard architecutre. Any pros/cons? Any other ideas? Thanks for your time.