|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.framework.jdto.finder.ServiceFinder
This class Follows the ServiceLocator Design Pattern. its a SingleTon Class. its basically used for Locating the DataSource provided its DataSourceJNDIName, InitialContextFactory and ProviderURL. User need to set these in jdto.properties and should be available in the classpath. Once these values are set, all the DAO's and TransactionContextManager takes care of locating the DataSource.
Method Summary | |
javax.sql.DataSource |
getDataSource()
Returns the DataSource object for the JNDI Name which is set in jdto.properties. |
javax.sql.DataSource |
getDataSource(java.lang.String jndiName)
Returns the DataSource object of the corresponding JNDI Name. |
static ServiceFinder |
getInstance()
This method maintains the Singleton instance of the class. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static ServiceFinder getInstance()
public javax.sql.DataSource getDataSource() throws javax.naming.NamingException
javax.naming.NamingException
- if JNDI name that is set using setDatasourceJNDIName method is not found or can not be resolved.public javax.sql.DataSource getDataSource(java.lang.String jndiName) throws javax.naming.NamingException
jndiName
-
javax.naming.NamingException
- if JNDI name is not found or can not be resolved.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |