Java Container Definition

I read / heard many times about java containers, such as a servlet container, however, it seems I can not find a good definition that the container is in the corporate java world.

Does anyone know of a good enterprise java container definition?

+31
java java-ee terminology
Aug 22 '11 at 17:32
source share
8 answers

Turning in general to the container template (from which a corporate Java container can be considered as a specialization), the book "Structural Server Templates" by M.Volter et al. Suggests the following:

[CONTAINER provides] a runtime environment that responds to add technical problems to COMPONENTS ... Conceptually, this wraps COMPONENTS, thereby giving customers the illusion of tightly integrated functional and technical problems.

Examples of such technical issues include security, transaction management, logging, etc.

+17
Aug 22 '11 at 18:00
source share

Common containers in Java EE are the servlet container and the EJB container, and I see them as examples of IoC containers (Inversion of Control). Key aspects are:

  • Your code does not have the main () or โ€œwait for the request logic hereโ€ - the container starts and configures itself, and then ultimately initializes your code and delivers the requests
  • Your code can be one of many similar classes (servlets in a servlet container, EJB in an EJB container) whose instances manage lifecycle containers.
  • Requests are delivered to your servlet or EJB through some protocol defined by the container, using resources (for example, HTTP ports) controlled by the container, and possibly with a significant infrastructure trick (look at the queues of HTTP requests, EJB load balancing, etc. ..)
  • Significant added value from features such as transaction management and security management - since the container calls your code, it is well placed to implement this non-intrusively.
  • The main functionality of the container is a lot of IOC, the container calls your code at the appropriate times, however, the container will also provide useful APIs that your code can call (for example, to receive servlets or EJB contexts.
+35
Aug 22 '11 at 20:32
source share

Java EE Containers

Typically, multitasking thin client applications are difficult to write because they include many lines of complex code to handle transaction and state management, multithreading, resource pooling, and other complex low-level details. Component and platform-independent Java EE architecture makes Java EE applications easy to write because business logic is organized into reusable components. In addition, the Java EE server provides container services for each type of component. Because you do not need to develop these services yourself, you are free to focus on solving business problems.

http://download.oracle.com/javaee/5/tutorial/doc/bnabo.html

+6
Aug 22 '11 at 17:37
source share

The key concept of the container is the inversion of the control , where the application components inside the container can freely be combined with other application components, as well as the lower-level resources on which they depend. For Java, these resources are usually such as database connections, network connections, JNDI, etc.

Different container levels support different specifications, for example, a web / servlet container like tomcat does not support some application level specifications like EJB3, so tomcat cannot integrate ejb for injection into your application.

+4
Aug 22 '11 at 17:45
source share

He is responsible for maintaining individual server-side components, including Java servlets, Java server pages, and Java server faces.

+1
Nov 02 '16 at 5:09
source share

"Containers are the interface between a component and a low-level platform that supports the component. Before a web component can be run as an enterprise bean or a client component of an application, it must be assembled in Java EE and deployed to its container." here is my source: http://docs.oracle.com/javaee/1.4/tutorial/doc/Overview3.html

0
Jan 31 '13 at 16:55
source share

A container is a runtime that brings dynamism. It creates an HTTP response, converts the HTTP request into an object, and creates and manages the servlet's life cycle.

Java EE is a set of specifications that are used to solve corporate problems such as security, scalability, reliability, availability, etc.

The container that manages each Java EE specification is known as the Java enterprise container. For example. glass fish, jboss, etc. (BTW Tomcat is not an EE container, it is a web container)

0
Aug 17 '17 at 15:50
source share

Container - in the context of Java development, refers to the part of the server that is responsible for managing the life cycle of web applications. Web applications define the required lifecycle management using a contract in XML format. The web container cannot be accessed directly by the client. Rather, the server manages the web container, which in turn manages the web application code.

Ref- https://www.techopedia.com/definition/4252/container-java

-one
Jan 17 '17 at 15:05
source share



All Articles