BEA Systems, Inc.

weblogic.management.security
Interface RDBMSSecurityStoreMBean


public interface RDBMSSecurityStoreMBean

The MBean that represents configuration attributes for a RDBMS security store. It is used to specify the required and optional properties for connecting to a RDBMS back-end store.


Method Summary
 String getConnectionProperties()
          Returns a comma-delimited list of key-value properties to pass to the driver for configuration of JDBC connection pool, in the form of xxKey=xxValue, xxKey=xxValue.
 String getConnectionURL()
          Returns the URL of the database to connect to.
 String getDriverName()
          Returns the full package name of JDBC driver class used to create the physical database connections in the connection pool.
 int getJMSExceptionReconnectAttempts()
          Returns the number of times to attempt to reconnect if the JMS system notifies Kodo of a serious connection error.
 String getJMSTopic()
          Returns the JMS topic that the Kodo remote commit provider should publish notifications to and subscribe to for notifications sent from other JVMs.
 String getJMSTopicConnectionFactory()
          Returns the JNDI name of a javax.jms.TopicConnectionFactory instance to use for finding JMS topics.
 String getJNDIPassword()
          Returns the password to authenticate the user defined in the JNDIUsername attribute for Kodo notification.
 byte[] getJNDIPasswordEncrypted()
          Returns the encrypted password to authenticate the user defined in the JNDIUsername attribute for Kodo notification.
 String getJNDIUsername()
          Returns the JNDI user name used for Kodo notification
 String getName()
          The name of this configuration.
 String getNotificationProperties()
          Returns the comma-delimited list of key-value properties to pass to the JNDI InitialContext on construction, in the form of xxKey=xxValue, xxKey=xxValue.
 String getPassword()
          Returns the password to authenticate the user defined in the Username attribute for connecting to the data store.
 byte[] getPasswordEncrypted()
          Returns the encrypted password to authenticate the user defined in the Username attribute when connecting to the data store.
 RealmMBean getRealm()
          Returns the realm that contains this RDBMS security store.
 String getUsername()
          Returns the user name to use when connecting to the data store.
 void setConnectionProperties(String connectionProperties)
          Sets the value of the ConnectionProperties attribute.
 void setConnectionURL(String connectionURL)
          Sets the value of the ConnectionURL attribute.
 void setDriverName(String driverName)
          Sets the value of the DriverName attribute.
 void setJMSExceptionReconnectAttempts(int jmsExceptionReconnectAttempts)
          Sets the value of the JMSExceptionReconnectAttempts attribute.
 void setJMSTopic(String jmsTopic)
          Sets the value of the JMSTopic attribute.
 void setJMSTopicConnectionFactory(String jmsTopicConnectionFactory)
          Sets the value of the JMSTopicConnectionFactory attribute.
 void setJNDIPassword(String password)
          Sets the value of the JNDIPassword attribute.
 void setJNDIPasswordEncrypted(byte[] bytes)
          Encrypts the JNDI password and sets the value of the JNDIPasswordEncrypted attribute.
 void setJNDIUsername(String username)
          Sets the value of the JNDI Username attribute.
 void setNotificationProperties(String notificationProperties)
          Sets the value of the NotificationProperties attribute.
 void setPassword(String password)
          Sets the value of the Password attribute.
 void setPasswordEncrypted(byte[] bytes)
          Encrypts the user password and sets the value of the PasswordEncrypted attribute.
 void setUsername(String username)
          Sets the value of the Username attribute.
 

Method Detail

getUsername

String getUsername()
Returns the user name to use when connecting to the data store.

Returns:
the value of the Username attribute

setUsername

void setUsername(String username)
                 throws InvalidAttributeValueException
Sets the value of the Username attribute.

The string value must be explicitly specified and satisfy the constraint (value != null) && (value.trim().length() > 0.

Parameters:
username - the new Username value
Throws:
InvalidAttributeValueException
This method can NOT set a null value.
This method can NOT set a value of zero length.

getPassword

String getPassword()
Returns the password to authenticate the user defined in the Username attribute for connecting to the data store.

When getting the value of this attribute, WebLogic Server does the following:

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

When you set the value of this attribute, WebLogic Server does the following:

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

Using this attribute (Password) 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 and the memory is reallocated. 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 attribute, use PasswordEncrypted.

Returns:
the value of the Password attribute
See Also:
RDBMSSecurityStoreMBean.getPasswordEncrypted()

setPassword

void setPassword(String password)
                 throws InvalidAttributeValueException
Sets the value of the Password attribute.

Parameters:
password - the new Password value
Throws:
InvalidAttributeValueException
See Also:
RDBMSSecurityStoreMBean.getPassword(), RDBMSSecurityStoreMBean.setPasswordEncrypted(byte[])

getPasswordEncrypted

byte[] getPasswordEncrypted()
Returns the encrypted password to authenticate the user defined in the Username attribute when connecting to the data store.

To set this attribute, use weblogic.management.EncryptionHelper.encrypt() to encrypt the value. Then set this attribute to the output of the encrypt() method.

To compare a password that a user enters with the encrypted value of this attribute, go to the same WebLogic Server instance that you used to set and encrypt this attribute and use weblogic.management.EncryptionHelper.encrypt() to encrypt the user-supplied password. Then compare the encrypted values.

Returns:
the PasswordEncrypted value as an encrypted byte array
See Also:
weblogic.management.EncryptionHelper

setPasswordEncrypted

void setPasswordEncrypted(byte[] bytes)
                          throws 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:
RDBMSSecurityStoreMBean.getPasswordEncrypted()

getJNDIUsername

String getJNDIUsername()
Returns the JNDI user name used for Kodo notification

Returns:
the value of the JNDIUsername attribute

setJNDIUsername

void setJNDIUsername(String username)
                     throws InvalidAttributeValueException
Sets the value of the JNDI Username attribute.

Parameters:
username - the new JNDIUsername value
Throws:
InvalidAttributeValueException

getJNDIPassword

String getJNDIPassword()
Returns the password to authenticate the user defined in the JNDIUsername attribute for Kodo notification.

When getting the value of this attribute, WebLogic Server does the following:

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

When you set the value of this attribute, WebLogic Server does the following:

  1. Encrypts the value.
  2. Sets the value of the JNDIPasswordEncrypted attribute to the encrypted value.

Using this attribute (JNDIPassword) 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 and the memory is reallocated. 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 attribute, use JNDIPasswordEncrypted.

Returns:
the value of the Password attribute
See Also:
RDBMSSecurityStoreMBean.getJNDIPasswordEncrypted()

setJNDIPassword

void setJNDIPassword(String password)
                     throws InvalidAttributeValueException
Sets the value of the JNDIPassword attribute.

Parameters:
password - the new JNDIPassword value
Throws:
InvalidAttributeValueException
See Also:
RDBMSSecurityStoreMBean.getJNDIPassword(), RDBMSSecurityStoreMBean.setJNDIPasswordEncrypted(byte[])

getJNDIPasswordEncrypted

byte[] getJNDIPasswordEncrypted()
Returns the encrypted password to authenticate the user defined in the JNDIUsername attribute for Kodo notification.

To set this attribute, use weblogic.management.EncryptionHelper.encrypt() to encrypt the value. Then set this attribute to the output of the encrypt() method.

To compare a password that a user enters with the encrypted value of this attribute, go to the same WebLogic Server instance that you used to set and encrypt this attribute and use weblogic.management.EncryptionHelper.encrypt() to encrypt the user-supplied password. Then compare the encrypted values.

Returns:
the JNDIPasswordEncrypted value as an encrypted byte array
See Also:
weblogic.management.EncryptionHelper

setJNDIPasswordEncrypted

void setJNDIPasswordEncrypted(byte[] bytes)
                              throws InvalidAttributeValueException
Encrypts the JNDI password and sets the value of the JNDIPasswordEncrypted attribute.

Parameters:
bytes - the new password value as a byte array
Throws:
InvalidAttributeValueException
See Also:
RDBMSSecurityStoreMBean.getPasswordEncrypted()

getConnectionURL

String getConnectionURL()
Returns the URL of the database to connect to. The format of the URL varies by JDBC driver.

The URL is passed to the JDBC driver to create the physical database connections.

Returns:
the value of the ConnectionURL attribute

setConnectionURL

void setConnectionURL(String connectionURL)
                      throws InvalidAttributeValueException
Sets the value of the ConnectionURL attribute.

The string value must be explicitly specified and satisfy the constraint (value != null) && (value.trim().length() > 0.

Parameters:
connectionURL - the new ConnectionURL value
Throws:
InvalidAttributeValueException
This method can NOT set a null value.
This method can NOT set a value of zero length.

getDriverName

String getDriverName()
Returns the full package name of JDBC driver class used to create the physical database connections in the connection pool. Note that this driver class must be in the classpath of any server to which it is deployed.

For example:

  1. com.pointbase.jdbc.jdbcUniversalDriver.
  2. oracle.jdbc.driver.OracleDriver.
  3. com.microsoft.sqlserver.jdbc.SQLServerDriver.

It must be the name of a class that implements the java.sql.Driver interface. Check the documentation for the JDBC driver to find the full pathname.

Returns:
the value of the DriverName attribute

setDriverName

void setDriverName(String driverName)
                   throws InvalidAttributeValueException
Sets the value of the DriverName attribute.

The string value must be explicitly specified and satisfy the constraint (value != null) && (value.trim().length() > 0.

Parameters:
driverName - the new DriverName value
Throws:
InvalidAttributeValueException
This method can NOT set a null value.
This method can NOT set a value of zero length.

getConnectionProperties

String getConnectionProperties()
Returns a comma-delimited list of key-value properties to pass to the driver for configuration of JDBC connection pool, in the form of xxKey=xxValue, xxKey=xxValue.

The key can be one of the following optional parameters:

  1. MaxActive: the maximum number of database connections in use at one time.
  2. MaxIdle: the maximum number of idle database connections to keep in the pool.
  3. MaxTotal: the maximum number of database connections in the pool, whether active or idle.
  4. MaxWait: the maximum number of milliseconds to wait for a free database connection to become available before giving up.
  5. MinEvictableIdleTimeMillis: the minimum number of milliseconds that a database connection can sit idle before it becomes a candidate for eviction from the pool.
  6. TestOnBorrow:whether to validate database connections before obtaining them from the pool.
  7. TestOnReturn: set to true to validate database connections when they are returned to the pool.
  8. TestWhileIdle: set to true to periodically validate idle database connections.
  9. TimeBetweenEvictionRunsMillis: the number of milliseconds between runs of the eviction thread.
  10. ValidationSQL: a simple SQL query to issue to validate a database connection.
  11. ValidationTimeout: the minimum number of milliseconds that must elapse before a connection will ever be re-validated.
  12. WarningAction: the action to take when a SQLWarning is detected on a connection.
  13. WhenExhaustedAction: the action to take when there are no available database connections in the pool.
  14. QueryTimeout: the maximum number of seconds the JDBC driver will wait for a statement to execute.

When setting the attribute, the syntax of its value will be validated and an IllegalArgumentException is thrown if the check failed.

Returns:
the value of the ConnectionProperties attribute

setConnectionProperties

void setConnectionProperties(String connectionProperties)
                             throws InvalidAttributeValueException
Sets the value of the ConnectionProperties attribute.

Parameters:
connectionProperties - the new ConnectionProperties value
Throws:
InvalidAttributeValueException

getJMSTopic

String getJMSTopic()
Returns the JMS topic that the Kodo remote commit provider should publish notifications to and subscribe to for notifications sent from other JVMs. This setting varies depending on the application server in use.

Returns:
the value of the JMSTopic attribute

setJMSTopic

void setJMSTopic(String jmsTopic)
                 throws InvalidAttributeValueException
Sets the value of the JMSTopic attribute.

Parameters:
jmsTopic - the new JMSTopic value
Throws:
InvalidAttributeValueException

getJMSTopicConnectionFactory

String getJMSTopicConnectionFactory()
Returns the JNDI name of a javax.jms.TopicConnectionFactory instance to use for finding JMS topics.

This setting varies depending on the application server in use; consult the WLS documentation for details about how this parameter should be specified.

Returns:
the value of the JMSTopicConnectionFactory attribute

setJMSTopicConnectionFactory

void setJMSTopicConnectionFactory(String jmsTopicConnectionFactory)
                                  throws InvalidAttributeValueException
Sets the value of the JMSTopicConnectionFactory attribute.

Parameters:
jmsTopicConnectionFactory - the new JMSTopicConnectionFactory value
Throws:
InvalidAttributeValueException

getJMSExceptionReconnectAttempts

int getJMSExceptionReconnectAttempts()
Returns the number of times to attempt to reconnect if the JMS system notifies Kodo of a serious connection error.

Defaults to 0, the error will be logged but ignored. The value can not be less than 0.

Returns:
the value of the JMSExceptionReconnectAttempts attribute

setJMSExceptionReconnectAttempts

void setJMSExceptionReconnectAttempts(int jmsExceptionReconnectAttempts)
                                      throws InvalidAttributeValueException
Sets the value of the JMSExceptionReconnectAttempts attribute.

Parameters:
jmsExceptionReconnectAttempts - the new JMSExceptionReconnectAttempts value
Throws:
InvalidAttributeValueException
Default Value:
0
Minimum Value:
0

getNotificationProperties

String getNotificationProperties()
Returns the comma-delimited list of key-value properties to pass to the JNDI InitialContext on construction, in the form of xxKey=xxValue, xxKey=xxValue.

Some example of keys:

  1. java.naming.provider.url: property for specifying configuration information for the service provider to use. The value of the property should contain a URL string (e.g. “iiops://localhost:7002?).
  2. java.naming.factory.initial: property for specifying the initial context factory to use. The value of the property should be the fully qualified class name of the factory class that will create an initial context (e.g. “weblogic.jndi.WLInitialContextFactory?).

When setting the attribute, the syntax of its value will be validated and an IllegalArgumentException is thrown if the check failed.

Returns:
the value of NotificationProperties attribute

setNotificationProperties

void setNotificationProperties(String notificationProperties)
                               throws InvalidAttributeValueException
Sets the value of the NotificationProperties attribute.

Parameters:
notificationProperties - the new NotificationProperties value
Throws:
InvalidAttributeValueException

getRealm

RealmMBean getRealm()
Returns the realm that contains this RDBMS security store. Returns null if this RDBMS security store is not contained by a realm.

Returns:
the Realm that contains this MBean

getName

String getName()
The name of this configuration.

Returns:
the value of the Name attribute
Default Value:
"RDBMSSecurityStore"

Because this information documents a Tech Preview of a BEA product, it may be incomplete and is subject to change. Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/essex/TechPreview
Copyright 2007 BEA Systems Inc.