Full width home advertisement

HTML

Tech News

Ad

Introduction to Containers


- Normally, thin-client multitiered applications are hard to write.

- Because they involve many lines of intricate code to handle :
    1) transaction and state management,
    2) multithreading,
    3) resource pooling, and
    4) other complex low-level details.

- The component-based and platform-independent J2EE architecture makes J2EE applications easy to write.

- Because business logic is organized into reusable components.

- In addition, the J2EE server provides underlying services in the form of a container for every component type.

- Because we do not have to develop these services werself, we are free to concentrate on solving the business problem at hand.

Container Services 

- Containers are the interface between a component and the low-level platform-specific functionality that supports the component.

- Before a Web, enterprise bean, or application client component can be executed, it must be assembled into a J2EE application and deployed into its container.

- The assembly process involves specifying container settings for each component in the J2EE application and for the J2EE application itself.

- Container settings customize the underlying support provided by the J2EE server.

- Which includes services such as :
    1) security
    2) transaction management,
    3) Java Naming and Directory Interface (JNDI) lookups, and
    4) remote connectivity.


- The fact that the J2EE architecture provides configurable services.

- Means that application components within the same J2EE application can behave differently based on where they are deployed.

- For example, an enterprise bean can have security settings that allow it a certain level of access to database data in one production environment and another level of database access in another production environment.

- The container also manages nonconfigurable services such as :
    1) Enterprise bean and servlet life cycles,
    2) Database connection resource pooling,
    3) Data persistence, and
    4) Access to the J2EE platform APIs .

- Although data persistence is a nonconfigurable service, the J2EE architecture lets we override container-managed persistence.

- By including the appropriate code in wer enterprise bean implementation when we want more control than the default container-managed persistence provides.

- For example, we might use bean-managed persistence to implement wer own finder (search) methods or to create a customized database cache.


Container Types

- The deployment process installs J2EE application components in the J2EE containers illustrated in Figure.



[Figure: J2EE Server and Containers]


J2EE server

- The runtime portion of a J2EE product. A J2EE server provides EJB and Web containers.
Enterprise JavaBeans (EJB) container :-
    - Manages the execution of enterprise beans for J2EE applications. Enterprise beans and their container run on the J2EE server.

Web container 

- Manages the execution of JSP page and servlet components for J2EE applications.

- Web components and their container run on the J2EE server.

Application client container 

- Manages the execution of application client components.

- Application clients and their container run on the client.

Applet container 

- Manages the execution of applets.

- Consists of a Web browser and Java Plug-in running on the client together.

Tomcat as a Web Container 

- Tomcat is the most popular reference implementation for servlets & JSP.

- We need to Tomcat or another reference implementation to run wer servlets & JSP pages.

- Tomcat is written in JAVA.

- So it needs JAVA Compiler - JDK.

- Tomcat works with JDK 1.2 & later.

- The directory where we install the JDK is referred to as %JAVA_HOME%.

- The next steps very, depending on the OS on which we are installing Tomcat.
 
- When we install Tomcat, installation program creates a number of directories under %CATALINA_HOME%.

No comments:

Post a Comment

Bottom Ad [Post Page]