Package jakarta.resource
Annotation Interface ConnectionFactoryDefinition
@Retention(RUNTIME)
@Target(TYPE)
@Repeatable(ConnectionFactoryDefinitions.class)
public @interface ConnectionFactoryDefinition
Annotation used to define a Connector Connection Factory resource to be
registered in JNDI.
Once defined, a resource may be referenced by a component using the
lookup
element of the Resource
annotation.- Since:
- 1.7
- Version:
- 1.7
- See Also:
-
Required Element Summary
Modifier and TypeRequired ElementDescriptionThe fully qualified name of the connection factory interface class.JNDI name of the connection factory resource being defined.The name of the resource adapter that the administered object must be created from. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionDescription of the resource.int
The maximum number of connections that should be allocated for a connection pool that backs this connnection factory resource.int
The minimum number of connections that should be allocated for a connection pool that backs this connnection factory resource.String[]
Properties of the Connection Factory.The level of transaction support the connection factory resource needs to support.
-
Element Details
-
name
String nameJNDI name of the connection factory resource being defined.- Returns:
- name
-
resourceAdapter
String resourceAdapterThe name of the resource adapter that the administered object must be created from. The resource adapter is required to be available at deployment time.- Returns:
- name of the resource adapter
-
interfaceName
String interfaceNameThe fully qualified name of the connection factory interface class.- Returns:
- fully qualified name of the connection factory interface
-
-
-
description
String descriptionDescription of the resource.- Returns:
- description
- Default:
- ""
-
transactionSupport
TransactionSupport.TransactionSupportLevel transactionSupportThe level of transaction support the connection factory resource needs to support. If a transaction support specification is specified, it must be a level of transaction support whose ordinal value in theTransactionSupport.TransactionSupportLevel
enum is equal to or lesser than the resource adapter's transaction support classification.- Returns:
- The level of transaction support the connection factory resource needs to support.
- Default:
- NoTransaction
-
maxPoolSize
int maxPoolSizeThe maximum number of connections that should be allocated for a connection pool that backs this connnection factory resource. The default for this attribute is vendor specific.- Returns:
- The maximum number of connections that should be allocated for a connection pool
- Default:
- -1
-
minPoolSize
int minPoolSizeThe minimum number of connections that should be allocated for a connection pool that backs this connnection factory resource. The default for this attribute is vendor specific.- Returns:
- The minimum number of connections that should be allocated for a connection pool
- Default:
- -1
-
properties
String[] propertiesProperties of the Connection Factory. These properties may be vendor-specific properties. Vendor-specific properties may be combined with or used to override the connection factory properties defined using this annotation. Connection Factory properties that are specified and are not supported in a given resource adapter or cannot be mapped to a vendor specific configuration property may be ignored.- Returns:
- properties
- Default:
- {}
-