BEA Systems, Inc.


weblogic.management.configuration
Interface JDBCTxDataSourceMBean


public interface JDBCTxDataSourceMBean
extends DeploymentMBean

This MBean defines a transaction-enabled JDBC DataSource.


Field Summary
static long CACHING_STUB_SVUID
           
 
Fields inherited from class weblogic.management.configuration.DeploymentMBean
CACHING_STUB_SVUID, DEFAULT_ORDER, MAX_ORDER, MIN_ORDER
 
Fields inherited from class weblogic.management.configuration.ConfigurationMBean
CACHING_STUB_SVUID
 
Method Summary
 boolean getEnableTwoPhaseCommit()
          When set to true, this attribute allows non-XA JDBC drivers to emulate participation in distributed transactions using JTA.
 java.lang.String getJNDIName()
          The JNDI path to where this TxDataSource is bound.
 java.lang.String getPoolName()
          The name of the JDBC connection pool that is associated with this TxDataSource.
 int getRowPrefetchSize()
          The number of result set rows to prefetch for a client.
 int getStreamChunkSize()
          Data chunk size for steaming datatypes.
 boolean isRowPrefetchEnabled()
          Controls row prefetching between a client and WebLogic Server for each ResultSet.
 void setEnableTwoPhaseCommit(boolean enable)
          When set to true, this attribute allows non-XA JDBC drivers to emulate distributed transactions using JTA.
 void setJNDIName(java.lang.String name)
          Sets the JNDI path to where this TxDataSource is bound.
 void setPoolName(java.lang.String pool)
          Sets the name of the JDBC connection pool that is associated with this TxDataSource.
 void setRowPrefetchEnabled(boolean enable)
          Set to true to enable row prefetching between client and WebLogic Server for each ResultSet.
 void setRowPrefetchSize(int prefetch)
           
 void setStreamChunkSize(int chunk_size)
           
 
Methods inherited from interface weblogic.management.configuration.DeploymentMBean
addTarget, getDeploymentOrder, getTargets, removeTarget, setDeploymentOrder, setTargets
 
Methods inherited from interface weblogic.management.configuration.ConfigurationMBean
addLinkMbeanAttribute, getNotes, isPersistenceEnabled, setNotes
 
Methods inherited from interface weblogic.management.WebLogicMBean
getMBeanInfo, getName, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setName, setParent
 
Methods inherited from interface javax.management.DynamicMBean
getAttribute, getAttributes, invoke, setAttribute, setAttributes
 
Methods inherited from interface javax.management.MBeanRegistration
postDeregister, postRegister, preDeregister, preRegister
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Field Detail

CACHING_STUB_SVUID

public static final long CACHING_STUB_SVUID
Method Detail

getJNDIName

public java.lang.String getJNDIName()
The JNDI path to where this TxDataSource is bound.

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


setJNDIName

public void setJNDIName(java.lang.String name)
                 throws javax.management.InvalidAttributeValueException
Sets the JNDI path to where this TxDataSource is bound. Applications that look up the JNDI path will get a javax.sql.DataSource instance that corresponds to this TxDataSource. Note that the old style usage of DriverManager.getConnection() or Driver.connect() has been deprecated in favor of looking up a datasource to obtain a connection.

Legal Value: (value != null) && (value.trim().length() > 0)

getPoolName

public java.lang.String getPoolName()
The name of the JDBC connection pool that is associated with this TxDataSource.

Calls from applications to getConnection() on this TxDataSource will return a connection from the associated connection pool.


setPoolName

public void setPoolName(java.lang.String pool)
                 throws javax.management.InvalidAttributeValueException
Sets the name of the JDBC connection pool that is associated with this TxDataSource. Calls from applications to getConnection() on this TxDataSource will return a connection from the associated connection pool.

Legal Value: (value != null) && (value.trim().length() > 0)
See Also:
JDBCConnectionPoolMBean

getEnableTwoPhaseCommit

public boolean getEnableTwoPhaseCommit()
When set to true, this attribute allows non-XA JDBC drivers to emulate participation in distributed transactions using JTA.

Use this option if the JDBC connection is the only participant in the transaction and there is no XA compliant JDBC driver available. With more than one resource participating in a transaction where one of them (the JDBC driver) is emulating an XA resource, you may see heuristic failures.

If this TxDataSource is associated with an XA connection pool, or if there is only one resource participating in the distributed transaction, then this setting is ignored.

See Also:
setEnableTwoPhaseCommit(boolean enable)

setEnableTwoPhaseCommit

public void setEnableTwoPhaseCommit(boolean enable)
                             throws javax.management.InvalidAttributeValueException
When set to true, this attribute allows non-XA JDBC drivers to emulate distributed transactions using JTA.

The drivers are wrapped with a pseudo XAResource, which returns true during prepare(). This is fine if the JDBC connection is the only participant in the transaction, but it is asking for trouble to have more than one resource participating in a transaction where one of them (the JDBC driver) is pretending to be an XA resource. There is a possibility of heuristic failures in such a situation. setEnableTwoPhaseCommit(true) should be used only if you have no option (no decent XA driver available for a particular database, for example).

If this TxDataSource is associated with an XA connection pool, or if there is only one resource participating in the distributed transaction, then this setting is ignored.

@default false


isRowPrefetchEnabled

public boolean isRowPrefetchEnabled()
Controls row prefetching between a client and WebLogic Server for each ResultSet. 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 will ignore this setting and not use row prefetching when the client and WebLogic Server are in the same JVM.

Default Value: false

setRowPrefetchEnabled

public void setRowPrefetchEnabled(boolean enable)
Set to true to enable row prefetching between client and WebLogic Server for each ResultSet. When an external client does JDBC access through WebLogic Server, row prefetching improves performance by fetching multiple rows from the server to the client in one server access. The WebLogic Server will ignore this setting and not use row prefetching when the client and WebLogic Server are in the same JVM.

Default Value: false

getRowPrefetchSize

public int getRowPrefetchSize()
The number of result set rows to prefetch for a client. The optimal value 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.

Default Value: 48
Legal Minimum Value: 2
Legal Maximum Value: 65536

setRowPrefetchSize

public void setRowPrefetchSize(int prefetch)


getStreamChunkSize

public int getStreamChunkSize()
Data chunk size for steaming datatypes. Streaming datatypes (for example resulting from a call to getBinaryStream()) will be pulled in StreamChunkSize sized chunks from the WebLogic Server to the client as needed.

Default Value: 256
Legal Minimum Value: 1
Legal Maximum Value: 65536

setStreamChunkSize

public void setStreamChunkSize(int chunk_size)


Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs70

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference