Jetty GBeans


The default setup of the Jetty binary distribution of Geronimo runs in a generic configuration that is appropriate for a development environment. However, when moving to a test or production environment, you will usually want to change the way the server is configured. This can be accomplished by editing the config.xml file when the server is shut down.

Important

When you remove a GBean via the config.xml, you are basically turning it off or stopping it. To do this, you must add a load="false" attribute to the <gbean> element.

This section references most of Jetty’s GBeans that you will likely alter for configuration. Although there are several other Jetty based GBeans, they are typically statically configured in a configuration and need not be altered. Those will not be covered here.

Table 10-4 shows the configurable properties of the JettyContainerImpl GBean - the Jetty container that provides for the central integration of Jetty into Geronimo.

Table 10-4: The JettyContainerImpl GBean
Open table as spreadsheet

Type

Name

Req

Description

A

objectName

Yes

This parameter is a string representation of the objectName that is passed from Geronimo automatically when it is created from a plan file and does not need to be declared.

A

collectStatistics

No

true or false. Flag to represent whether the container should collect statistics. Defaults to false.

Legend

Type: (A) – Attribute, (R) – Reference to GBean

Req: (Yes) – parameter is required, (No) – not required

HTTPConnector (see Table 10-5) is the GBean that provides HTTP type connectors.

Table 10-5: The HTTPConnector GBean
Open table as spreadsheet

Type

Name

Req

Description

A

name

Yes

A unique name to identify this connector.

A

protocol

No

The protocol of this connector. May be HTTP only. Defaults to HTTP if not declared.

A

host

No

Which IP address to listen on. If set to 0.0.0.0, then it will listen on all IP addresses. Defaults to 0.0.0.0.

A

port

Yes

Declares which port to listen on.

A

minThreads

No

Minimum number of threads.

A

maxThreads

No

Maximum number of threads or concurrent requests. Defaults to 200.

A

redirectPort

No

Will redirect to the same URL but on the declared port to an SSL connector if web.xml has a security-constraint requiring SSL. Defaults to False.

A

connectUrl

No

Read-only. Returns a string displaying the connector URL.

A

maxIdleTimeMs

No

Maximum time in milliseconds a thread will be attached to a connection without activity.

A

lowThreads

No

The thread count that acts as a threshold for considering the container running with a low thread count. It generally used in conjunction with the lowThreadsMaxIdleTimeMs.

A

lowThreads MaxIdleTimeMs

No

Sets Jetty’s lowResourcePersistTimeMs, which represents the maximum time in milliseconds a thread will be attached to a connection without activity, when the server is low on thread resources. This allows you to change thread-holding behavior when resources are low.

A

acceptQueueSize

No

Maximum size of queue to accept requests before refusing connections. Default is 10.

A

lingerMillis

No

Length of time in milliseconds the sockets will linger. Defaults to -1 (disabled).

A

tcpNoDelay

No

Sets the TCP_NO_DELAY on the sockets. Defaults to True.

A

bufferSizeBytes

No

The input stream buffer size in bytes. Defaults to 2048.

R

JettyContainer

Yes

Named reference to the JettyContainer-Impl GBean.

Legend

Type: (A) – Attribute, (R) – Reference to GBean

Req: (Yes) – parameter is required, (No) – not required

HTTPSConnector (see Table 10-6) is the GBean that provides a HTTPS type connector and is used primarily for SSL. You may declare multiple connectors per container.

Table 10-6: The HTTPSConnector GBean
Open table as spreadsheet

Type

Name

Req

Description

A

name

Yes

A unique name to identify this connector.

A

protocol

No

The protocol of this connector. May be only HTTPS. Defaults to HTTPS if not declared.

A

host

No

Which IP address to listen on. If set to 0.0.0.0, then it will listen on all IP addresses. Defaults to 0.0.0.0.

A

port

Yes

Declares which port to listen on.

A

keystore FileName

No

The path and filename of the keystore file. Relative paths will be relative to $GERONIMO_HOME. Defaults to use the .keystore in the user who is running Geronimo’s home directory.

A

keystore Password

No

The password of the server certificate that is stored in the keystore file.

A

keyPassword

No

The password of the private key.

A

keystoreType

No

The type of keystore file used. Defaults to JKS.

A

algorithm

No

Encoding algorithm. Defaults to SunX509.

A

secureProtocol

No

SSL Protocol used. Defaults to TLS.

A

clientAuthRequired

No

Requires that all SSL connections contain a valid client-side certificate chain. Defaults to False.

A

clientAuthRequested

No

Requests that all SSL connections contain a valid client-side certificate chain. Useful for server-mode-based sockets. Defaults to False.

A

maxThreads

No

Maximum number of threads or concurrent requests. Defaults to 200.

A

minSpareThreads

No

Number of thread created upon starting the connector. This value should be smaller then the maxThreads attribute. Defaults to 4.

A

maxSpareThreads

No

Number of threads in the pool that are unused. Defaults to 50.

A

redirectPort

No

Will redirect to the same URL but on the declared port to an SSL connector if the web.xml has a security-constraint requiring SSL. Defaults to False.

A

connectUrl

No

Read-only. Returns a string displaying the connector URL.

A

maxIdleTimeMs

No

Maximum time in milliseconds a thread will be attached to a connection without activity.

A

lowThreads

No

The thread count that acts as a threshold for considering the container running with a low thread count. It generally used in conjunction with lowThreadsMaxIdleTimeMs.

A

lowThreads MaxIdleTimeMs

No

Sets Jetty’s lowResourcePersistTimeMs, which represents the maximum time in milliseconds a thread will be attached to a connection without activity, when the server is low on thread resources. This allows you to change thread-holding behavior when resources are low.

A

acceptQueueSize

No

Maximum size of queue to accept requests before refusing connections. Default is 10.

A

lingerMillis

No

Length of time in milliseconds the sockets will linger. Defaults to -1 (disabled).

A

tcpNoDelay

No

Sets the TCP_NO_DELAY on the sockets. Defaults to True.

A

bufferSizeBytes

No

The input stream buffer size in bytes. Defaults to 2048.

R

JettyContainer

Yes

Named reference to the JettyContainer GBean.

R

ServerInfo

Yes

Reference to a ServerInfo GBean.

Legend

Type: (A) – Attribute, (R) – Reference to GBean

Req: (Yes) – parameter is required, (No) – not required

AJP13Connector (see Table 10-7) is the GBean that provides HTTP type connectors.

Table 10-7: The AJP13Connector GBean
Open table as spreadsheet

Type

Name

Req

Description

A

name

Yes

A unique name to identify this connector.

A

protocol

No

The protocol of this connector. May be AJP only. Defaults to AJP if not declared.

A

host

No

Which IP address to listen on. If set to 0.0.0.0, then it will listen on all IP addresses. Defaults to 0.0.0.0.

A

port

Yes

Declares which port to listen on.

A

minThreads

No

Minimum number of threads.

A

maxThreads

No

Maximum number of threads or concurrent requests. Defaults to 200.

A

redirectPort

No

Will redirect to the same URL but on the declared port to an SSL connector if the web.xml has a security-constraint requiring SSL. Defaults to False.

A

connectUrl

No

Read-only. Returns a string displaying the connector URL.

A

maxIdleTimeMs

No

Maximum time in milliseconds a thread will be attached to a connection without activity.

A

lowThreads

No

The thread count that acts as a threshold for considering the container running with a low thread count. It generally used in conjunction with lowThreadsMaxIdleTimeMs.

A

lowThreadsMaxIdleTimeMs

No

Sets Jetty’s lowResourcePersistTimeMs, which represents the maximum time in milliseconds a thread will be attached to a connection without activity, when the server is low on thread resources. This allows you to change thread-holding behavior when resources are low.

A

acceptQueueSize

No

Maximum size of queue to accept requests before refusing connections. Default is 10.

A

lingerMillis

No

Length of time in milliseconds the sockets will linger. Defaults to -1 (disabled).

A

tcpNoDelay

No

Sets the TCP_NO_DELAY on the sockets. Defaults to True.

A

bufferSizeBytes

No

The input stream buffer size in bytes. Defaults to 2048.

R

JettyContainer

Yes

Named reference to the JettyContainerImpl GBean.

Legend

Type: (A) – Attribute, (R) – Reference to GBean

Req: (Yes) – parameter is required, (No) – not required

NCSARequestLog (see Table 10-8) is the standard access logger for Jetty.

Table 10-8: The NCSARequestLog logger GBean
Open table as spreadsheet

Type

Name

Req

Description

A

fileName

No

The filename to use. If the filename contains “yyyy_mm_dd”, then the file rolls over nightly and is aged according to the retain Days setting for number of days to hold the log. Default is logged to System.err.

A

logDateFormat

No

The date/time format string to use for logging the date and time (for example - dd/MMM/yyyy:HH:mm:ss ZZZ).

A

logTimeZone

No

Time zone to be used in the log.

A

retainDays

No

If file is rolled over, the number of days to retain the log.

A

extended

No

If file is to use the extended log format. May be True or False.

A

append

No

If log may append to an existing log file. May be True or False.

A

ignorePaths

No

Comma-delimited string of URL paths to ignore in the log.

A

preferProxied ForAddress

No

If present in the header, prefer to log the proxied-for IP address. May be True or False.

R

JettyContainer

Yes

Named reference to the JettyContainer GBean.

R

ServerInfo

Yes

Reference to a ServerInfo GBean.

Legend

Type: (A) – Attribute, (R) – Reference to GBean

Req: (Yes) – parameter is required, (No) – not required




Professional Apache Geronimo
Professional Apache Geronimo (Wrox Professional Guides)
ISBN: 0471785431
EAN: 2147483647
Year: 2004
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net