org.mule.transport.jms.jndi
Class SimpleJndiNameResolver

java.lang.Object
  extended by org.mule.transport.jms.jndi.AbstractJndiNameResolver
      extended by org.mule.transport.jms.jndi.SimpleJndiNameResolver
All Implemented Interfaces:
Disposable, Initialisable, Lifecycle, Startable, Stoppable, JndiNameResolver

public class SimpleJndiNameResolver
extends AbstractJndiNameResolver

Defines a simple JndiNameResolver that maintains a Context instance opened all the time and always relies on the context to do the look ups.


Field Summary
 
Fields inherited from class org.mule.transport.jms.jndi.AbstractJndiNameResolver
logger
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
SimpleJndiNameResolver()
           
 
Method Summary
 void dispose()
          A lifecycle method where implementor should free up any resources.
 void initialise()
          Method used to perform any initialisation work.
 Object lookup(String name)
          Looks up an object by name.
 
Methods inherited from class org.mule.transport.jms.jndi.AbstractJndiNameResolver
createInitialContext, getContextFactory, getContextProperties, getJndiInitialFactory, getJndiProviderProperties, getJndiProviderUrl, setContextFactory, setJndiInitialFactory, setJndiProviderProperties, setJndiProviderUrl, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleJndiNameResolver

public SimpleJndiNameResolver()
Method Detail

lookup

public Object lookup(String name)
              throws NamingException
Description copied from interface: JndiNameResolver
Looks up an object by name.

Parameters:
name - the name of the object to search for
Returns:
the object if is found
Throws:
NamingException - is there is an error during the lookup.

initialise

public void initialise()
                throws InitialisationException
Description copied from interface: Initialisable
Method used to perform any initialisation work. If a fatal error occurs during initialisation an InitialisationException 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.

Specified by:
initialise in interface Initialisable
Overrides:
initialise in class AbstractJndiNameResolver
Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from

dispose

public void dispose()
Description copied from interface: Disposable
A lifecycle method where implementor should free up any resources. If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions.

Specified by:
dispose in interface Disposable
Overrides:
dispose in class AbstractJndiNameResolver


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.