In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly analyzes the relevant knowledge points of EJB entry knowledge, the content is detailed and easy to understand, the operation details are reasonable, and has a certain reference value. If you are interested, you might as well follow the editor to have a look, and follow the editor to learn more about "what is the basic knowledge of EJB?"
Application developers can focus on supporting the business logic required by the application without having to worry about the implementation of the surrounding framework. In getting started with EJB, the EJB specification explains in detail some of the smallest but necessary services, such as transactions, security, and names. Software vendors meet the requirements of these specifications to ensure that an enterprise bean can use a necessary service. The specification does not specify how vendors implement these services. This makes it more difficult to learn EJB by reading the specification because it allows vendors to provide some enhancements without sacrificing the portability of core services.
JavaBeans and Enterprise JavaBeans
JavaBeans is the component model of Java. Events and attributes are defined in the JavaBeans specification. Enterprise JavaBeans also defines a Java component model, but the Enterprise JavaBeans component model and the JavaBeans component model are different. JavaBeans focuses on allowing developers to visually manipulate components in development tools. The JavaBeans specification explains in detail the application programming interface and semantics for event registration, transmission, identification, and attribute usage, customization, and persistence between components. The focus of Enterprise JavaBeans is to define in detail a service framework model that can deploy Java components in portably. Therefore, there is no mention of events, because enterprise bean usually does not send or receive events. There is also no mention of properties-property customization is not done at development time, but is described at run time (actually at deployment time) through a deployment descriptor.
Don't look for similarities between JavaBeans and Enterprise JavaBeans. They are all component model specifications, but the former illustrates the problem of application assembly in development tools, while the latter focuses on the details of the service framework in which components are deployed. Don't mistakenly think that JavaBeans is for client-side development and Enterprise JavaBeans is for server-side development. JavaBeans can also be used as a component model for non-graphical server-side Java application development. The difference is that when you use JavaBeans to create server applications, you also have to design the entire service framework. Using the Enterprise Javabeans framework is ready-made, you only need to follow its APIs. For complex server-side applications, it is obviously easier to use Enterprise JavaBeans than to redevelop it. These are more important for getting started with EJB.
Enterprise JavaBeans architecture
EJB servers are high-end processes or applications that manage EJB containers and provide access to system services. EJB server can also provide the vendor's own features, such as optimized database access interface, access to other services (such as CORBA services), support for SSL 3.0, and so on. An EJB server must provide name service and transaction service support for accessible JNDI. Some examples of possible servers for getting started with EJB are:
Database server
Application server
Middleware server
An EJB container is an abstraction that manages one or more EJB classes / instances. It enables the EJB entry class to access the required services through the interfaces defined in the specification. Container vendors can also provide interfaces for additional services in containers or servers.
There is no specification for the interface between the EJB server and the EJB container. Because currently containers are usually provided by EJB servers, once the interface is standardized, the vendor may provide containers that can be run on any compatible EJB server.
The Home interface lists all methods for locating, creating, and deleting instances of the EJB class. The Home object is the implementation of the home interface. The EJB class developer must define the home interface. The container vendor should provide methods for generating home object implementations from the home interface.
The remote interface (remote interface) lists the business methods in the EJB class. EJBObject implements the remote interface and the client accesses the business methods of the EJB instance through it. The EJB class developer defines the remote interface, and the container developer provides the method to generate the corresponding EJBObject. The client cannot get a reference to its EJB instance, only its EJBObject instance. When the client invokes a method, the EJBObject accepts the request and passes it to the EJB instance, providing the necessary wrapper functionality in the process. The client application locates, creates, and deletes the instance of the EJB class through the home object, and invokes the business method in the instance through EJBObject. Clients can be programmed with Java, access home objects and EJBObject through Java RMI, or program in other languages and access through CORBA/IIOP, so that deployed server-side components can be accessed through the CORBA interface.
This is the end of the introduction to "what is the basic knowledge of EJB?" more relevant content can be searched for previous articles, hoping to help you answer questions and questions, please support the website!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.