Este contenido no está disponible en el idioma seleccionado.
Appendix A. Reference Material
A.1. Provided Undertow Handlers
AccessControlListHandler
Class Name: io.undertow.server.handlers.AccessControlListHandler
Name: access-control
Handler that can accept or reject a request based on an attribute of the remote peer.
Name | Description |
---|---|
acl | ACL rules. This parameter is required. |
attribute | Exchange attribute string. This parameter is required. |
default-allow |
Boolean specifying whether handler accepts or rejects a request by default. Defaults to |
AccessLogHandler
Class Name: io.undertow.server.handlers.accesslog.AccessLogHandler
Name: access-log
Access log handler. This handler will generate access log messages based on the provided format string and pass these messages into the provided AccessLogReceiver.
This handler can log any attribute that is provides via the ExchangeAttribute
mechanism.
This factory produces token handlers for the following patterns.
Pattern | Description |
---|---|
%a | Remote IP address |
%A | Local IP address |
%b |
Bytes sent, excluding HTTP headers or |
%B | Bytes sent, excluding HTTP headers |
%h | Remote host name |
%H | Request protocol |
%l |
Remote logical username from |
%m | Request method |
%p | Local port |
%q |
Query string (excluding the |
%r | First line of the request |
%s | HTTP status code of the response |
%t | Date and time, in Common Log Format format |
%u | Remote user that was authenticated |
%U | Requested URL path |
%v | Local server name |
%D | Time taken to process the request, in milliseconds |
%T | Time taken to process the request, in seconds |
%I | current Request thread name (can compare later with stack traces) |
common |
|
combined |
|
There is also support to write information from the cookie, incoming header, or the session.
It is modeled after the Apache syntax:
-
%{i,xxx}
for incoming headers -
%{o,xxx}
for outgoing response headers -
%{c,xxx}
for a specific cookie -
%{r,xxx}
wherexxx
is an attribute in the ServletRequest -
%{s,xxx}
wherexxx
is an attribute in the HttpSession
Name | Description |
---|---|
format | Format used to generate the log messages. This is the default parameter. |
AllowedMethodsHandler
Handler that whitelists certain HTTP methods. Only requests with a method in the allowed methods set will be allowed to continue.
Class Name: io.undertow.server.handlers.AllowedMethodsHandler
Name: allowed-methods
Name | Description |
---|---|
methods |
Methods to allow, for example |
BlockingHandler
An HttpHandler that initiates a blocking request. If the thread is currently running in the I/O thread it will be dispatched.
Class Name: io.undertow.server.handlers.BlockingHandler
Name: blocking
This handler has no parameters.
ByteRangeHandler
Handler for range requests. This is a generic handler that can handle range requests to any resource of a fixed content length, for example, any resource where the content-length
header has been set. This is not necessarily the most efficient way to handle range requests, as the full content will be generated and then discarded. At present this handler can only handle simple, single range requests. If multiple ranges are requested the Range
header will be ignored.
Class Name: io.undertow.server.handlers.ByteRangeHandler
Name: byte-range
Name | Description |
---|---|
send-accept-ranges | Boolean value on whether or not to send accept ranges. This is the default parameter. |
CanonicalPathHandler
This handler transforms a relative path to a canonical path.
Class Name: io.undertow.server.handlers.CanonicalPathHandler
Name: canonical-path
This handler has no parameters.
DisableCacheHandler
Handler that disables response caching by browsers and proxies.
Class Name: io.undertow.server.handlers.DisableCacheHandler
Name: disable-cache
This handler has no parameters.
DisallowedMethodsHandler
Handler that blacklists certain HTTP methods.
Class Name: io.undertow.server.handlers.DisallowedMethodsHandler
Name: disallowed-methods
Name | Description |
---|---|
methods |
Methods to disallow, for example |
EncodingHandler
This handler serves as the basis for content encoding implementations. Encoding handlers are added as delegates to this handler, with a specified server side priority.
The q
value will be used to determine the correct handler. If a request comes in with no q
value then the server will pick the handler with the highest priority as the encoding to use.
If no handler matches then the identity encoding is assumed. If the identity encoding has been specifically disallowed due to a q
value of 0
then the handler will set the response code 406 (Not Acceptable)
and return.
Class Name: io.undertow.server.handlers.encoding.EncodingHandler
Name: compress
This handler has no parameters.
FileErrorPageHandler
Handler that serves up a file from disk to serve as an error page. This handler does not serve up any response codes by default, you must configure the response codes it responds to.
Class Name: io.undertow.server.handlers.error.FileErrorPageHandler
Name: error-file
Name | Description |
---|---|
file | Location of file to serve up as an error page. |
response-codes | List of response codes that result in a redirect to the defined error page file. |
HttpTraceHandler
A handler that handles HTTP trace requests.
Class Name: io.undertow.server.handlers.HttpTraceHandler
Name: trace
This handler has no parameters.
IPAddressAccessControlHandler
Handler that can accept or reject a request based on the IP address of the remote peer.
Class Name: io.undertow.server.handlers.IPAddressAccessControlHandler
Name: ip-access-control
Name | Description |
---|---|
acl | String representing the access control list. This is the default parameter. |
failure-status | Integer representing the status code to return on rejected requests. |
default-allow | Boolean representing whether or not to allow by default. |
JDBCLogHandler
Class Name: io.undertow.server.handlers.JDBCLogHandler
Name: jdbc-access-log
Name | Description |
---|---|
format |
Specifies the JDBC Log pattern. Default value is |
datasource | Name of the datasource to log. This parameter is required and is the default parameter. |
tableName | Table name. |
remoteHostField | Remote Host address. |
userField | Username. |
timestampField | Timestamp. |
virtualHostField | VirtualHost. |
methodField | Method. |
queryField | Query. |
statusField | Status. |
bytesField | Bytes. |
refererField | Referrer. |
userAgentField | UserAgent. |
LearningPushHandler
Handler that builds up a cache of resources that a browser requests, and uses server push to push them when supported.
Class Name: io.undertow.server.handlers.LearningPushHandler
Name: learning-push
Name | Description |
---|---|
max-age | Integer representing the maximum time of a cache entry. |
max-entries | Integer representing the maximum number of cache entries |
LocalNameResolvingHandler
A handler that performs DNS lookup to resolve a local address. Unresolved local address may be created when a front end server has sent a X-forwarded-host
header or AJP is in use.
Class Name: io.undertow.server.handlers.LocalNameResolvingHandler
Name: resolve-local-name
This handler has no parameters.
PathSeparatorHandler
A handler that translates non slash separator characters in the URL into a slash. In general this will translate backslash into slash on Windows systems.
Class Name: io.undertow.server.handlers.PathSeparatorHandler
Name: path-separator
This handler has no parameters.
PeerNameResolvingHandler
A handler that performs reverse DNS lookup to resolve a peer address.
Class Name: io.undertow.server.handlers.PeerNameResolvingHandler
Name: resolve-peer-name
This handler has no parameters.
ProxyPeerAddressHandler
Handler that sets the peer address to the value of the X-Forwarded-For
header. This should only be used behind a proxy that always sets this header, otherwise it is possible for an attacker to forge their peer address.
Class Name: io.undertow.server.handlers.ProxyPeerAddressHandler
Name: proxy-peer-address
This handler has no parameters.
RedirectHandler
A redirect handler that redirects to the specified location via a 302
redirect. The location is specified as an exchange attribute string.
Class Name: io.undertow.server.handlers.RedirectHandler
Name: redirect
Name | Description |
---|---|
value | Destination for the redirect. This is the default parameter. |
RequestBufferingHandler
Handler that will buffer all request data.
Class Name: io.undertow.server.handlers.RequestBufferingHandler
Name: buffer-request
Name | Description |
---|---|
buffers | Integer that defines the maximum number of buffers. This is the default parameter. |
RequestDumpingHandler
Handler that dumps an exchange to a log.
Class Name: io.undertow.server.handlers.RequestDumpingHandler
Name: dump-request
This handler has no parameters.
RequestLimitingHandler
A handler which limits the maximum number of concurrent requests. Requests beyond the limit will block until the previous request is complete.
Class Name: io.undertow.server.handlers.RequestLimitingHandler
Name: request-limit
Name | Description |
---|---|
requests | Integer that represents the maximum number of concurrent requests. This is the default parameter and is required. |
ResourceHandler
A handler for serving resources.
Class Name: io.undertow.server.handlers.resource.ResourceHandler
Name: resource
Name | Description |
---|---|
location | Location of resources. This is the default parameter and is required. |
allow-listing | Boolean value to determine whether or not to allow directory listings. |
ResponseRateLimitingHandler
Handler that limits the download rate to a set number of bytes/time.
Class Name: io.undertow.server.handlers.ResponseRateLimitingHandler
Name: response-rate-limit
Name | Description |
---|---|
bytes | Number of bytes to limit the download rate. This parameter is required. |
time | Time in seconds to limit the download rate. This parameter is required. |
SetHeaderHandler
A handler that sets a fixed response header.
Class Name: io.undertow.server.handlers.SetHeaderHandler
Name: header
Name | Description |
---|---|
header | Name of header attribute. This parameter is required. |
value | Value of header attribute. This parameter is required. |
SSLHeaderHandler
Handler that sets SSL information on the connection based on the following headers:
- SSL_CLIENT_CERT
- SSL_CIPHER
- SSL_SESSION_ID
If this handler is present in the chain it will always override the SSL session information, even if these headers are not present.
This handler MUST only be used on servers that are behind a reverse proxy, where the reverse proxy has been configured to always set these headers for EVERY request (or strip existing headers with these names if no SSL information is present). Otherwise it may be possible for a malicious client to spoof an SSL connection.
Class Name: io.undertow.server.handlers.SSLHeaderHandler
Name: ssl-headers
This handler has no parameters.
StuckThreadDetectionHandler
This handler detects requests that take a long time to process, which might indicate that the thread that is processing it is stuck.
Class Name: io.undertow.server.handlers.StuckThreadDetectionHandler
Name: stuck-thread-detector
Name | Description |
---|---|
threshhold |
Integer value in seconds that determines the threshold for how long a request should take to process. Default value is |
URLDecodingHandler
A handler that will decode the URL and query parameters to the specified charset. If you are using this handler you must set the UndertowOptions.DECODE_URL parameter to false
.
This is not as efficient as using the parser’s built in UTF-8 decoder. Unless you need to decode to something other than UTF-8 you should rely on the parsers decoding instead.
Class Name: io.undertow.server.handlers.URLDecodingHandler
Name: url-decoding
Name | Description |
---|---|
charset | Charset to decode. This is the default parameter and it is required. |
A.2. Hibernate Properties
Property Name | Value | Description |
---|---|---|
|
| The class name of the JDBC driver to be used. |
| sa | The username |
| The password | |
|
| The JDBC connection url |
Property Name | Description |
---|---|
hibernate.dialect |
The classname of a Hibernate
In most cases Hibernate will be able to choose the correct |
hibernate.show_sql |
Boolean. Writes all SQL statements to console. This is an alternative to setting the log category |
hibernate.format_sql | Boolean. Pretty print the SQL in the log and console. |
hibernate.default_schema | Qualify unqualified table names with the given schema/tablespace in generated SQL. |
hibernate.default_catalog | Qualifies unqualified table names with the given catalog in generated SQL. |
hibernate.session_factory_name |
The org.hibernate.SessionFactory will be automatically bound to this name in JNDI after it has been created. For example, |
hibernate.max_fetch_depth |
Sets a maximum depth for the outer join fetch tree for single-ended associations (one-to-one, many-to-one). A |
hibernate.default_batch_fetch_size |
Sets a default size for Hibernate batch fetching of associations. The recommended values are |
hibernate.default_entity_mode |
Sets a default mode for entity representation for all sessions opened from this |
hibernate.order_updates | Boolean. Forces Hibernate to order SQL updates by the primary key value of the items being updated. This will result in fewer transaction deadlocks in highly concurrent systems. |
hibernate.generate_statistics | Boolean. If enabled, Hibernate will collect statistics useful for performance tuning. |
hibernate.use_identifier_rollback | Boolean. If enabled, generated identifier properties will be reset to default values when objects are deleted. |
hibernate.use_sql_comments |
Boolean. If turned on, Hibernate will generate comments inside the SQL, for easier debugging. Default value is |
hibernate.id.new_generator_mappings |
Boolean. This property is relevant when using @GeneratedValue. It indicates whether or not the new IdentifierGenerator implementations are used for javax.persistence.GenerationType.AUTO, javax.persistence.GenerationType.TABLE and javax.persistence.GenerationType.SEQUENCE. Default value is |
hibernate.ejb.naming_strategy |
Chooses the org.hibernate.cfg.NamingStrategy implementation when using Hibernate EntityManager. If the application does not use EntityManager, follow the instructions here to configure the NamingStrategy: Hibernate Reference Documentation - Naming Strategies.
For an example on native bootstrapping using MetadataBuilder and applying the implicit naming strategy, see http://docs.jboss.org/hibernate/orm/5.0/userguide/html_single/Hibernate_User_Guide.html#bootstrap-native-metadata in the Hibernate 5.0 documentation. The physical naming strategy can be applied by using |
hibernate.implicit_naming_strategy |
Specifies the
The default setting is defined by the |
hibernate.physical_naming_strategy |
Pluggable strategy contract for applying physical naming rules for database object names. Specifies the PhysicalNamingStrategy class to be used. |
For hibernate.id.new_generator_mappings
, new applications should keep the default value of true
. Existing applications that used Hibernate 3.3.x may need to change it to false
to continue using a sequence object or table based generator, and maintain backward compatibility.
Property Name | Description |
---|---|
hibernate.jdbc.fetch_size |
A non-zero value that determines the JDBC fetch size (calls |
hibernate.jdbc.batch_size |
A non-zero value enables use of JDBC2 batch updates by Hibernate. The recommended values are between |
hibernate.jdbc.batch_versioned_data |
Boolean. Set this property to |
hibernate.jdbc.factory_class | Select a custom org.hibernate.jdbc.Batcher. Most applications will not need this configuration property. |
hibernate.jdbc.use_scrollable_resultset | Boolean. Enables use of JDBC2 scrollable resultsets by Hibernate. This property is only necessary when using user-supplied JDBC connections. Hibernate uses connection metadata otherwise. |
hibernate.jdbc.use_streams_for_binary |
Boolean. This is a system-level property. Use streams when writing/reading |
hibernate.jdbc.use_get_generated_keys |
Boolean. Enables use of JDBC3 |
hibernate.connection.provider_class | The classname of a custom org.hibernate.connection.ConnectionProvider which provides JDBC connections to Hibernate. |
hibernate.connection.isolation |
Sets the JDBC transaction isolation level. Check java.sql.Connection for meaningful values, but note that most databases do not support all isolation levels and some define additional, non-standard isolations. Standard values are |
hibernate.connection.autocommit | Boolean. This property is not recommended for use. Enables autocommit for JDBC pooled connections. |
hibernate.connection.release_mode |
Specifies when Hibernate should release JDBC connections. By default, a JDBC connection is held until the session is explicitly closed or disconnected. The default value auto will choose
Available values are auto (default), on_close,
This setting only affects Session returned from |
hibernate.connection.<propertyName> |
Pass the JDBC property <propertyName> to |
hibernate.jndi.<propertyName> |
Pass the property <propertyName> to the JNDI |
Property Name | Description |
---|---|
|
The classname of a custom |
| Boolean. Optimizes second-level cache operation to minimize writes, at the cost of more frequent reads. This setting is most useful for clustered caches and, in Hibernate3, is enabled by default for clustered cache implementations. |
| Boolean. Enables the query cache. Individual queries still have to be set cacheable. |
|
Boolean. Used to completely disable the second level cache, which is enabled by default for classes that specify a |
|
The classname of a custom |
| A prefix to use for second-level cache region names. |
| Boolean. Forces Hibernate to store data in the second-level cache in a more human-friendly format. |
|
Setting used to give the name of the default org.hibernate.annotations.CacheConcurrencyStrategy to use when either @Cacheable or @Cache is used. |
Property Name | Description |
---|---|
|
The classname of a |
|
A JNDI name used by |
|
The classname of a |
| Boolean. If enabled, the session will be automatically flushed during the before completion phase of the transaction. Built-in and automatic session context management is preferred. |
| Boolean. If enabled, the session will be automatically closed during the after completion phase of the transaction. Built-in and automatic session context management is preferred. |
Property Name | Description |
---|---|
|
Supply a custom strategy for the scoping of the "current" |
|
Chooses the HQL parser implementation: |
|
Used to map from tokens in Hibernate queries to SQL tokens (tokens might be function or literal names). For example, |
|
Automatically validates or exports schema DDL to the database when the |
|
Comma-separated names of the optional files containing SQL DML statements executed during the SessionFactory creation. This is useful for testing or demonstrating. For example, by adding INSERT statements, the database can be populated with a minimal set of data when it is deployed. An example value is
File order matters, as the statements of a given file are executed before the statements of the following files. These statements are only executed if the schema is created (i.e. if |
| The classname of a custom ImportSqlCommandExtractor. Defaults to the built-in SingleLineSqlCommandExtractor. This is useful for implementing a dedicated parser that extracts a single SQL statement from each import file. Hibernate also provides MultipleLinesSqlCommandExtractor, which supports instructions/comments and quoted strings spread over multiple lines (mandatory semicolon at the end of each statement). |
|
Boolean. This is a system-level property, which cannot be set in the |
|
Both javassist or cglib can be used as byte manipulation engines. The default is |
RDBMS | Dialect |
---|---|
DB2 |
|
DB2 AS/400 |
|
DB2 OS390 |
|
Firebird |
|
FrontBase |
|
H2 Database |
|
HypersonicSQL |
|
Informix |
|
Ingres |
|
Interbase |
|
MariaDB 10 |
|
Mckoi SQL |
|
Microsoft SQL Server 2000 |
|
Microsoft SQL Server 2005 |
|
Microsoft SQL Server 2008 |
|
Microsoft SQL Server 2012 |
|
Microsoft SQL Server 2014 |
|
MySQL5 |
|
MySQL5.7 |
|
MySQL5 with InnoDB |
|
MySQL with MyISAM |
|
Oracle (any version) |
|
Oracle 9i |
|
Oracle 10g |
|
Oracle 11g |
|
Oracle 12c |
|
Pointbase |
|
PostgreSQL |
|
PostgreSQL 9.2 |
|
PostgreSQL 9.3 |
|
PostgreSQL 9.4 |
|
Postgres Plus Advanced Server |
|
Progress |
|
SAP DB |
|
Sybase |
|
Sybase 15.7 |
|
Sybase Anywhere |
|
The hibernate.dialect
property should be set to the correct org.hibernate.dialect.Dialect
subclass for the application database. If a dialect is specified, Hibernate will use sensible defaults for some of the other properties. This means that they do not have to be specified manually.
Revised on 2018-02-08 10:17:22 EST