|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpu.patterns.serviceLocator.Locator
org.jpu.patterns.serviceLocator.SLSBLocator
Subclass of Locator
specialized for stateless session beans.
This class overrides the lookup()
method to call
create()
on the home object. Any exceptions thrown
from create()
are rethrown wrapped in ServiceLocatorException
.
Of course the home interface must define a public no-arg create()
method (as all SLSB's must); else a ServiceLocatorException
will
result.
Nested Class Summary |
Nested classes inherited from class org.jpu.patterns.serviceLocator.Locator |
Locator.DefaultIdentifierParser, Locator.DefaultLookupStrategy, Locator.DefaultNarrowStrategy, Locator.NullCache |
Nested classes inherited from class org.jpu.patterns.serviceLocator.ILocator |
ILocator.ICache, ILocator.IIdentifierParser, ILocator.ILookupStrategy, ILocator.INarrowStrategy |
Constructor Summary | |
SLSBLocator()
|
Method Summary | |
java.lang.Object |
createSLSB(java.lang.Object homeobj,
ServiceLocatorOptions options)
Creates a SLSB given its home. |
java.lang.Object |
getSLSB(java.lang.String homeNamingIdentifier)
Alias for " getSLSB(homeNamingIdentifier, (ServiceLocatorOptions)null) ". |
java.lang.Object |
getSLSB(java.lang.String homeNamingIdentifier,
java.lang.Class c)
Alias for " getObject(homeNamingIdentifier, c) ". |
java.lang.Object |
getSLSB(java.lang.String homeNamingIdentifier,
ServiceLocatorOptions options)
Alias for " getObject(homeNamingIdentifier, options) ". |
java.lang.Object |
lookup(java.lang.String namingIdentifier,
ServiceLocatorOptions options)
Overrides the superclass version to create the SLSB from its remote interface. |
java.lang.Object |
narrowSLSBHome(java.lang.Object homeobj,
ServiceLocatorOptions options)
Narrows the reference to the given home to the appropriate type. |
Methods inherited from class org.jpu.patterns.serviceLocator.Locator |
clearCache, getCache, getDefaultCast, getLookupStrategy, getNarrowStrategy, getObject, getObject, getObject, 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, getDefaultCast, getLookupStrategy, getNarrowStrategy, getObject, getObject, getObject, narrow, narrow, newCache, newLookupStrategy, newNarrowStrategy, removeFromCache, setCache, setLookupStrategy, setNarrowStrategy |
Constructor Detail |
public SLSBLocator()
Method Detail |
public java.lang.Object getSLSB(java.lang.String homeNamingIdentifier) throws ServiceLocatorException
getSLSB(homeNamingIdentifier, (ServiceLocatorOptions)null)
".
getSLSB
in interface ISLSBLocator
ServiceLocatorException
public java.lang.Object getSLSB(java.lang.String homeNamingIdentifier, java.lang.Class c) throws ServiceLocatorException
getObject(homeNamingIdentifier, c)
".
getSLSB
in interface ISLSBLocator
ServiceLocatorException
public java.lang.Object getSLSB(java.lang.String homeNamingIdentifier, ServiceLocatorOptions options) throws ServiceLocatorException
getObject(homeNamingIdentifier, options)
".
getSLSB
in interface ISLSBLocator
ServiceLocatorException
public java.lang.Object lookup(java.lang.String namingIdentifier, ServiceLocatorOptions options) throws ServiceLocatorException
createSLSB(Object,ServiceLocatorOptions)
.
lookup
in class Locator
ServiceLocatorException
public java.lang.Object narrowSLSBHome(java.lang.Object homeobj, ServiceLocatorOptions options) throws ServiceLocatorException
options
and, if it is of type SLSBLocatorOptions
with castHomeTo
non-null
, calls
Locator.narrow(Object, Class)
to narrow to this type;
else it returns the original homeobj
.
This method will be called by createSLSB(Object, ServiceLocatorOptions)
just before it calls the
home object's accessible no-arg create()
method.
ServiceLocatorException
public java.lang.Object createSLSB(java.lang.Object homeobj, ServiceLocatorOptions options) throws ServiceLocatorException
create()
method on the given home object. Does not
narrow the resulting EJBObject
. Calls narrowSLSBHome(Object, ServiceLocatorOptions)
to narrow the EJBHome
before calling create()
on it.
Subclasses are free to override this behavior as needed.
ServiceLocatorException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |