Hi, We have done something very similar using Struts where the web sends an Action (a Command and a Data) to the EJB Tier. Here we have a Command Pattern EJB that analyse this action, do some fine grained security check and then call a set of session beans. These one talk to entity beans using local interfaces. The command is mapped to a class using xml, this class implements the call to the specific session beans (and other things).
What surprise me (well until today ;-) ) is that there is a bunch of patterns that tells "calls your entity beans via a session bean", "use business interface to abstract your client from ejb", but there is none saying "abstract your session bean call through a command pattern" which seems to me as critical to reduce the number of calls between web tier and ejb tier. This commander can then be used from web services client without a change to the session bean (may be I am going too far but the idea is not far) Vincent. Message from Rickard : Use WebWork: http://sourceforge.net/project/webwork With the recent ClientServletDispatcher servlet addition, you can now instantiate actions on the client, send them over to the server (in serialized form), and have them execute on the server. When it's done, the action is sent back, so that the client can access any result data and display it. This has a number of advantages: * optimized format, since serialization is used * no format converters needed. Pure Java * can go through firewalls since HTTP is used * since execution is on server-side, actions can use fine-grained calls to EJB's, i.e. there's no need to optimize the SSB's for remote calls. You can even use local interfaces! * Actions can get data-transfer objects from many entities or session beans at a time * regardless of how complex the use-case is, i.e. no matter how many session beans are involved in it, only one network call is made. (VEEERY IMPORTANT!) All in all, it's a killer solution for Java clients wanting to access J2EE-servers easily and in an optimized manner. Plus, if your client is an applet there is a minimal download of about 10k for the WebWork client instead of having to download huge EJB-packages or XML/SOAP parsers. /Rickard -- Rickard �berg _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
