web server - Borland Technical Publications

web server - Borland Technical Publications web server - Borland Technical Publications

techpubs.borland.com
from techpubs.borland.com More from this publisher
12.11.2014 Views

Thread pools The following code snippet shows how to deploy the custom MBean. javax.naming.Context context = new javax.naming.InitialContext(); server = (MBeanServer)context.lookup("java:comp/env/jmx/MBeanServer"); // Create an ObjectName for the MBean ObjectName name = new ObjectName("qa:mbeanName=helloworld,mbeanType=Standard"); com.borland.enterprise.qa.mbeans.helloworld.HelloWorld hello = new com.borland.enterprise.qa.mbeans.helloworld.HelloWorld(); server.registerMBean(hello,name); // Invoke a method on it server.invoke(name, "reloadConfiguration", new Object[0], new String[0]); // Get an attribute value Integer times = (Integer)server.getAttribute(name, "HowManyTimes"); Locating the JMX agent If you are unsure whether the JMX agent is running, use one of the following methods to locate it. ■ ■ Use osfind. To achieve uniqueness, the name of the JmxAgent running inside a Partition is derived as follows: ___JmxAgent For example, a Partition with the following specs for each of the components: ___JmxAgent will be registered with the following name in osagent: ojms_RKHAWAJA2_openjms_JmxAgent will show the following output on running osfind: prompt% set OSAGENT_PORT= prompt% osfind osfind: Following are the list of Implementations started manually. HOST: 172.20.20.53 REPOSITORY ID: RMI:javax.management.remote.rmi.RMIServer:0000000000000000 OBJECT NAME: ojms_RKHAWAJA2_openjms_JmxAgent Use the Borland Management Console. When you right-click on the Partition, and choose Launch JMX Console, the feature will only work if the JMX Agent is properly configured for the Partition and the Partition is running. Thread pools Default thread pool A Partition can process multiple concurrent application requests using Visibroker thread and connection management. Threads are assigned to process application requests from a thread pool configured through an entity called a server engine. Several server engines, and hence thread pool configurations, are available in Visibroker. By default, a Partition uses a thread pool for server engine IIOP. Chapter 3: Partitions 25

Thread pools Partition properties relevant to the configuration of this pool can be browsed and edited in the Partition Properties dialog of a Partition displayed in the Borland Management Console. For more information refer to Chapter 2, “Using Partitions.” Configuration of the default thread pool is achieved through the partition vbroker.properties configuration file. The necessary properties are automatically configured in BES Partitions. The configuration file is located under /var/ domains//configurations//mos//adm/properties/ vbroker.properties, and they are described in the VisiBroker for Java Developer's Guide. Auxiliary thread pool The auxiliary thread pool is used internally by a Partition to ensure that the default thread pool is used exclusively for application requests, and to prevent issues such as distributed deadlocks. The auxiliary thread pool is defined through configuration of a VisiBroker server engine called aux_se. Configuration of the auxiliary thread pool is achieved through the partition vbroker.properties configuration file. The necessary properties are automatically configured in BES Partitions. They are described in the following table. Table 3.3 Auxiliary thread pool properties Property Default value Description vbroker.se.aux_se.host null Specifies the host name that can be used by this server engine. The default value, null, means use the host name from the system. Host names or IP addresses are valid values. vbroker.se.aux_se.proxyHost null Specifies the proxy host name that can be used by this server engine. The default value, null, means use the host name from the system. Host names or IP addresses are valid values. vbroker.se.aux_se.scms aux_tp Specifies the Server Connection Manager name. vbroker.se.aux_se.scm. aux_tp.manager.type vbroker.se.aux_se.scm. aux_tp.manager.connectionMa x vbroker.se.aux_se.scm.aux_t p.manager.connectionMaxIdle vbroker.se.aux_se.scm. aux_tp.listener.type vbroker.se.aux_se.scm. aux_tp.listener.port vbroker.se.aux_se.scm. aux_tp.listener.proxyPort vbroker.se.aux_se.scm. aux_tp.listener.giopVersion vbroker.se.aux_se.scm. aux_tp.dispatcher.type vbroker.se.aux_se.scm. aux_tp.dispatcher.threadMin Socket Specifies the type of Server Connection Manager. 0 Specifies the maximum number of connections to the server. The default value, 0 (zero), indicates that there is no restriction. 0 Specifies the time in seconds that the server uses to determine whether an inactive connection should be closed. IIOP Specifies the type of protocol the listener is using. 0 Specifies the port number used with the host name property. The default value, 0 (zero), indicates that the system will pick a random port number. 0 Specifies the proxy port number used with the proxy host name property. The default value, 0 (zero), indicates that the system will pick a random port number. 1.2 This property can be used to resolve interoperability problems with older VisiBroker ORBs that cannot handle unknown minor GIOP versions correctly. Valid values for this property are 1.0, 1.1 and 1.2. ThreadPool Specifies the type of thread dispatcher used in the Server Connection Manager. 0 Specifies the minimum number of threads that the Server Connection Manager can create. 26 BES Developer’s Guide

Thread pools<br />

Partition properties relevant to the configuration of this pool can be browsed and edited<br />

in the Partition Properties dialog of a Partition displayed in the <strong>Borland</strong> Management<br />

Console. For more information refer to Chapter 2, “Using Partitions.”<br />

Configuration of the default thread pool is achieved through the partition<br />

vbroker.properties configuration file. The necessary properties are automatically<br />

configured in BES Partitions. The configuration file is located under /var/<br />

domains//configurations//mos//adm/properties/<br />

vbroker.properties, and they are described in the VisiBroker for Java Developer's<br />

Guide.<br />

Auxiliary thread pool<br />

The auxiliary thread pool is used internally by a Partition to ensure that the default<br />

thread pool is used exclusively for application requests, and to prevent issues such as<br />

distributed deadlocks. The auxiliary thread pool is defined through configuration of a<br />

VisiBroker <strong>server</strong> engine called aux_se.<br />

Configuration of the auxiliary thread pool is achieved through the partition<br />

vbroker.properties configuration file. The necessary properties are automatically<br />

configured in BES Partitions. They are described in the following table.<br />

Table 3.3<br />

Auxiliary thread pool properties<br />

Property Default value Description<br />

vbroker.se.aux_se.host null Specifies the host name that can be used by<br />

this <strong>server</strong> engine. The default value, null,<br />

means use the host name from the system.<br />

Host names or IP addresses are valid values.<br />

vbroker.se.aux_se.proxyHost null Specifies the proxy host name that can be used<br />

by this <strong>server</strong> engine. The default value, null,<br />

means use the host name from the system.<br />

Host names or IP addresses are valid values.<br />

vbroker.se.aux_se.scms aux_tp Specifies the Server Connection Manager<br />

name.<br />

vbroker.se.aux_se.scm.<br />

aux_tp.manager.type<br />

vbroker.se.aux_se.scm.<br />

aux_tp.manager.connectionMa<br />

x<br />

vbroker.se.aux_se.scm.aux_t<br />

p.manager.connectionMaxIdle<br />

vbroker.se.aux_se.scm.<br />

aux_tp.listener.type<br />

vbroker.se.aux_se.scm.<br />

aux_tp.listener.port<br />

vbroker.se.aux_se.scm.<br />

aux_tp.listener.proxyPort<br />

vbroker.se.aux_se.scm.<br />

aux_tp.listener.giopVersion<br />

vbroker.se.aux_se.scm.<br />

aux_tp.dispatcher.type<br />

vbroker.se.aux_se.scm.<br />

aux_tp.dispatcher.threadMin<br />

Socket<br />

Specifies the type of Server Connection<br />

Manager.<br />

0 Specifies the maximum number of connections<br />

to the <strong>server</strong>. The default value, 0 (zero),<br />

indicates that there is no restriction.<br />

0 Specifies the time in seconds that the <strong>server</strong><br />

uses to determine whether an inactive<br />

connection should be closed.<br />

IIOP<br />

Specifies the type of protocol the listener is<br />

using.<br />

0 Specifies the port number used with the host<br />

name property. The default value, 0 (zero),<br />

indicates that the system will pick a random port<br />

number.<br />

0 Specifies the proxy port number used with the<br />

proxy host name property. The default value, 0<br />

(zero), indicates that the system will pick a<br />

random port number.<br />

1.2 This property can be used to resolve<br />

interoperability problems with older VisiBroker<br />

ORBs that cannot handle unknown minor GIOP<br />

versions correctly. Valid values for this property<br />

are 1.0, 1.1 and 1.2.<br />

ThreadPool Specifies the type of thread dispatcher used in<br />

the Server Connection Manager.<br />

0 Specifies the minimum number of threads that<br />

the Server Connection Manager can create.<br />

26 BES Developer’s Guide

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!