aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Abstract Factory or Factory pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Abstract Factory or Factory pattern" Watch "Abstract Factory or Factory pattern" New topic
Author

Abstract Factory or Factory pattern

Shankar Ranganathan
Ranch Hand

Joined: Sep 19, 2001
Posts: 71
Which pattern is used for EJBHome Interface. I know Factory pattern is definitely used.But I am not sure if Abstract factory is there.Please explain.


Shankar<br />Post mock questions in<br /><a href="http://groups.yahoo.com/group/scea_mock" target="_blank" rel="nofollow">http://groups.yahoo.com/group/scea_mock</a>
Rufus BugleWeed
Ranch Hand

Joined: Feb 22, 2002
Posts: 1551
If you go back in time in this forum this question has been discussed many times. I think EJBHome is a proxy. Others have had other opinions.
Kevin Thompson
Ranch Hand

Joined: May 04, 2001
Posts: 237
This is a religious question.
Sort of like - "How many angels can dance on the head of a pin"?
It is best not to even think about the religious questions on the SCEA exam. You might be driven insane.
Kevin
Thomas Hofmann
Ranch Hand

Joined: Nov 23, 2002
Posts: 72
:roll: Abstract Factory
Shankar Ranganathan
Ranch Hand

Joined: Sep 19, 2001
Posts: 71
Hi ,
Abstract factory would be a collection of factory method. To say it is an Abstract Factory pattern it should able to produce different factories.What are the the different factories ejbHOme produce?kindly explain
Debanjana Dasgupta
Ranch Hand

Joined: Aug 11, 2000
Posts: 101
I think Factory.
Please see this thread.
http://www.coderanch.com/t/150355/java-Architect-SCEA/certification/Home-Interface-Abstract-Factory-or
Thanks
Debanjana


Thanks<br /> <br />Debanjana<br /> <br />SCJP2<br />SCEA
Shankar Ranganathan
Ranch Hand

Joined: Sep 19, 2001
Posts: 71
Thanks Debanjana
Thomas Hofmann
Ranch Hand

Joined: Nov 23, 2002
Posts: 72
I think Abstract Factory (actually I'm convinced it is) and I will try to explain, why.
A client first gets a reference to home object which implements the EJBHome interface. This home object is the container (vendor) implementation of the EJBHome interface of the EJB2.0 API (analogous to AbstractFactory).
At deployment the container creates an implementation of your bean's home interface (analogous to ConcreteFactory). This objects (ConcreteFactory) also extends the home object (AbstractFactory). You has to provide a home interface for each EJB (Product). However, the container generates an implementation (ConcreteFactory) for it at deployment. So there are container implementations (ConcreteFactories) for each home interface of the bean provider which eventually create the appropriate bean (Product).
Make this sense ?
Thomas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Abstract Factory or Factory pattern