Skip to content

Latest commit

 

History

History
652 lines (400 loc) · 9.88 KB

File metadata and controls

652 lines (400 loc) · 9.88 KB

Properties, Parameters, and Variables

On this page you can find the properties, parameters and environment variables to use in SAP Java Buildpack. You can filter by name, value, a word, or part of a word.

Properties & Parameters


Name

Description

Values

Example

connector.maxHttpHeaderSize

The maximum size of the request and response HTTP header, specified in bytes

Default value: 8192

To configure the maximum size of the HTTP header, use:

env:
									JBP_CONFIG_RESOURCE_CONFIGURATION: "['tomee/conf/server.xml': {'connector.maxHttpHeaderSize':1024}]"

connector.maxPartHeaderSize

The maximum number of header bytes permitted per part in a request where the content type is multipart/form-data

Default value: 512

To configure the maximum size of a header part, use:

env:
									JBP_CONFIG_RESOURCE_CONFIGURATION: "['tomee/conf/server.xml': {'connector.maxPartHeaderSize':256}]"

connector.maxPartCount

The maximum total number of parts permitted in a request where the content type is multipart/form-data

Default value: 50

To configure the maximum number of parts in a request, use:

env:
									JBP_CONFIG_RESOURCE_CONFIGURATION: "['tomcee/conf/server.xml': {'connector.maxPartCount':40}]"

connector.maxPostSize

The maximum size (in bytes) of the POST request, which will be handled by the container FORM URL parameter parsing. The limit can be disabled by setting the attribute's value to any integer number less than zero (0).

Note: You can use the Failed Request Filter to reject requests that exceed the default limit.

Default value:

2097152 (2 MiB)

To configure the maximum size of the POST request, use:

env:
									JBP_CONFIG_RESOURCE_CONFIGURATION: "['tomee/conf/server.xml': {'connector.maxPostSize':800000}]"

connector.maxThreads

The maximum number of request-processing threads to be created by this Connector. It therefore determines the maximum number of simultaneous requests that can be handled.

Default value: 200

To configure the maximum number of request-processing threads, use:

env:
									JBP_CONFIG_RESOURCE_CONFIGURATION: "['tomee/conf/server.xml': {'connector.maxThreads':800}]"

connector.encodedSolidusHandling

A string value that configures request paths containing a %2f sequence.

Default value: reject

  • When set to reject, these request paths will be rejected with a 400 response.

  • When set to decode, these request paths will have that sequence decoded to / at the same time other %nn sequences are decoded.

  • When set to passthrough, these request paths will be processed with the %2f sequence unchanged.

To decode the %2f sequence of the request paths to /, use:

env:
									JBP_CONFIG_RESOURCE_CONFIGURATION: "['tomee/conf/server.xml': {'connector.encodedSolidusHandling':'decode'}]"

connector.allowTrace

A Boolean value that enables or disables the TRACE HTTP method

Default value: false

To enable the TRACE HTTP method, use:

env:
									JBP_CONFIG_RESOURCE_CONFIGURATION: "['tomee/conf/server.xml': {'connector.allowTrace':true}]"

Environment Variables


Name

Description

Values

Example

VCAP_SERVICES

When you bind a service instance to your app and then restart the app, Cloud Foundry adds connection details to the VCAP_SERVICES environment variable.

See: VCAP_SERVICES

See column Example


$ cf env my-app

Getting env variables for app my-app in org my-org / space my-space as
admin...
OK

System-Provided:

{
 "VCAP_APPLICATION": {
  "application_id": "abcd-1234-0000-aaaa789-eeeeeeeeee",
  "application_name": "my-app",
  "application_uris": [
    "my-app.example.com"
  ],
  "application_version": "xyzxyz-3333-1234567890-aaaaaaaaaa",
  "cf_api": "https://api.example.com",
  "limits": {
    "disk": 1024,
    "memory": 256
  },
  "name": "my-app",
  "organization_id": "...",
  "organization_name": "my-org",
  "space_id": "...",
  "space_name": "my-space",
  "uris": [
    "my-app.example.com"
  ]
 }
}

VCAP_SERVICES_FILE_PATH

It sets the path to the file containing the service binding information in JSON format. It must be enabled by an application feature flag.

See: VCAP_SERVICES_FILE_PATH (experimental)

See column Example

  • Set the variable:

    
    VCAP_SERVICES_FILE_PATH=/etc/cf-service-bindings/vcap_services
    
  • To view the binding data, run:

    cf ssh <app_name> -c 'cat $VCAP_SERVICES_FILE_PATH'
    

JBP_CONFIG_RESOURCE_CONFIGURATION

 

See column Example


env:
  JBP_CONFIG_RESOURCE_CONFIGURATION: "['tomcat/conf/server.xml': {'connector.maxHttpHeaderSize':1024}]"

JBP_CONFIG_COMPONENTS

 

See column Example


env:
  JBP_CONFIG_COMPONENTS: "jres: ['com.sap.xs.java.buildpack.jre.SAPMachineJRE']"

JBP_CONFIG_SAP_MACHINE_JRE

 

See column Example


env:
  JBP_CONFIG_COMPONENTS: "jres: ['com.sap.xs.java.buildpack.jre.SAPMachineJRE']"
  JBP_CONFIG_SAP_MACHINE_JRE: "[version: 11.+, memory_calculator_v2: {stack_threads: 266, class_count: 1001, headroom: 5}]"

JBP_CONFIG_SAP_MACHINE_JDK

 

See column Example


env:
  JBP_CONFIG_COMPONENTS: "jres: ['com.sap.xs.java.buildpack.jdk.SAPMachineJDK']"
  JBP_CONFIG_SAP_MACHINE_JDK: "[ version: 11.0.22, memory_calculator_v2: {stack_threads: 266, class_count: 1001, headroom: 5}]"

JBP_CONFIG_JAVA_OPTS

 

See column Example


env:
  JBP_CONFIG_JAVA_OPTS: "[java_opts: '-Xms144M -Xss3M -Xmx444444K -XX:MetaspaceSize=66666K -XX:MaxMetaspaceSize=88888K']"

JBP_CONFIG_SAPJVM

 

See column Example


env:
  JBP_CONFIG_SAPJVM: "[memory_calculator_v2: {stack_threads: 266, class_count: 1001, headroom: 5}]"

MALLOC_ARENA_MAX

It's used by the glibc memory allocator (in the default malloc() function in Linux). It controls the maximum number of memory arenas (heaps) that a process can create.

An arena is a private memory pool used by threads to reduce lock contention when many threads allocate memory at the same time.

Default value: 2

This is also the recommended value for SAP Java Buildpack.


env:
  MALLOC_ARENA_MAX: 4

SET_LOGGING_LEVEL

It sets the log level of a logging location. You can do this before or during application deploy. You can set this variable in three ways:

  • In the manifest.yml file.
  • In a logback.xml file in directory src/main/resources.
  • In an application.properties file in directory /src/main/resources/.

See: Logging and Tracing

Default log level: INFO


env:
  SET_LOGGING_LEVEL: '{com.sap.sample.java.LogInfo: INFO, com.sap.sample.java.LogWarn: WARN}'

XSUAA_SERVICE_PLAN

It specifies which service plan of the Authorization and Trust Management (xsuaa) service binding to use for token validation.

Note:

XSUAA_SERVICE_PLAN is intended to be only used in a specific use case of token validation. Typically, you won't need or use this variable with your regular plans (for example, application).

When this variable is set, the SAP Java Buildpack's authenticator searches through all xsuaa service bindings to find one with a matching plan property, and then uses this configuration for the token validation.

See column Example


env:
  XSUAA_SERVICE_PLAN: reference-instance