org.synchronoss.cpo.jdbc
Class JndiJdbcDataSourceInfo

java.lang.Object
  extended by org.synchronoss.cpo.AbstractDataSourceInfo
      extended by org.synchronoss.cpo.jdbc.AbstractJdbcDataSourceInfo
          extended by org.synchronoss.cpo.jdbc.JndiJdbcDataSourceInfo
All Implemented Interfaces:
DataSourceInfo

public class JndiJdbcDataSourceInfo
extends AbstractJdbcDataSourceInfo

Collects the info required to instantiate a DataSource stored as a JNDI Resource. Provides the DataSourceInfo factory method getDataSource which instantiates the DataSource

Author:
dberry

Constructor Summary
JndiJdbcDataSourceInfo(String jndiName)
          Creates a JndiJdbcDataSourceInfo from a JNDIName that represents the datasource in the application server.
JndiJdbcDataSourceInfo(String jndiName, Context ctx)
          Creates a JndiJdbcDataSourceInfo from a JNDIName that represents the datasource in the application server.
 
Method Summary
protected  DataSource createDataSource()
           
 
Methods inherited from class org.synchronoss.cpo.AbstractDataSourceInfo
getDataSource, getDataSourceName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JndiJdbcDataSourceInfo

public JndiJdbcDataSourceInfo(String jndiName)
Creates a JndiJdbcDataSourceInfo from a JNDIName that represents the datasource in the application server.

Parameters:
jndiName - The JndiName of the app server datasource

JndiJdbcDataSourceInfo

public JndiJdbcDataSourceInfo(String jndiName,
                              Context ctx)
Creates a JndiJdbcDataSourceInfo from a JNDIName that represents the datasource in the application server.

Parameters:
jndiName - The JndiName of the app server datasource
ctx - - The context for which the Jndi Lookup should use.
Method Detail

createDataSource

protected DataSource createDataSource()
                               throws CpoException
Specified by:
createDataSource in class AbstractDataSourceInfo
Throws:
CpoException


Copyright © 2014. All Rights Reserved.