org.synchronoss.cpo.jdbc
Class JndiDataSourceInfo

Package class diagram package JndiDataSourceInfo
java.lang.Object
  extended by org.synchronoss.cpo.jdbc.AbstractDataSourceInfo
      extended by org.synchronoss.cpo.jdbc.JndiDataSourceInfo
All Implemented Interfaces:
DataSourceInfo

public class JndiDataSourceInfo
extends AbstractDataSourceInfo

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
JndiDataSourceInfo(java.lang.String jndiName)
          Creates a JndiDataSourceInfo from a JNDIName that represents the datasource in the application server.
JndiDataSourceInfo(java.lang.String jndiName, javax.naming.Context ctx)
          Creates a JndiDataSourceInfo from a JNDIName that represents the datasource in the application server.
 
Method Summary
protected  javax.sql.DataSource createDataSource()
           
 
Methods inherited from class org.synchronoss.cpo.jdbc.AbstractDataSourceInfo
getDataSource, getDataSourceName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JndiDataSourceInfo

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

Parameters:
jndiName - The JndiName of the app server datasource

JndiDataSourceInfo

public JndiDataSourceInfo(java.lang.String jndiName,
                          javax.naming.Context ctx)
Creates a JndiDataSourceInfo 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 javax.sql.DataSource createDataSource()
                                         throws CpoException
Specified by:
createDataSource in class AbstractDataSourceInfo
Throws:
CpoException


Copyright © 2012. All Rights Reserved.