org.jpu.patterns.serviceLocator
Class DataSourceLocator
java.lang.Object
org.jpu.patterns.serviceLocator.Locator
org.jpu.patterns.serviceLocator.DataSourceLocator
- All Implemented Interfaces:
- IDataSourceLocator, ILocator
- Direct Known Subclasses:
- DataSourceLocator
- public class DataSourceLocator
- extends Locator
- implements IDataSourceLocator
Subclass of Locator
specialized for DataSource
's.
See that class' documentation for more information.
Methods inherited from class org.jpu.patterns.serviceLocator.Locator |
clearCache, getCache, getLookupStrategy, getNarrowStrategy, getObject, getObject, getObject, lookup, narrow, narrow, newCache, newIdentifier, newLookupStrategy, newNarrowStrategy, removeFromCache, setCache, setLookupStrategy, setNarrowStrategy |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jpu.patterns.serviceLocator.ILocator |
clearCache, getCache, getLookupStrategy, getNarrowStrategy, getObject, getObject, getObject, narrow, narrow, newCache, newLookupStrategy, newNarrowStrategy, removeFromCache, setCache, setLookupStrategy, setNarrowStrategy |
DataSourceLocator
public DataSourceLocator()
getDefaultCast
public java.lang.Class getDefaultCast()
- Description copied from interface:
ILocator
- By default returns
null
, but subclasses can override to
return the Class
that should be passed as the second parameter
to ILocator.narrow(Object,Class)
if no class is passed via
the castTo
attribute of the ServiceLocatorOptions
instance. If both castTo
and the return value of this method
are null
, no cast is performed.
- Specified by:
getDefaultCast
in interface ILocator
- Overrides:
getDefaultCast
in class Locator
getDataSource
public javax.sql.DataSource getDataSource(java.lang.String dataSourceNamingIdentifier)
throws ServiceLocatorException
- Specified by:
getDataSource
in interface IDataSourceLocator
- Throws:
ServiceLocatorException
getDataSource
public javax.sql.DataSource getDataSource(java.lang.String dataSourceNamingIdentifier,
java.lang.Class c)
throws ServiceLocatorException
- Specified by:
getDataSource
in interface IDataSourceLocator
- Throws:
ServiceLocatorException
getDataSource
public javax.sql.DataSource getDataSource(java.lang.String dataSourceNamingIdentifier,
ServiceLocatorOptions options)
throws ServiceLocatorException
- Specified by:
getDataSource
in interface IDataSourceLocator
- Throws:
ServiceLocatorException
Copyright (c) 2001-2003 - Apache Software Foundation