org.pentaho.platform.engine.services.connection.datasource.dbcp
Class NonPooledDatasourceService

java.lang.Object
  extended by org.pentaho.platform.engine.services.connection.datasource.dbcp.BaseDatasourceService
      extended by org.pentaho.platform.engine.services.connection.datasource.dbcp.NonPooledDatasourceService
All Implemented Interfaces:
IDatasourceService

public class NonPooledDatasourceService
extends BaseDatasourceService


Field Summary
 
Fields inherited from interface org.pentaho.platform.api.data.IDatasourceService
IDATASOURCE_SERVICE, JDBC_DATASOURCE, JDBC_POOL
 
Constructor Summary
NonPooledDatasourceService()
           
 
Method Summary
 DataSource getDataSource(String dsName)
          Since JNDI is supported different ways in different app servers, it's nearly impossible to have a ubiquitous way to look up a datasource.
 String getDSBoundName(String dsName)
          Since JNDI is supported different ways in different app servers, it's nearly impossible to have a ubiquitous way to look up a datasource.
 String getDSUnboundName(String dsName)
          Since JNDI is supported different ways in different app servers, it's nearly impossible to have a ubiquitous way to look up a datasource.
 
Methods inherited from class org.pentaho.platform.engine.services.connection.datasource.dbcp.BaseDatasourceService
clearCache, clearDataSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonPooledDatasourceService

public NonPooledDatasourceService()
Method Detail

getDataSource

public DataSource getDataSource(String dsName)
                         throws DatasourceServiceException
Since JNDI is supported different ways in different app servers, it's nearly impossible to have a ubiquitous way to look up a datasource. This method is intended to hide all the lookups that may be required to find a jndi name.

Parameters:
dsName - The Datasource name
Returns:
DataSource if there is one bound in JNDI
Throws:
NamingException
DatasourceServiceException

getDSBoundName

public String getDSBoundName(String dsName)
                      throws DatasourceServiceException
Since JNDI is supported different ways in different app servers, it's nearly impossible to have a ubiquitous way to look up a datasource. This method is intended to hide all the lookups that may be required to find a jndi name, and return the actual bound name.

Specified by:
getDSBoundName in interface IDatasourceService
Overrides:
getDSBoundName in class BaseDatasourceService
Parameters:
dsName - The Datasource name (like SampleData)
Returns:
The bound DS name if it is bound in JNDI (like "jdbc/SampleData")
Throws:
DatasourceServiceException

getDSUnboundName

public String getDSUnboundName(String dsName)
Since JNDI is supported different ways in different app servers, it's nearly impossible to have a ubiquitous way to look up a datasource. This method is intended to extract just the regular name of a specified JNDI source.

Specified by:
getDSUnboundName in interface IDatasourceService
Overrides:
getDSUnboundName in class BaseDatasourceService
Parameters:
dsName - The Datasource name (like "jdbc/SampleData")
Returns:
The unbound DS name (like "SampleData")