web server - Borland Technical Publications
web server - Borland Technical Publications web server - Borland Technical Publications
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
- Page 1 and 2: Developer’s Guide Enterprise Serv
- Page 3 and 4: Contents Chapter 1 Introduction to
- Page 5 and 6: Entity beans . . . . . . . . . . .
- Page 7 and 8: Chapter 23 Using JMS 209 Configurin
- Page 9 and 10: Entity Bean Properties (applicable
- Page 11 and 12: Figures 0.1 Borland Enterprise Serv
- Page 13 and 14: BES Products and Editions overview
- Page 15 and 16: Documentation conventions Important
- Page 17 and 18: Contacting Borland support World Wi
- Page 19 and 20: BES services overview Figure 0.1 Bo
- Page 21 and 22: The Partition and its services ■
- Page 23 and 24: Borland Enterprise Server and J2EE
- Page 25 and 26: 14 BES Developer’s Guide
- Page 27 and 28: Creating Partitions Creating Partit
- Page 29 and 30: Running Partitions Table 3.1 Option
- Page 31 and 32: Configuring Partitions You can also
- Page 33 and 34: JMX support in Partitions ■ ■ A
- Page 35: JMX support in Partitions Figure 3.
- Page 39 and 40: 28 BES Developer’s Guide
- Page 41 and 42: Apache web server implementation Fo
- Page 43 and 44: Borland web container implementatio
- Page 45 and 46: Borland web container implementatio
- Page 47 and 48: Borland web container implementatio
- Page 49 and 50: Smart Agent implementation Smart Ag
- Page 51 and 52: 40 BES Developer’s Guide
- Page 53 and 54: Apache web server to Borland web co
- Page 55 and 56: Apache web server to Borland web co
- Page 57 and 58: Apache web server to Borland web co
- Page 59 and 60: Large data transfer Downloading lar
- Page 61 and 62: Large data transfer Uploading large
- Page 63 and 64: IIS web server to Borland web conta
- Page 65 and 66: IIS web server to Borland web conta
- Page 67 and 68: IIS web server to Borland web conta
- Page 69 and 70: Session management with JSS If an i
- Page 71 and 72: Managing and configuring the JSS Co
- Page 73 and 74: The Borland IIOP connector BES supp
- Page 75 and 76: Setting up your web container with
- Page 77 and 78: 66 BES Developer’s Guide
- Page 79 and 80: Web-enabling your CORBA server Impo
- Page 81 and 82: Configuring your Apache web server
- Page 83 and 84: Configuring your Apache web server
- Page 85 and 86: Web Services and Partitions ■ ■
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