2.2. Define a Managed Connection Factory
- Extend the
org.teiid.resource.spi.BasicManagedConnectionFactory
class, providing an implementation for thecreateConnectionFactory()
method. This method will create and return an instance of a Connection Factory. - Define an attribute for each configuration variable, and then provide both "getter" and "setter" methods for them. This class will define various configuration variables (such as user, password, and URL) used to connect to the datasource.
See the following code for an example.
Important
Use only
java.lang
objects as the attributes. DO NOT use Java primitives for defining and accessing the properties.