BEA Systems, Inc.

WebLogic Server 8.1 API Reference

weblogic.management.configuration
Interface JDBCDataSourceFactoryMBean


public interface JDBCDataSourceFactoryMBean
extends ConfigurationMBean

This MBean represents the object used to create DataSources that applications use to access application-scoped JDBC connection pools.

Author:
Copyright © 2004 BEA Systems, Inc. All Rights Reserved.

Fields inherited from class weblogic.management.configuration.ConfigurationMBean
CACHING_STUB_SVUID, DEFAULT_EMPTY_BYTE_ARRAY
 
Method Summary
 java.lang.String getDriverClassName()
          Gets the driverClassName attribute of the JDBCDataSourceFactoryMBean object
 java.lang.String getFactoryName()
          Gets the factoryName attribute of the JDBCDataSourceFactoryMBean object
 java.lang.String getPassword()
          The database user password.
 byte[] getPasswordEncrypted()
          The encrypted database user password.
 java.util.Map getProperties()
          default connection properties
 java.lang.String getURL()
          Gets the uRL attribute of the JDBCDataSourceFactoryMBean object
 java.lang.String getUserName()
          Gets the userName attribute of the JDBCDataSourceFactoryMBean object
 void setDriverClassName(java.lang.String s)
          The name of the driver.
 void setFactoryName(java.lang.String s)
          The name of this data source factory.
 void setPassword(java.lang.String password)
          As of 8.1 sp4, this method does the following:
 void setPasswordEncrypted(byte[] bytes)
          Encrypts the user password and sets the value of the PasswordEncrypted attribute.
 void setProperties(java.util.Map m)
          Sets the properties attribute of the JDBCDataSourceFactoryMBean object
 void setURL(java.lang.String s)
          The connection URL.
 void setUserName(java.lang.String s)
          The database user name.
 
Methods inherited from interface weblogic.management.configuration.ConfigurationMBean
freezeCurrentValue, getNotes, restoreDefaultValue, setComments, setDefaultedMBean, setNotes, setPersistenceEnabled
 
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, preRegister
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Method Detail

setUserName

public void setUserName(java.lang.String s)
The database user name. This may be overridden by user-name in the descriptor.

Parameters:
s - The new userName value

getUserName

public java.lang.String getUserName()
Gets the userName attribute of the JDBCDataSourceFactoryMBean object

Returns:
The userName value

getPassword

public java.lang.String getPassword()

The database user password. If the user password is specified in the descriptor, the descriptor value overrides this value.

As of 8.1 sp4, the getPassword() method does the following:

  1. Retrieves the value of the PasswordEncrypted attribute.
  2. Decrypts the value and returns the unencrypted password as a String.

Using getPassword() is a potential security risk because the String object (which contains the unencrypted password) remains in the JVM's memory until garbage collection removes it. Depending on how memory is allocated in the JVM, a significant amount of time could pass before this unencrypted data is removed from memory.

Instead of using this method, use getPasswordEncrypted() to retrieve the encrypted password. On the same WebLogic Server that encrypted the value of the PasswordEncrypted attribute, use weblogic.management.EncryptionHelper.encrypt() to encrypt the user-supplied password. Then compare the encrypted values.

A non-configurable MBean attribute.
Returns:
The password value
See Also:
getPasswordEncrypted()

setPassword

public void setPassword(java.lang.String password)
                 throws javax.management.InvalidAttributeValueException

As of 8.1 sp4, this method does the following:

  1. Encrypts the parameter value.
  2. Sets the value of the PasswordEncrypted attribute to the encrypted parameter value.

A non-configurable MBean attribute.
Parameters:
s - The new password value
Throws:
javax.management.InvalidAttributeValueException -  
See Also:
setPasswordEncrypted(byte[] bytes)

getPasswordEncrypted

public byte[] getPasswordEncrypted()

The encrypted database user password. If the user password is specified in the descriptor, the descriptor value overrides this value.

Returns:
The password value as an encrypted byte array.
See Also:
EncryptionHelper

setPasswordEncrypted

public void setPasswordEncrypted(byte[] bytes)
                          throws javax.management.InvalidAttributeValueException

Encrypts the user password and sets the value of the PasswordEncrypted attribute.

Parameters:
bytes - The new password value, as a byte array
Throws:
InvalidAttributeValueException; -  
See Also:
getPasswordEncrypted()

setURL

public void setURL(java.lang.String s)
The connection URL. This may be overridden by url in the descriptor

Parameters:
s - The new uRL value

getURL

public java.lang.String getURL()
Gets the uRL attribute of the JDBCDataSourceFactoryMBean object

Returns:
The uRL value

setDriverClassName

public void setDriverClassName(java.lang.String s)
The name of the driver. This may be overridden by driver-name in the descriptor.

Parameters:
s - The new driverClassName value

getDriverClassName

public java.lang.String getDriverClassName()
Gets the driverClassName attribute of the JDBCDataSourceFactoryMBean object

Returns:
The driverClassName value

getProperties

public java.util.Map getProperties()
default connection properties

Returns:
The properties value

setProperties

public void setProperties(java.util.Map m)
Sets the properties attribute of the JDBCDataSourceFactoryMBean object

Parameters:
m - The new properties value

setFactoryName

public void setFactoryName(java.lang.String s)
The name of this data source factory. This is referenced from the connection-factory element in weblogic-application.xml

Parameters:
s - The new factoryName value

getFactoryName

public java.lang.String getFactoryName()
Gets the factoryName attribute of the JDBCDataSourceFactoryMBean object

Returns:
The factoryName value

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