-
J2EE Service Factory (36 messages)
- Posted by: Jeff Pollock
- Posted on: May 21 2001 14:12 EDT
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’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 – 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 documentThreaded Messages (36)
- J2EE Service Factory by Sandeep Chaturvedi on May 23 2001 13:46 EDT
- J2EE Service Factory by Jesse Kuhnert on May 29 2001 11:04 EDT
- J2EE Service Factory by Audun Wilhelmsen on August 13 2001 09:10 EDT
- J2EE Service Factory by Ian Douglas on September 07 2001 11:35 EDT
- J2EE Service Factory by Tanmoy Das on November 21 2001 07:47 EST
- J2EE Service Factory by anil gouniyal on January 05 2002 07:33 EST
- J2EE Service Factory by brian walsh on January 10 2002 12:50 EST
- J2EE Service Factory by ramachandrarao P on March 19 2002 03:50 EST
- J2EE Service Factory by Heinz Ebensperger on January 22 2002 10:10 EST
- J2EE Service Factory by Rajan Shankar on November 07 2002 10:12 EST
- J2EE Service Factory by Javier Gabriele on March 19 2002 12:33 EST
- J2EE Service Factory by Middleware Online on April 04 2002 12:03 EST
-
J2EE Service Factory by Aitor Garcia on April 18 2002 07:28 EDT
- J2EE Service Factory by Arpit Chokshi on April 25 2002 11:19 EDT
-
J2EE Service Factory by Aitor Garcia on April 18 2002 07:28 EDT
- J2EE Service Factory by Middleware Online on April 04 2002 12:03 EST
- J2EE Service Factory by taphoon lee on May 13 2002 01:15 EDT
- J2EE Service Factory by pan YM on May 25 2002 00:09 EDT
- J2EE Service Factory by Hrishikesh Rane on June 13 2002 23:34 EDT
- J2EE Service Factory by Régis Barbas on June 19 2002 08:47 EDT
- J2EE Service Factory by Saajid Tagari on June 24 2002 07:37 EDT
- J2EE Service Factory by Marco Michel on July 05 2002 04:39 EDT
- J2EE Service Factory by Gregory Bragg on July 10 2002 14:59 EDT
- J2EE Service Factory by Thorsten Weber on August 16 2002 07:52 EDT
- J2EE Service Factory by Ducksoo Lee on November 04 2002 18:56 EST
- J2EE Service Factory by Sascha Benkart on November 06 2002 18:25 EST
- J2EE Service Factory by Timothy Drummond on December 10 2002 10:16 EST
- J2EE Service Factory by Alexandr Reshetnikov on December 19 2002 06:50 EST
- J2EE Service Factory by Alexandr Reshetnikov on December 20 2002 06:44 EST
- J2EE Service Factory by Alexandr Reshetnikov on December 19 2002 06:50 EST
- Can't access the docs either... Please send to [email protected] by sed sedov on January 22 2003 08:57 EST
- can't access docs, please email to [email protected] by Neal Patel on May 12 2003 16:16 EDT
- can't download the code snippets by Ho-Ki Au on June 07 2003 18:49 EDT
- J2EE Service Factory by Ronny Tetzlaff on November 08 2003 11:01 EST
- Please send docs by Neil Cooper on November 18 2003 20:21 EST
- Not able to download the docs by Ashok Nare on December 30 2003 21:16 EST
- J2EE Service Factory by Sridhar Duddala on February 26 2004 09:44 EST
- J2EE Service Factory by Mohit Gupta on August 06 2004 01:55 EDT
- unable to access urls by Heverson Sillos on March 24 2006 14:44 EST
-
J2EE Service Factory[ Go to top ]
- Posted by: Sandeep Chaturvedi
- Posted on: May 23 2001 13:46 EDT
- in response to Jeff Pollock
I have implemented similar design in my project. It really makes actual implementation transparent to the application developers. -
J2EE Service Factory[ Go to top ]
- Posted by: Jesse Kuhnert
- Posted on: May 29 2001 11:04 EDT
- in response to Jeff Pollock
One word.. Jini.
-
J2EE Service Factory[ Go to top ]
- Posted by: Audun Wilhelmsen
- Posted on: August 13 2001 09:10 EDT
- in response to Jesse Kuhnert
After reading some of your replays Jesse, I'm thinging starting to use Microsucks ".net". -
J2EE Service Factory[ Go to top ]
- Posted by: Ian Douglas
- Posted on: September 07 2001 11:35 EDT
- in response to Jeff Pollock
Could you please send your documents to idouglas at dssinc dot ca, our firewall is preventing me from accessing them.
Thanks,
Ian Douglas -
J2EE Service Factory[ Go to top ]
- Posted by: Tanmoy Das
- Posted on: November 21 2001 07:47 EST
- in response to Jeff Pollock
The url is not working can send me the source code for both Server and [email protected] -
J2EE Service Factory[ Go to top ]
- Posted by: anil gouniyal
- Posted on: January 05 2002 07:33 EST
- in response to Jeff Pollock
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.
-
J2EE Service Factory[ Go to top ]
- Posted by: brian walsh
- Posted on: January 10 2002 12:50 EST
- in response to Jeff Pollock
Still cannot access code snippets. -
J2EE Service Factory[ Go to top ]
- Posted by: ramachandrarao P
- Posted on: March 19 2002 03:50 EST
- in response to brian walsh
I am unable to download the document. could you plz forward that documents to this id: [email protected] -
J2EE Service Factory[ Go to top ]
- Posted by: Heinz Ebensperger
- Posted on: January 22 2002 10:10 EST
- in response to Jeff Pollock
I'm unable to access the code snippets -
J2EE Service Factory[ Go to top ]
- Posted by: Rajan Shankar
- Posted on: November 07 2002 10:12 EST
- in response to Heinz Ebensperger
Unable to download the code. Please email at "rajanshankar at yahoo dot com". Thanks. -
J2EE Service Factory[ Go to top ]
- Posted by: Javier Gabriele
- Posted on: March 19 2002 12:33 EST
- in response to Jeff Pollock
I am unable to download the document too. I hope that you can send to me one copy to : [email protected] -
J2EE Service Factory[ Go to top ]
- Posted by: Middleware Online
- Posted on: April 04 2002 12:03 EST
- in response to Javier Gabriele
Unable to download the code. Please email at "middlewareonline at hotmail dot com". Thanks.
-
J2EE Service Factory[ Go to top ]
- Posted by: Aitor Garcia
- Posted on: April 18 2002 07:28 EDT
- in response to Middleware Online
Unable to download the code. Please email at "a dot garcia at grupoaige dot com". Thanks. -
J2EE Service Factory[ Go to top ]
- Posted by: Arpit Chokshi
- Posted on: April 25 2002 23:19 EDT
- in response to Aitor Garcia
Unable to get the documents. Can you please send it on [email protected] -
J2EE Service Factory[ Go to top ]
- Posted by: taphoon lee
- Posted on: May 13 2002 01:15 EDT
- in response to Jeff Pollock
I cant't download the source.Please mail to me.thanks;
[email protected] -
J2EE Service Factory[ Go to top ]
- Posted by: pan YM
- Posted on: May 25 2002 00:09 EDT
- in response to Jeff Pollock
I cant't download the source too.Please mail to me.thank u very much;
[email protected] -
J2EE Service Factory[ Go to top ]
- Posted by: Hrishikesh Rane
- Posted on: June 13 2002 23:34 EDT
- in response to Jeff Pollock
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 -
J2EE Service Factory[ Go to top ]
- Posted by: Régis Barbas
- Posted on: June 19 2002 08:47 EDT
- in response to Hrishikesh Rane
The same, it's sad to not access the doc. the subject seems very convenient and important -
J2EE Service Factory[ Go to top ]
- Posted by: Saajid Tagari
- Posted on: June 24 2002 07:37 EDT
- in response to Jeff Pollock
...And another one.
Please can u post he relevent docs to stagari at hotmail dot com
thnx
-
J2EE Service Factory[ Go to top ]
- Posted by: Marco Michel
- Posted on: July 05 2002 04:39 EDT
- in response to Jeff Pollock
another one. can't access the documnts. please send it to marco dot michel at wuerttembergische dot de. thanks. -
J2EE Service Factory[ Go to top ]
- Posted by: Gregory Bragg
- Posted on: July 10 2002 14:59 EDT
- in response to Jeff Pollock
Can't access the docs either... Please send to greg dot bragg at agf dot com
Thanks. -
J2EE Service Factory[ Go to top ]
- Posted by: Thorsten Weber
- Posted on: August 16 2002 07:52 EDT
- in response to Jeff Pollock
Hi, another one. Please send the docs to [email protected] Thanks,
Thorsten -
J2EE Service Factory[ Go to top ]
- Posted by: Ducksoo Lee
- Posted on: November 04 2002 18:56 EST
- in response to Jeff Pollock
The url is not working can send me the source code for both Server and dlejrtn at unitel dot co dot kr
Plz... -
J2EE Service Factory[ Go to top ]
- Posted by: Sascha Benkart
- Posted on: November 06 2002 18:25 EST
- in response to Jeff Pollock
Hi,
the link is broken. Would you please send me the code to sascha dot benkart at gmx dot de.
Thanks -
J2EE Service Factory[ Go to top ]
- Posted by: Timothy Drummond
- Posted on: December 10 2002 10:16 EST
- in response to Jeff Pollock
Is it possible to send your snippets for this pattern to timlsdrummond at hotmail dot com. (J2EE Service Factory)
Thanks Tim D. -
J2EE Service Factory[ Go to top ]
- Posted by: Alexandr Reshetnikov
- Posted on: December 19 2002 06:50 EST
- in response to Timothy Drummond
Unable to download the code. Please email at "rav-lad at yande dot ru". Thanks. -
J2EE Service Factory[ Go to top ]
- Posted by: Alexandr Reshetnikov
- Posted on: December 20 2002 06:44 EST
- in response to Alexandr Reshetnikov
Sorry: bad email
Unable to download the code. Please email at "rav-lad at yandex dot ru". Thanks. -
Can't access the docs either... Please send to [email protected][ Go to top ]
- Posted by: sed sedov
- Posted on: January 22 2003 08:57 EST
- in response to Jeff Pollock
Can't access the docs either... Please send to [email protected] -
can't access docs, please email to [email protected][ Go to top ]
- Posted by: Neal Patel
- Posted on: May 12 2003 16:16 EDT
- in response to Jeff Pollock
can't access docs, please email to [email protected] -
can't download the code snippets[ Go to top ]
- Posted by: Ho-Ki Au
- Posted on: June 07 2003 18:49 EDT
- in response to Jeff Pollock
can anyone send me a copy at hau at oxygensoft dot com? please? -
J2EE Service Factory[ Go to top ]
- Posted by: Ronny Tetzlaff
- Posted on: November 08 2003 11:01 EST
- in response to Jeff Pollock
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. -
Please send docs[ Go to top ]
- Posted by: Neil Cooper
- Posted on: November 18 2003 20:21 EST
- in response to Jeff Pollock
Hi, can someone please forward the docs / materials as well to cooperneil at yahoo dot com ?
Thanks. -
Not able to download the docs[ Go to top ]
- Posted by: Ashok Nare
- Posted on: December 30 2003 21:16 EST
- in response to Neil Cooper
Could someone please send the docs to the following email - "ashoknare at yahoo dot com" ?
Thanks in advance. -
J2EE Service Factory[ Go to top ]
- Posted by: Sridhar Duddala
- Posted on: February 26 2004 09:44 EST
- in response to Jeff Pollock
The links in this article are broken. Can you please mail the docs to sridhar dot duddala at wipro dot com.
Thanks in advance. -
J2EE Service Factory[ Go to top ]
- Posted by: Mohit Gupta
- Posted on: August 06 2004 01:55 EDT
- in response to Jeff Pollock
Can anybody please mail me the documents at mohitguptauor at coolgoose dot com
Looking fwd,
Thanks -
unable to access urls[ Go to top ]
- Posted by: Heverson Sillos
- Posted on: March 24 2006 14:44 EST
- in response to Mohit Gupta
I'm unable to access urls, Would you please send me the docs and code to [email protected]