com.ibm.websphere.advanced.cm.factory
Class DataSourceAlreadyCreatedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.ibm.websphere.advanced.cm.factory.CMFactoryException
                    |
                    +--com.ibm.websphere.advanced.cm.factory.DataSourceAlreadyCreatedException
All Implemented Interfaces:
java.io.Serializable

public class DataSourceAlreadyCreatedException
extends CMFactoryException

An exception thrown when a datasource with the specified name has been previously created, but the properties specified do not match those of the pre-existing datasource. If caught, the datasource name should be changed if a new datasource is desired, or the properties modifed to match the existing datasource, if that datasource is desired. The existing datasource can be retrieved by the getter method on this exception.

See Also:
Serialized Form

Constructor Summary
DataSourceAlreadyCreatedException()
          Create a new exception.
DataSourceAlreadyCreatedException(javax.sql.DataSource existingDataSource)
          Create a new exception with the exising datasource.
 
Method Summary
 javax.sql.DataSource getExistingDataSource()
          Returns the datasource that was found that has different properties than the datasource specified.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataSourceAlreadyCreatedException

public DataSourceAlreadyCreatedException()
Create a new exception.

DataSourceAlreadyCreatedException

public DataSourceAlreadyCreatedException(javax.sql.DataSource existingDataSource)
Create a new exception with the exising datasource.
Method Detail

getExistingDataSource

public javax.sql.DataSource getExistingDataSource()
Returns the datasource that was found that has different properties than the datasource specified.
Returns:
the preexisting datasource, or null if not available