Chapter 1. Introduction

Table of Contents

1.1. Components
1.2. Domain Administration Server (DAS)
1.3. Managed Server (MS)
1.3.1. Engine Service
1.4. Class Loader Structure
1.5. Directory Structure
1.6. Launcher
1.7. INDEPENDENT Mode of Managed Server

This chapter describes the components of JEUS and the services they provide.

The following are the key components of JEUS.


A domain consists of a single domain administrator server (hereafter DAS) and one or more managed servers (hereafter MS).

DAS is a server that manages a domain. Only one DAS can exist in a domain. It manages domain configurations, and manages and controls applications running in the domain. It also manages MSs in the domain.

The following services are the major services that can only be used in DAS. These services can only be executed on DAS because they have to be managed in domain units. The following services can be used through WebAdmin or the console tool (jeusadmin) by connecting to DAS.

A Managed Server is a server instance that manages engines and services that are required to run the actual applications.

Multiple MSs can be in a domain. MSs run user-deployed applications, and provide services and resources required by the applications.

The following are the key MS services.

An engine corresponds to an EJB container or a web container that is defined in Java EE, and it manages and runs user-deployed components. An engine is included as a service on the server and even without any configuration it automatically starts up using the default settings when the server starts up.

The engine configurations can be changed using WebAdmin or the console tool while the server is running. Refer to the relevant manual for information about the default and dynamic configurations of each engine.

The following are the three types of service engines provided by each server.

EngineDescription
EJB engineActs as an EJB container that manages and executes EJB components. Refer to "JEUS EJB Guide" for more information.
Web engine (or servlet engine)Acts as a web container that receives requests from web clients or web servers and creates dynamic web contents through user-deployed servlets (or JSP, JSF). Refer to "JEUS Web Engine Guide" for more information.
JMS engineProvides Java Message Service (JMS). Refer to "JEUS MQ Guide" for more information.

Note

Up to JEUS 6, engines could not run if the engine is not configured in the engine container, and this prevented applications from running services. If the web engine was not configured, the engine had to be added and JEUS had to be restarted to run web applications.

But starting from JEUS 7, the engines automatically starts up when MSs start up. This way, any type of applications can be deployed and serviced even if the user does not configure the engine.

This section describes the Isolated Class Loader supported in JEUS.

Note

By default, the Shared Class Loader (hereafter Shared) is used in JEUS 5.0, and it is also supported in JEUS 7.0 for backward compatibility. However, it needs to be manually configured, otherwise the Isolated method is used by default. It is not recommended to use the Shared method.

This guide does not cover the Shared class loader.

Applications use a separate class loader to prevent duplicate classes in JEUS. This is called Isolated Class Loader (hereafter Isolated). JEUS complies with the Java EE standards that recommend to use the Isolated Class Loader.

The following is the Isolated Class Loader hierarchy.


Each web module class loader of an application exists under an EJB class loader of the application. A class loader of an application does not request a class from a class loader of another application. When an application needs to use the interfaces of another application, it cannot reference the class loader of the application because JAVA EE standards require that the interfaces be packaged together.

Since the classes are not shared, when deploying an application other applications do not need to be redeployed. The proper use of this class loader requires the binding of related applications into an EAR file to create a single application.

Each server has its own directory under the DOMAIN_HOME folder. They exist in the servers directory under DOMAIN_HOME. Each server has a directory with its server name and stores information that is required to start and operate the server. This directory is called SERVER_HOME.

The following is the directory structure of SERVER_HOME.


.workspace

Space used by each server in JEUS. Must not be modified by the user.

The following table describes each sub-directories.

DirectoryDescription
deployed

Contains the unzipped image files of the applications deployed on the server and the files that were created when the applications were deployed. In this directory, directories are created by using application IDs to store the application files received from DAS. Archived applications will be unzipped by using the application ID (deploy image).

Under the deployed directory, a directory named "_generated_" is created to store the files created when the applications are deployed. In this directory, directories are created by using application IDs to store the files required for deployment.

ejbtimerdbDirectory that is used for Apache Derby (a file-based database that is embedded in JEUS) when the timer services of the EJB engine does not have database configuration. For more information about timer services, refer toJEUS EJB Guide. "Chapter 10. EJB Timer Service".
sessionPath of the file DB used in distributed session server. Distributed session server stores passivated sessions and backup sessions received from the primary session to this file DB. For more information, refer to JEUS Session Management Guide. "2.3. Server Structure".
tmlog

Directory that contains transaction logs required for transaction recovery.

A sub directory is created with the name "_serverName_LOCATION_type_port_ipaddress_virtualport name". The following values are set for the type and virtualhost of the created directory name.

  • type : 0 for IPv4 and 1 for IPv6

  • virtualport : hash value of the server name

For more information, refer to "7.5.2. Recovery Related Log File".

tmpDirectory that is used when temporarily saving files during server operation. There is no particular reason for users to access this directory.

bin

Contains the scripts for starting and stopping the server. The scripts execute the same functions as the scripts in 'JEUS_HOME/bin', but they don't require the configuration of the domain name and server name. The 'startDomainAdminServer/stopserver' script is used for DAS, and 'startManagedServer/stopserver' script is used for MS.

logs

Contains the launcher log, server log, and access log files. According to the rotation rule, each log file is created as "logname_date.log00000" where "00000" represents a number between 1 and 99999. For more information, refer to "Chapter 8. Logging".

nodemanager

Contains configurations and logs. For more information, refer to "JEUS Node Manager User Guide".

Starting from JEUS 7, DAS and MS are started by a launcher. A launcher process is executed when starting a server by using a script or starting MS from DAS. The launcher prepares to start and run the servers.

The launcher performs the following tasks.

  • Receive domain configuration files from DAS.

  • Start the server.

First, the launcher receives the domain configuration files from DAS. The files are domain.xml and security configuration files. When the launcher receives the files, it uses them to start the server JVM. When starting up the server, it reads JVM options and classpaths from the files and uses the options to create the server JVM.

If the launcher process fails to receive the configuration files but there are domain configuration files that are cached on the machine, the launcher will use them to start the server JVM. If the launcher fails to receive the configuration files and there are no cached files, the server cannot be started.

Besides the 2 aforementioned tasks, the launcher process acts as a logger for the server boot logs.

The logs that are generated when the server starts up are logged in the launcher logs. The launcher process starts the server JVM and waits for the server to complete the boot process and records logs that have been generated when the server finishes starting up. If the server fails to boot before the server resets the logger, the launcher logs can be used to check for the cause of the failure.

Generally, the launcher process starts the server JVM and terminates when the server starts up successfully. Note that the server process started by the launcher operates as a background process. Since the server process is started as a child process of the launcher process, it does not have its own console screen.

Hence, to print the server logs on a console screen, the '-verbose' option should be used to start a server. If the '-verbose' option is used, the launcher process does not terminate and it outputs the logs on the screen until the server is terminated. For more information, refer to "8.2.2. JEUS Launcher Logger".

In the INDEPENDENT mode, MSs boot up and operate without using DAS. The INDEPENDENT mode is used when the URL information of DAS doesn't exist during startup or when DAS is in a failed state.

The URL of DAS must be provided as a option when starting an MS. The launcher uses this URL to access the configuration files on DAS. If the URL information is omitted, the launcher cannot receive configuration files from DAS. In this case, the launcher uses the cached configuration files on the server machine, if they exist, and starts up the server in the INDEPENDENT mode. If they don't exist, the server cannot boot.

Even if the configuration files exist on the server machine, the files may be outdated and out of sync with DAS. Therefore, the DAS URL should always be used to start a server.

The DAS URL is not required when DAS and MS are on the same machine, and the domain configuration files do not need to be sent to the MS. If the DAS URL is not used to start a server, the server will run in the INDEPENDENT mode, but once the group management starts on the MS, it can communicate with DAS and switches back to the DEPENDENT mode.

The INDEPENDENT mode is triggered more often due to an error on DAS rather than due to missing URL. When starting an MS, if an error occurs on DAS, the launcher cannot receive the configuration files. After failback, the MSs that are in the INDEPENDENT mode are switched back to the DEPENDENT mode. Their configuration files are synchronized with DAS, and the applications that have failed to deploy are redeployed.

Note

Even if DAS is recovered and the configurations are synchronized, MS should be restarted if the non-dynamic configurations or running applications have been modified.

The following are the logs generated when MS starts in the INDEPENDENT mode.

JEUS_HOME/bin$ ./startManagedServer -domain domain1 -server server1 -u administrator -p adminadmin -
dasurl 61.77.153.160:9736
***************************************************************
  - JEUS Home         : /home/test/jeus                           
  - JEUS Base Port    :
  - Added Java Option :
  - Java Vendor       : Sun
***************************************************************
================ JEUS LICENSE INFORMATION ================
=== VERSION : JEUS 7.0 (Fix#1) (7.0.0.0-b71)
=== EDITION: Enterprise (Trial License)
=== NOTICE: This license restricts the number of allowed clients.
=== Max. Number of Clients: 5
==========================================================
[2012.05.13 23:05:06][0] [launcher-1] [Launcher-0052] Receiving the configuration failed.
 Attempting to start as INDEPENDENT.
<<__Exception__>>
java.io.IOException: Connection failed. host:61.77.153.160, port:9736, virtual
 id:FileTransfer
 at jeus.net.SocketProxy.getConnection(SocketProxy.java:107)
 at jeus.net.SocketProxy.getConnection(SocketProxy.java:42)
 at jeus.server.filetransfer.ConfigurationSynchronizer.connect(
ConfigurationSynchronizer.java:106)
 at jeus.server.filetransfer.ConfigurationSynchronizer.checkConnection(
ConfigurationSynchronizer.java:131)
 at jeus.server.filetransfer.ConfigurationSynchronizer.downloadConfigFileFromDAS(
ConfigurationSynchronizer.java:170)
 at jeus.launcher.ManagedServerLauncher.receiveConfigurationFromDas(
ManagedServerLauncher.java:179)
 at jeus.launcher.ManagedServerLauncher.updateXmls(ManagedServerLauncher.java:59)
 at jeus.launcher.ManagedServerLauncher.readDescriptor(ManagedServerLauncher.java:39)
 at jeus.launcher.Launcher.start(Launcher.java:145)
 at jeus.launcher.ManagedServerLauncher.main(ManagedServerLauncher.java:35)
<<__!Exception__>>
[2012.05.13 23:05:08][0] [launcher-1] [Launcher-0054] Starting the server using
the local configuration.
...
[2012.05.13 23:05:26][0] [server1-1] [SERVER-0249] Successfully started the 
server INDEPENDENTLY
[2012.05.13 23:05:26][2] [server1-1] [SERVER-0248] The JEUS server is RUNNING
[2012.05.13 23:05:26][2] [server1-1] [SERVER-0401] The elapsed time to start: 
17672 ms
[2012.05.13 23:05:26][2] [launcher-10] [Launcher-0034] The server[server1] initialization 
completed successfully[pid : 3388].
[2012.05.13 23:05:26][0] [launcher-1] [Launcher-0040] Successfully started the server. 
The server state is now RUNNING.
JEUS_HOME/bin$ 

Once DAS is restored, MS synchronizes the configurations with DAS, and redeploys any applications that have failed to deploy.

[2012.05.13 23:08:28][2] [server1-66] [Domain-0101] Domain Administration Serverrecovered. server1 is running in DEPENDENT mode now.
[2012.05.13 23:08:28][2] [server1-66] [SERVER-0201] Successfully connected to Domain Administration Server(61.77.153.160:9736)
[2012.05.13 23:08:28][2] [server1-66] [SERVER-0308] Resynchronized the configuration with Domain Administration Server.