Class JndiConnectorFactory

java.lang.Object
com.techempower.data.jdbc.JndiConnectorFactory
All Implemented Interfaces:
Asynchronous, ConnectorFactory, Configurable

public class JndiConnectorFactory extends Object implements ConnectorFactory, Configurable, Asynchronous
An implementation of ConnectorFactory that is a thin wrapper around a connection pool defined in the servlet container (Resin, Tomcat, etc.) and fetched via JNDI.

The following attributes are read from the properties file for configuring this component:

  • [prefix]Enabled - whether this ConnectorFactory is enabled.
  • [prefix]Name - JNDI name defined in servlet container.
The remaining configuration for the data source is in the servlet container's configuration.
  • Field Details

  • Constructor Details

    • JndiConnectorFactory

      public JndiConnectorFactory(String propertyPrefix)
      Constructor. If the propertyPrefix is passed as an empty String, the default "db.Jndi." will be used.

      For a JNDI data source, configuration is done in the servlet container.

      Parameters:
      propertyPrefix - the prefix to apply to all property names in the conf file; default is "db.Jndi."
    • JndiConnectorFactory

      @Deprecated(forRemoval=true) public JndiConnectorFactory(TechEmpowerApplication application, String propertyPrefix)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details