J2EE Service Factory

Discussions

J2EE patterns: J2EE Service Factory

  1. J2EE Service Factory (36 messages)


    J2EE Service Factory

    Pattern Class: Creational/Structural
    Also Known As: Abstract Factory + Fa?ade

    Intent:
    (1) Define a stateless or statefull session bean factory as a single interface for creating and distributing handles to all system-wide services. (creational)
    (2) Define an interface for creating service components, but distribute them via an alternate, homogenized interface. (structural)

    Motivation:
    ? Large distributed applications may require a number of outside connections to databases and legacy sources that become difficult to manage over time.
    ? These same applications may have the need to plug new legacy sources into the framework while causing minimal disruption to existing application logic.
    ? Large J2EE applications may be distributed throughout an organization making the sharing of services between containers problematic and unstructured.
    ? Diverse resources will require access to distinct and same services for different purposes. These shared services across variant resources should utilize the same services in a generic way. Obfuscate the service APIs.

    Applicability:
    Use the service factory when
    ? You are connecting to a large number of outside data sources (legacy, directory, or databases) and the system should be independent of how its products are created, composed, and represented via specialized home and remote interfaces
    ? You wish to use a single point of reference for distributing horizontal services across containers – a system should be configured with one of multiple families of products
    ? You wish to construct a framework that supports pluggable services (A component can’t anticipate the type of component it must create)
    ? Components delegate responsibility to one of several helper subclasses and you want to localize the knowledge of which helper subclass is the delgate
    ? A family of related components is intended to be used together and you wish to enforce the constraint

    Structure:
    The structure is shown in the following UML diagrams. EJBHome, EJBObject, and SessionBean are shown to provide a reference point to Home, Remote, and Bean objects or interfaces. An alternate structure is to provide the ServiceFactory with Local interfaces (in EJB 2.0) for components that reside in the same container. This object graph does not implement that scenario.

    Three diagrams are provided:
    ? ServiceFactory is shown with the generalized abstract interfaces that it will deliver to client requesters.
    ? A family implementation is shown (IBM MQ Series) as a reference to demonstrate the use of the abstracted interface.
    ? A product family is shown (MOM) to demonstrate the common abstracted interface.
     
    Service Factory and its abstract interfaces:
     <not shown here, links not available yet>
     
    The implementation of concrete components within an abstract family:
     Graphics and Code Snippets are found in this Word document
     
    A view of a family&#8217;s common heritage:
     Graphics and Code Snippets are found in this Word document

     
    Participants:
    ? Service Factory (Stateless or Statefull session bean)
    ? Abstract Product (Interface)
    ? Concrete Product (EJB component)
    ? Client (uses only the service factory and abstract product)

    Consequences:
    ? Large distributed applications are easier to manage with a single point of creation and distribution of services
    ? The creation of a pluggable interface that can enable rapid deployment of new services
    ? Services can be created and shared from a single container to several
    ? Product/service families can provide a fa?ade to the entire family of components &#8211; thereby allowing simpler, more consistent client code
    ? Product/service families are required to enforce the family interface
    ? When statefull session beans are used for the service factory, the factory can be a single point of security for access to distributed sources (potentially in conjunction with a directory service)
    ? Compile time interface checking is enforced for the product families (by the use of an interface that the EJB Remote interface inherits from)
    ? The whole service factory and product families are highly portable
    ? For non-local lookups there is the additional overhead of looking up one additional component per client request. (client->factory->product family)

    Implementation:

    Client Code Snippet:
    Graphics and Code Snippets are found in this Word document

    Factory Code Snippet:
    Graphics and Code Snippets are found in this Word document

    Threaded Messages (36)

  2. J2EE Service Factory[ Go to top ]

    I have implemented similar design in my project. It really makes actual implementation transparent to the application developers.
  3. J2EE Service Factory[ Go to top ]

    One word.. Jini.

  4. J2EE Service Factory[ Go to top ]

    After reading some of your replays Jesse, I'm thinging starting to use Microsucks ".net".
  5. J2EE Service Factory[ Go to top ]

    Could you please send your documents to idouglas at dssinc dot ca, our firewall is preventing me from accessing them.

    Thanks,
    Ian Douglas
  6. J2EE Service Factory[ Go to top ]

    The url is not working can send me the source code for both Server and Client.tanmoyjava@yahoo.com
  7. J2EE Service Factory[ Go to top ]

    Even I am not able to access the code Snippets for both Factory and Client, can you send me the same at anilkg at niit dot com.

  8. J2EE Service Factory[ Go to top ]

    Still cannot access code snippets.
  9. J2EE Service Factory[ Go to top ]

    I am unable to download the document. could you plz forward that documents to this id: raman@operamail.com
  10. J2EE Service Factory[ Go to top ]

    I'm unable to access the code snippets
  11. J2EE Service Factory[ Go to top ]

    Unable to download the code. Please email at "rajanshankar at yahoo dot com". Thanks.
  12. J2EE Service Factory[ Go to top ]

    I am unable to download the document too. I hope that you can send to me one copy to : javier.gabriele@neoris.com
  13. J2EE Service Factory[ Go to top ]

    Unable to download the code. Please email at "middlewareonline at hotmail dot com". Thanks.
  14. J2EE Service Factory[ Go to top ]

    Unable to download the code. Please email at "a dot garcia at grupoaige dot com". Thanks.
  15. J2EE Service Factory[ Go to top ]

    Unable to get the documents. Can you please send it on arpit_c@hotmail.com
  16. J2EE Service Factory[ Go to top ]

    I cant't download the source.Please mail to me.thanks;
    taphoon8676@suho.com
  17. J2EE Service Factory[ Go to top ]

    I cant't download the source too.Please mail to me.thank u very much;
    ppp_927@hotmail.com
  18. J2EE Service Factory[ Go to top ]

    Hi this is Hrishi here.

    I have the same request as the others.Can you make the documents avialable somewhere so we all can access them and thereby understand this much needed implementation.

    Else I request you to mail me the docs at hrane at telegea dot com.

    Thanks
    Hrishi
  19. J2EE Service Factory[ Go to top ]

    The same, it's sad to not access the doc. the subject seems very convenient and important
  20. J2EE Service Factory[ Go to top ]

    ...And another one.
    Please can u post he relevent docs to stagari at hotmail dot com

    thnx
  21. J2EE Service Factory[ Go to top ]

    another one. can't access the documnts. please send it to marco dot michel at wuerttembergische dot de. thanks.
  22. J2EE Service Factory[ Go to top ]

    Can't access the docs either... Please send to greg dot bragg at agf dot com

    Thanks.
  23. J2EE Service Factory[ Go to top ]

    Hi, another one. Please send the docs to tw@star-trac.com. Thanks,
    Thorsten
  24. J2EE Service Factory[ Go to top ]

    The url is not working can send me the source code for both Server and dlejrtn at unitel dot co dot kr
    Plz...
  25. J2EE Service Factory[ Go to top ]

    Hi,

    the link is broken. Would you please send me the code to sascha dot benkart at gmx dot de.


    Thanks
  26. J2EE Service Factory[ Go to top ]

    Is it possible to send your snippets for this pattern to timlsdrummond at hotmail dot com. (J2EE Service Factory)
    Thanks Tim D.
  27. J2EE Service Factory[ Go to top ]

    Unable to download the code. Please email at "rav-lad at yande dot ru". Thanks.
  28. J2EE Service Factory[ Go to top ]

    Sorry: bad email
    Unable to download the code. Please email at "rav-lad at yandex dot ru". Thanks.
  29. Can't access the docs either... Please send to szuyeu@iba.by
  30. can't access docs, please email to p_neal@hotmail.com
  31. can't download the code snippets[ Go to top ]

    can anyone send me a copy at hau at oxygensoft dot com? please?
  32. J2EE Service Factory[ Go to top ]

    I am unable to download the document too.
    I hope that you can send to me one copy to : r dot tetzlaff at online dot de
    Thanks.
  33. Please send docs[ Go to top ]

    Hi, can someone please forward the docs / materials as well to cooperneil at yahoo dot com ?

    Thanks.
  34. Not able to download the docs[ Go to top ]

    Could someone please send the docs to the following email - "ashoknare at yahoo dot com" ?

    Thanks in advance.
  35. J2EE Service Factory[ Go to top ]

    The links in this article are broken. Can you please mail the docs to sridhar dot duddala at wipro dot com.

    Thanks in advance.
  36. J2EE Service Factory[ Go to top ]

    Can anybody please mail me the documents at mohitguptauor at coolgoose dot com

    Looking fwd,

    Thanks
  37. unable to access urls[ Go to top ]

    I'm unable to access urls, Would you please send me the docs and code to heverson.sillos@gmail.com