Application Integration (On-Premises) : Administering the Software AG Infrastructure : Running Web Applications : Configure JNDI Resources : Configure JNDI Resources
Configure JNDI Resources
Define JNDI resources using property files whose names start with com.softwareag.catalina.resource.pid (for example, com.softwareag.catalina.resource.pid-petstore.properties). Store the configuration files in the Software AG_directory \profiles\CTP\configuration\com.softwareag.platform.config.propsloader directory. You can use the properties listed below in the JNDI resources configuration.
Property
Description
context
Optional. Name of the web context of the application into which to inject the resource configuration (for example, petstore). If the property is missing, the resource configuration will be injected into all web applications.
factory
Required. Fully qualified name of the ObjectFactory to use to produce the resource object (for example, org.apache.tomcat.jdbc.pool.DataSourceFactory). To enable OSGi service injection, this property is set to service. You can set these properties as well:
*filter: Standard OSGi LDAP service filter. For example, you could select a DataSource service using the filter (&(dbName=JPetStore)(dbType=Derby)).
*timeout: Damping period, in milliseconds, for all proxies produced by this ObjectFactory. This property overrides the serviceProxyTimeout property of the ResourceInjector as specified in the global context.xml.
name
Required. Name under which to bind the resource in the java:/comp/env namespace of the web application. The value is relative. For example, jdbc/JPetStoreDB means the absolute name of the resource will be java:/comp/env/jdbc/JPetStoreDB.
type
Required. Fully qualified name of the resource class (for example, javax.sql.DataSource).
enabled
Optional. Indicates whether to have the JNDI injector process the resource configuration. Valid values are true (default) and false.
multiple address properties
Optional. Actual JNDI resource configuration; these are names of factory fields for which getters and setters are available. The number, name, and type of these properties depends on the concrete resource and ObjectFactory that is being defined. For additional information, see the Tomcat JDBC pool documentation.
The sample JNDI resource configuration below defines a DataSource to inject into the configured context.
com.softwareag.catalina.resource.pid-petstore.properties
# JND I injection configuration
context=/petstore
name=jdbc/JPetStoreDB
type=javax.sql.DataSource
factory=org.apache.tomcat.jdbc.pool.DataSourceFactory
# Resource definition
maxActive=100
maxIdle=30
maxWait=10000
username=user
password=pass
driverClassName=com.softwareag.platform.jdbc.dd.SQLServerDriver
url=jdbc:wm:sqlserver://hostname:1433;databaseName=dbName
Copyright © 2015- 2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback