org.apache.turbine.services.naming
Class TurbineNamingService

java.lang.Object
  |
  +--org.apache.turbine.services.BaseInitable
        |
        +--org.apache.turbine.services.BaseService
              |
              +--org.apache.turbine.services.TurbineBaseService
                    |
                    +--org.apache.turbine.services.naming.TurbineNamingService
All Implemented Interfaces:
Initable, NamingService, Service

public class TurbineNamingService
extends TurbineBaseService
implements NamingService

This class is the default implementation of NamingService, which provides JNDI naming contexts.

Version:
$Id$
Author:
Greg Ritter, Colin Chalmers

Field Summary
private static java.util.Hashtable contextPropsList
          A global HashTable of Property objects which are initialised using parameters from the ResourcesFile
 
Fields inherited from class org.apache.turbine.services.BaseService
configuration, name, properties, serviceBroker
 
Fields inherited from class org.apache.turbine.services.BaseInitable
initableBroker, isInitialized
 
Fields inherited from interface org.apache.turbine.services.naming.NamingService
SERVICE_NAME
 
Constructor Summary
TurbineNamingService()
           
 
Method Summary
 javax.naming.Context getContext(java.lang.String contextName)
          Return the Context with the specified name.
 void init()
          Called the first time the Service is used.
 void init(RunData data)
          Places the contexts defined in the TurbineResources instance (if any) into the data.contexts Hashtable.
 
Methods inherited from class org.apache.turbine.services.TurbineBaseService
init, init, shutdown
 
Methods inherited from class org.apache.turbine.services.BaseService
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker
 
Methods inherited from class org.apache.turbine.services.BaseInitable
getInit, getInitableBroker, setInit, setInitableBroker
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getProperties, setName, setServiceBroker
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, setInitableBroker, shutdown
 

Field Detail

contextPropsList

private static java.util.Hashtable contextPropsList
A global HashTable of Property objects which are initialised using parameters from the ResourcesFile
Constructor Detail

TurbineNamingService

public TurbineNamingService()
Method Detail

init

public void init()
          throws InitializationException
Called the first time the Service is used.
Specified by:
init in interface Initable
Overrides:
init in class TurbineBaseService
Following copied from interface: org.apache.turbine.services.Initable
Throws:
InitializationException, - if initialization of this class was not successful.

init

public void init(RunData data)
          throws InitializationException
Places the contexts defined in the TurbineResources instance (if any) into the data.contexts Hashtable.
Overrides:
init in class TurbineBaseService
Parameters:
data - The RunData object for the current request.
Throws:
InitializationException, - if there was a problem during initialization.

getContext

public javax.naming.Context getContext(java.lang.String contextName)
Return the Context with the specified name. The Context is constructed using the properties for the context with the specified name; ie. those properties that start with "services.servicename.properties.name.".
Specified by:
getContext in interface NamingService
Parameters:
name - The name of the context.
Returns:
The context with the specified name, or null if no context exists with that name.


Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.