public class JndiObjectFactory extends Object implements ObjectFactory
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger |
PHASE_NAMEPHASE_NAME| Constructor and Description |
|---|
JndiObjectFactory() |
JndiObjectFactory(String objectName,
String initialFactory,
String url) |
JndiObjectFactory(String objectName,
String initialFactory,
String url,
Map properties) |
| Modifier and Type | Method and Description |
|---|---|
void |
addObjectInitialisationCallback(InitialisationCallback callback)
Register a custom initialiser
|
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
Context |
getContext() |
String |
getInitialFactory() |
Object |
getInstance()
Retrieve an instance of the object.
|
Class |
getObjectClass()
Returns the class of the object to be instantiated without actually creating
an instance.
|
String |
getObjectName() |
Map |
getProperties() |
String |
getUrl() |
void |
initialise()
Method used to perform any initialisation work.
|
boolean |
isLookupOnEachCall() |
boolean |
isSingleton()
Returns true if the ObjectFactory implementation always returns the same object
instance.
|
protected void |
setContext(Context context) |
void |
setInitialFactory(String initialFactory) |
void |
setLookupOnEachCall(boolean lookupOnEachCall) |
void |
setObjectName(String objectName) |
void |
setProperties(Map properties) |
void |
setUrl(String url) |
public void initialise()
throws InitialisationException
InitialisableInitialisationException should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.initialise in interface InitialisableInitialisationException - if a fatal error occurs causing the Mule instance to shutdownRecoverableException - if an error occurs that can be recovered frompublic void dispose()
Disposabledispose in interface Disposablepublic Object getInstance() throws Exception
ObjectFactorygetInstance in interface ObjectFactoryExceptionpublic Class getObjectClass()
getObjectClass in interface ObjectFactorypublic String getInitialFactory()
public void setInitialFactory(String initialFactory)
public boolean isLookupOnEachCall()
public void setLookupOnEachCall(boolean lookupOnEachCall)
public String getObjectName()
public void setObjectName(String objectName)
public Map getProperties()
public void setProperties(Map properties)
public String getUrl()
public void setUrl(String url)
public Context getContext()
protected void setContext(Context context)
public void addObjectInitialisationCallback(InitialisationCallback callback)
ObjectFactoryaddObjectInitialisationCallback in interface ObjectFactorypublic boolean isSingleton()
ObjectFactoryisSingleton in interface ObjectFactoryCopyright © 2003-2012 MuleSource, Inc.. All Rights Reserved.