Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Which patterns were used by Sun in designing the Enterprise JavaBeans model?

0
10 Posted

Which patterns were used by Sun in designing the Enterprise JavaBeans model?

0
10

Many design patterns were used in EJB, and some of them are clearly identifiable by their naming convention. Here are several: • Factory Method: Define a interface for creating classes, let a subclass (or a helper class) decide which class to instantiate. This is used in EJB creation model. EJBHome defines an interface for creating the EJBObject implementations. They are actually created by a generated container class. See InitialContextFactory interface that returns an InitialContext based on a properties hashtable. • Singleton: Ensure a class has only one instance, and provide a global point of access to it. There are many such classes. One example is javax.naming.NamingManager • Abstract Factory: Provide an interface for creating families of relegated or dependent objects without specifying their concrete classes. We have interfaces called InitialContext, InitialContextFactory. InitialContextFactory has methods to get InitialContext. • Builder: Separate the construction of a complex

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.