uCosminexus Application Server, Expansion Guide
Queues can be created on a J2EE application basis or on a bean basis. This subsection describes the configuration of schedule queues and sharing of schedule queues. This subsection also describes the advantages of sharing queues and not sharing queues.
Execution of each request from clients is scheduled by using schedule queues managed by the CTM daemon. Schedule queues can be created on a J2EE application basis or on a bean basis. If schedule queues are created on a J2EE application basis, J2EE application names are used as the default queue names. If schedule queues are created on a bean basis, bean names are used as the default queue names.
Business-processing programs or J2EE application beans that have different interfaces can share a schedule queue that is created on a J2EE application or bean basis. The requests controlled by using schedule queues are managed by using a combination of the EJB home reference name (registered in the global CORBA Naming Service) and the remote interface name (of the business-processing program).
For J2EE applications or beans to share a schedule queue, they must be associated with the same CTM daemon and must satisfy the following conditions.
J2EE applications for which different queue names are specified cannot share a schedule queue even if the J2EE applications consist of the same business-processing programs. Similarly, J2EE applications consisting of different business-processing programs cannot share a schedule queue even if the queue names specified for the J2EE applications are the same.
A schedule queue can be shared across J2EE servers. To share a schedule queue across J2EE servers, use the user-specified namespace functionality to assign an alias (optional name) to each enterprise bean (business-processing program). For details about this functionality, see 2.3 Binding and looking up objects in the JNDI name in the uCosminexus Application Server Common Container Functionality Guide. Make sure that you assign an optional name as a J2EE application property.
This subsection describes the advantages of sharing schedule queues on a J2EE application basis and on a bean basis, separately.
If a schedule queue is shared by J2EE applications, requests can be distributed to J2EE applications on multiple J2EE servers.
Advantages of sharing schedule queues are as follows:
The following figure shows an example of sharing a schedule queue.
Figure 3-1 Example of sharing schedule queues (by J2EE applications)
The EJB client executes lookup for the global CORBA Naming Service. If a schedule queue is shared, the EJB client can obtain a reference to the queue (in this example, a reference to queue X can be obtained). When the EJB client executes create for that queue, the EJB client obtains a reference to the CTM regulator. When the EJB client executes invoke for that reference, schedule queue X distributes processing to J2EE server 1 or J2EE server 2.
If a schedule queue is shared by beans, requests can be distributed to beans on multiple J2EE servers.
Advantages of sharing schedule queues are as follows:
The following figure shows an example of sharing a schedule queue.
Figure 3-2 Example of sharing schedule queues (by beans)
The EJB client executes lookup for the global CORBA Naming Service. If a schedule queue is shared, the EJB client can obtain a reference to the queue (in this example, a reference to queue X can be obtained). When the EJB client executes create for that queue, the EJB client obtains a reference to the CTM regulator. When the EJB client executes invoke for that reference, schedule queue X distributes processing to bean A on either J2EE server 1 or J2EE server 2.
If no schedule queues are shared when the same J2EE applications have been imported on different J2EE servers or when the same beans exist on different J2EE servers, each queue individually controls requests to be executed on a certain server.
No sharing of schedule queues makes it impossible to use load balancing or reduced mode. However, accumulation of requests in a schedule queue does not affect execution of requests in other schedule queues. Therefore, requests in each queue are processed smoothly.
For schedule queues not to be shared, specify different lookup names for the business-processing programs in each J2EE application rather than specifying optional names.
The following figure shows an example of not sharing schedule queues.
Figure 3-3 Example of not sharing schedule queues
The EJB client executes lookup for the global CORBA Naming Service. If no schedule queues are shared, the EJB client can obtain a reference to the queue that controls the specified J2EE application (in this example, a reference to queue X can be obtained). When the EJB client executes create for that queue, the EJB client obtains a reference to the CTM regulator. When the EJB client executes invoke for that reference, processing is distributed to J2EE server 1 that is controlled by schedule queue X.
All Rights Reserved. Copyright (C) 2013, 2015, Hitachi, Ltd.