# JDBCDataSourceParamsBean

Overview | Related MBeans | Attributes | Operations

## Overview

Contains the basic usage parameters of a data source.

Configuration parameters for the basic usage of a data source are specified using a data source parameters bean.

Security roles | The following roles have read, write, and invoke permission for all non-encrypted attributes and operations in this MBean: Deployer
Fully Qualified Interface Name | If you use the `getMBeanInfo` operation in MBeanTypeServiceMBean, supply the following value as this MBean's fully qualified interface name: `weblogic.j2ee.descriptor.wl.JDBCDataSourceParamsBean`
Factory Methods | No factory methods. Instances of this MBean are created automatically.
Access Points | You can access this MBean from the following MBean attributes:
JDBCDataSourceBean.JDBCDataSourceParams |

## Attributes

This section describes the following attributes:

AlgorithmType ConnectionPoolFailoverCallbackHandler DataSourceList FailoverRequestIfBusy GlobalTransactionsProtocol JNDINames | RowPrefetch RowPrefetchSize Scope StreamChunkSize

### AlgorithmType

The algorithm determines the connection request processing for the multi data source.

You can specify one of the following algorithm types:

- Failover

  Connection requests are sent to the first data source in the list; if the request fails, the request is sent to the next data source in the list, and so forth. The process is repeated until a valid connection is obtained, or until the end of the list is reached, in which case an exception is thrown.

- Load balancing

  The multi data source distributes connection requests evenly to its member data sources. With this algorithm, the multi data source also provides failover processing. That is, if a request fails, the multi data source sends the request to the next data source in the list until a valid connection is obtained, or until the end of the list is reached, in which case an exception is thrown.

Privileges | Read/Write
Type | java.lang.String
Default Value | Failover
Legal Values | Load-Balancing Failover

### ConnectionPoolFailoverCallbackHandler

The name of the application class to handle the callback sent when a multi data source is ready to failover or fail back connection requests to another data source within the multi data source.

The name must be the absolute name of an application class that implements the `weblogic.jdbc.extensions.ConnectionPoolFailoverCallback` interface.

For more information, see:

- ConnectionPoolFailoverCallback

Privileges | Read/Write
Type | java.lang.String

### DataSourceList

The list of data sources to which the multi data source will route connection requests. The order of data sources in the list determines the failover order.

Privileges | Read/Write
Type | java.lang.String

### FailoverRequestIfBusy

For multi data sources with the `failover` algorithm, enables the multi data source to failover connection requests to the next data source if all connections in the current data source are in use.

Privileges | Read/Write
Type | boolean

### GlobalTransactionsProtocol

Determines the transaction protocol (global transaction processing behavior) for the data source. Options include:

- TwoPhaseCommit - Standard XA transaction processing. Requires an XA driver.

- LoggingLastResource - A performance enhancement for one non-XA resource.

- EmulateTwoPhaseCommit - Enables one non-XA resource to participate in a global transaction, but has some risk to data.

- OnePhaseCommit - One-phase XA transaction processing using a non-XA driver. This is the default setting.

- None - Support for local transactions only.

Privileges | Read/Write
Type | java.lang.String
Default Value | OnePhaseCommit
Legal Values | TwoPhaseCommit LoggingLastResource EmulateTwoPhaseCommit OnePhaseCommit None

### JNDINames

The JNDI path to where this Data Source is bound. By default, the JNDI name is the name of the data source.

Applications that look up the JNDI path will get a `javax.sql.DataSource` instance that corresponds to this data source.

Privileges | Read/Write
Type | class java.lang.String[]

### RowPrefetch

Enables multiple rows to be "prefetched" (that is, sent from the server to the client) in one server access.

When an external client accesses a database using JDBC through WebLogic Server, row prefetching improves performance by fetching multiple rows from the server to the client in one server access. WebLogic Server ignores this setting and does not use row prefetching when the client and WebLogic Server are in the same JVM.

Privileges | Read/Write
Type | boolean

### RowPrefetchSize

If row prefetching is enabled, specifies the number of result set rows to prefetch for a client.

The optimal prefetch size depends on the particulars of the query. In general, increasing this number will increase performance, until a particular value is reached. At that point further increases do not result in any significant performance increase. Very rarely will increased performance result from exceeding 100 rows. The default value should be reasonable for most situations.

Privileges | Read/Write
Type | int
Default Value | 48
Minimum value | 2
Maximum value | 65536

### Scope

Specifies the scoping of the data source.

You can specify one of the following scopes:

- Global

  Specifies that the data source is bound in the cluster-wide JNDI tree with the JNDIName specified so that the data source is available for use to any JDBC client across the cluster.

  This is the default setting.

- Application

  Specifies that the data source is bound in the application's local namespace with the JNDIName specified so that the data source is available for use only by JDBC clients within the application.

Privileges | Read/Write
Type | java.lang.String
Default Value | Global
Legal Values | Global Application

### StreamChunkSize

Specifies the data chunk size for steaming data types.

Streaming data types (for example resulting from a call to `getBinaryStream()`) are sent in sized chunks from WebLogic Server to the client as needed.

Privileges | Read/Write
Type | int
Default Value | 256
Minimum value | 1
Maximum value | 65536

## Operations

This section describes the following operations:

addJNDIName isSet removeJNDIName | unSet

### addJNDIName

Used to specify additional JNDI names for the Data Source. WebLogic Server internally defaults the JNDI name to the name of the data source bean.

Operation Name | `"addJNDIName"`
Parameters | `Object [] { }` where:
Signature | `String [] { "java.lang.String" }`
Returns | `void`

### isSet

Return true if the given property has been explicitly set in this bean.

Operation Name | `"isSet"`
Parameters | `Object [] { propertyName }` where: `propertyName` is an object of type `java.lang.String` that specifies: property to check
Signature | `String [] { "java.lang.String" }`
Returns | `boolean`
Exceptions | `java.lang.IllegalArgumentException` IllegalArgumentException if propertyName is not a recognized property

### removeJNDIName

Operation Name | `"removeJNDIName"`
Parameters | `Object [] { }` where:
Signature | `String [] { "java.lang.String" }`
Returns | `void`

### unSet

Restore the given property to its default value.

Operation Name | `"unSet"`
Parameters | `Object [] { propertyName }` where: `propertyName` is an object of type `java.lang.String` that specifies: property to restore
Signature | `String [] { "java.lang.String" }`
Returns | `void`
Exceptions | `java.lang.IllegalArgumentException` UnsupportedOperationException if called on a runtime implementation.