Certifications: <br />scp2, scea, scwcd, WL7.0, CISSP, XML
Sanjay Raghavan
Ranch Hand
Joined: May 14, 2002
Posts: 148
posted
0
Definitely Factory Method... Reason Abstract factory is used to create a family of dependent classes. Factory method provides an interface for creating objects but lets subclasses decide which one to create. Consider the following eg. javax.ejb.EJBHomejavax.ejb.EJBObject | | | | / \ / \ --- --- | | 1. XxxHome gets instance of 1. Xxx 2. YyyHome gets instance of 2. Yyy The appropriate concrete instance of EJBHome (our factory method generalization), in this case Xxx home or Yyy home (concrete factory) will create the appropriate remote reference object.
HTH.
Sanjay Raghavan<br />SCJP2, SCEA-J2EE<br />Moderator - <a href="http://groups.yahoo.com/group/scea_prep" target="_blank" rel="nofollow">SCEA PREP</a><br />Co-Author - <a href="http://www.whizlabs.com/scea/scea.html" target="_blank" rel="nofollow">SCEA@Whiz</a><br /><i>Where did you sip your Java Today?</i>