Hi Pradeep,
I just had to solve the same problem and went for the following:
o In each client type, have a controller which dispatches the correct
actions to the correct services (c.f. the Struts controller).
o Each controller can then contact the relevant session facade method
(in my case I did this via a client side Business Delegate as both
client types were talking over the network at this point - basically a
skeleton / stub implementation)
This then keeps it nice and tidy. It's a bit more coding but ensures
the design continues to follow the J2EE design goals of extensibility,
flexibility, scalability, etc etc.
Hope this helps.
Cheers, Andrew
Pradeep Kumar wrote:
Hello everyone,
My business layer is accessed by both Swing and web clients. In case of web,
I can have a servlet as controller and apply filters. However, in case of
swing I must have a controller at the business layer (to apply certain
filters for generic pre processing). I think I have 2 options to take care of
this.
1) Have only one SLSB that will act as controller. This will delegate the
business processing to a bunch of POJOs (business objects).
2) Have different SLSB as business facades (normal way), and then have a base
class for all that will have some generic methods for control and pre
processing.
Please let me know the pros and cons of having this approach.
Thanks.
Pradeep
DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Private Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission.
====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@java.sun.com
--
sig.html
Andrew Law
Technical Account Manager
Telephone: 01506 672677
Mobile: 07796 337 826
Facsimile: 01506 672672
|
|
Sun Microsystems UK Ltd
Springfield
Linlithgow
West Lothian
Scotland
EH49 7LR
|
====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@java.sun.com