Use EJB3.o Simplified EJB Development Original: Debu Panda
We introduce EJB to construct distributed components. It is born to solve all CORBA problems and complexity. After several important version updates and increase many features, EJB has become the core of J2EE. In the early days, many developers were addicted to EJB or even in their works in their work without any meaning. And when they found that the project used did not change, it condemned EJB into a trend.
Developing EJB has never become more complicated even in the early EJB version specification. EJB is compared to an elephant due to its complexity and heavyweight characteristics. Studying more developers feel EJB like a deep layer of sweet syrup on a donut. Today, now Low Carb and Atkins Diet, the EJB Expert Committee also did not choose the room to release the EJB specification reflected in Low Carb to simplify EJB development. EJB3.0 Expert Committee released an example diagram of a lightweight model called EJB3.0, the first public specification of EJB3.0 at the 2004 Javaone Conference.
The first look at the new model of EJB feels very good. In this article we will discuss how EJB3.0 uses a smaller and exquisite assembly to attract developers. In the next article we will discuss how EJB3.0 simplifies the persistence model.
Finishing defect
Before we start discussing the new features brought about EJB3.0, let's first analyze the complexity of the EJB model now.
The current EJB model needs to build many component interfaces and implement many unnecessary rollback methods.
The component interface needs to implement EJBOBJECT or EJBLOCALOBJECT and handles many unnecessary exceptions.
EJB deployment describes the complex and easy error.
The development and management of container persistence management based on EJB model is too complicated. Many basic features are not considered, such as using database sequences and EJBQL definitions of a primary key standard method is very limited.
The EJB component is unlike object-oriented, such as there are too many restrictions when using inheritance and polymorphism.
A main EJB disadvantage is that you cannot get an EJB model with an EJB container and cannot debug an EJB in the container, which is undoubtedly a terrible thing for developers.
If you use EJB you need to be familiar with the complex process of calling and finding EJB. Obviously, you just want to use EJB in the program but you must know the Detailed details of JNDI.