Learn some J2EE every week, make a point notes.
Objective: You can use WebSphere to develop J2EE development work.
Come on! Come on! ! Come on! ! !
Architecture
1) Component: A application-level software unit J2SE has JavaBeans; J2EE has an EJB (Enterprise JavaBeans) 2) System-level physical container provides: Running, Lifecycle Management, Security, Deployment, Thread 3) Applet, and Customer Applications Components perform their own Java Virtual Machine (JVM) 4) Web Components: Software Entities, Response Requests Usually two components for user interface J2EE based on web-based applications: ◎ servlets ◎ JavaServer Pages (JSP)
2. Web components
1) The servlet expansion web server's function receives the client request and returns the result of the dynamic result to the client. The result is usually rendered in the form of an HTML or XML document. 2) JavaServer Pages (JSP) provides dynamic content for the client based on the text Document Processing Requests Confligence Contains: Formatting Web Documents Template Data for Web Documents Generating Dynamic Contents and Smoots 3) Web Components Contains Different Types of Containers in the container: Servelet supports HTTP JSP web containers to access J2EE service, And interact with API services
3. Enterprise JavaBeans (EJB) architecture
1) Server technology development and deploy business logic components of the enterprise application system, is a component based on distributed transaction processing. 2) Two Categories Beans: Session Beans: Session Beans: Session Beans ◆ Provide services for clients, usually single client / server mode ◆ Operation session beans: Complete calculations, access databases through the client ◆ may be Business Action ◆ If its container crashes, session beans are unpackable 4) Entity Beans Entity Beans ◆ Provides an object of the database for data in the database, and the data of the entity Beans is usually stored in the following data.: Rational Database management system; old data in large machines ◆ Entity Beans can survive with the data it represents. If you are not used, the entity beans will be terminated ◆ Benefic by the primary key ◆ If its container crashes, entity beans (including primary keys and remote references) can be repaired, when the server is restarted, the information stored in the entity beans will be Put in the new container. 5) EJB component container ◆ Supervisor Beans ◆ Provide business and persistent service ◆ Provide access J2EE service, and how to interact with API
4. J2EE role
1) The role is a unique 2) A organization only needs to change the role to make a specific environment 3) role is: ◆ J2EE Product Provider (J2EE finished provider) ◆ Application Component Provider (Application Component Provider) ◆ Application Assembler ◆ Deployer ◆ System Administrator ◆ Tool Provider 4) J2ee Product Provider ◆ Typical IT Product Provider ◆ Run J2EE by providing the following services Finished: ◎ Component Container ◎ J2EE platform API ◎ Other features have been defined in the J2EE specification: Unexpectedly defined in the J2EE specification, IT product providers can use this to extend their products 5) Application Component Provider ◆ Provided ◎ HTML text designer ◎ Programming code editor ◎ EJB development ◆ This role uses a certain tool to make J2EE applications and components ◎ This role is the development J2EE platform, or on the J2EE platform to do business application development The essential. 5. System Administrator
6) Application Assembler ◆ By assembly components, the application components will be compiled into a complete J2EE application ◆ Pass in the form of an enterprise archive (.ear suffix) ◆ Provide assembly instructions for the deployment of the enterprise application: Applications ◎ Skirts of SQL files ◎ Script to be executed ◎ Creating a table or database 7) Deployer ◆ Experts in a specific operating environment ◆ Responsible: ◎ Deployment web application ◎ Deployment EJB ◆ Deployment process is usually three Level Procedure ◎ Installation of Enterprise Application ◎ Configuration ◎ Implementation 8) System Administrator is responsible ◆ Configuring and managing data calculations and network construction ◆ Supervision deployment J2EE application runtime ◆ may need to use some special runtime monitoring And management tools to complete the task
6. Tool Provider: Tools that provide applications for application components deployment and packaging
◆ Divided into two types of ◎ stand-alone platform tool: available for all development environments ◎ non-stand-alone platform tools: available for application deployment, management, and monitoring, you must pay attention to such tools for an environment, pay attention Limitations of each specific role
※ There is no need to spend too much time in J2EE Product Provider and Tool Provider roles.
The following contents are reproduced:
EJB architecture: EJB's upper distributed application is an API technology based on the object component model, low-level transaction service. EJB technology simplifies the development, configuration, and execution of enterprise application systems written in Java language. The specification of the EJB architecture is developed by Sun Microsystems. Inprise's EJB container is a norm based on version 1.1. EJB technology defines a set of reusable components: Enterprise Beans. You can take advantage of these components, build your distributed application like wood. When you write the code, these components are combined into a specific file. Each file has one or more Enterprise Beans, plus some configuration parameters. Finally, these Enterprise Beans are configured to a platform with EJB containers. Customers are able to locate a beans through these beans's Home interface, and generate an instance of this beans. In this way, customers can call Beans Application and Remote Interface. The EJB server manages EJB containers and functions as bridges of the container and low-level platforms. It provides the ability to access system services to the EJB container. For example: the management and transaction management of the database, or for other Enterprise application servers. All EJB instances run in the EJB container. The container provides a system-level service that controls the life cycle of EJB. Because the container has mastered the vast majority of system-level Issues (huh, I don't know how to translate). Enterprise Beans Developers do not need to apply logic consideration. In general, the EJB container has the following system-level Issues. 1, the Deployment Descriptor defines different application functions that customers accessible. The container reaches this effect by accessing these functions that only allow authorized customers. 2, the Remote Connectivity-Container manages the low-level communication Issues for the remote link, and the developers of the Enterprise Beas have hidden the developers of communication Issues.Enterprise Beans when writing application methods, as is in the bar Local platforms. Customers are not clear that the methods they call may be processed remotely. 3, Life Cycle Managment - Customer Create an instance of Enterprise Beans and usually cancel an instance. The container manages instances of Enterprise Beans, enabling Enterprise Beans to maximize the maximum efficiency and memory utilization. The container can activate and deactivate Enterprise Beans to keep many of the instance pools shared by many customers. and many more. 4. The TRASCTION Management-Configuration Description Defines the requirements for transaction processing of Enterprise Beans. The container manages complex Issues that manages distributed transactions. These transactions may have to update the database between different platforms. The container makes each of these transactions independently and does not interfere with each other. Ensure that all updated databases are successful, and whether they are rolled back to the state before transaction. Enterprise Beans Components: Enterprise Beans is a component of an enterprise-class application based on distributed transactions. All Enterprise Beans have the following features: Enterprise Beans contains application logic for processing corporate data. Enterprise Beans Provider defines the client interface of Enterprise Beans (Remote Interface of Enterprise Beans). Such interfaces are not affected by the containers and servers. Thus, when an Enterprise Beans is set to an application, do not change the code and recompile.
Enterprise Beans can be customized for various system-level services, such as security and transactional features, are not belonging to Enterprise Beans Class. Instead, it is implemented by a tool for configuring and assembling an application. There are two types of Enterprise Beans: Session Beans and Entity Beans. (There is a Message Driven Bean, which is temporarily unable to discuss) Session Beans: Session Beans is an object that is performed as a single client. As a corresponding to the remote task request, the container generates an instance of a session beans. A session beans have a client. To a certain extent, a session bean represents its client.session beans that it can be used for transactions, but it does not directly describe these Shared data. The life cycle of Session Beans is relatively short. Typically, only when the Client keeps the session, Session Beans is alive. Once the client exits, Session Beans will no longer be associated with the Client. Session Beans is seen as instantaneous, because if the container crashes, the client must re-establish a new session object to continue the session. A session bean is typical to declare interoperability or conversation with Client. That is, the session bean masters the information of the client through the method of the method during the customer session. A stateful session bean called a stateful session bean. When the client terminates interoperability with the session beans. The session is terminated, and the bean no longer has a status value. A session bean may also be a stateless session bean. The stateless session beans do not have information or status of its customers. Client can call Beans to complete some operations. However, Beans only knows the parameter variable of the client when the method is called. Beans do not continue to maintain these parameter variables after the method call is completed. Thus, all instances of all stateful session beans are the same unless it is in the method call. In this way, the SESSION Beans that can support multiple clients. The container can declare a stateless session beans. You can specify any session beans to any client. Entity Beans: Entity Beans provides an object in the database. view. For example: an Entity bean can simulate a line of data in a database table. Multiple clients can share access to the same entity bean. Multiple Client can also access the same Entity Bean.EnTity Beans to access or update the underlying data through the context of the transaction. In this way, the integrity of the data can be guaranteed. Entity Beans can survive the time of relatively long, and the status is continuous. Entity Beans has always survive as long as the data in the database exists. Not in accordance with the application or service process. Even if the EJB container crashes, Entity Beans is also survived. The Entity Beans life cycle can be managed by the container or Beans. If the container is controlled to ensure continuous ISSUS for Entity Beans. If you manage it yourself by Beans, you must write the code of Entity Beans, including access to the database. Entity Beans is identified by the primary key (a unique object identifier) of Primary Key).