org.openmdx.compatibility.base.application.spi
Class JndiServiceLocator_1

java.lang.Object
  extended by org.openmdx.compatibility.base.application.spi.JndiServiceLocator_1
All Implemented Interfaces:
Manageable_1_0, ServiceLocator_1_0
Direct Known Subclasses:
SimpleServiceLocator_1, StandardServiceLocator_1

Deprecated. in favour of Standard JNDI access

public class JndiServiceLocator_1
extends Object
implements Manageable_1_0, ServiceLocator_1_0

A JNDI based service locator

It's main features are


Constructor Summary
protected JndiServiceLocator_1()
          Deprecated. Allow dynamic class loading
 
Method Summary
 void activate()
          Deprecated. The activate method initializes a layer or component.
 void bind(String registrationId, Object object)
          Deprecated. Bind a service to the registry
 void deactivate()
          Deprecated. The deactivate method releases a layer or component.
protected  Context initialContext()
          Deprecated. Gets or creates an initial context
 Enumeration listBindings(String registrationId)
          Deprecated.  
 Object lookup(String registrationId)
          Deprecated. Lookup a service
 void unbind(String registrationId)
          Deprecated. Removes a service from the registry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JndiServiceLocator_1

protected JndiServiceLocator_1()
Deprecated. 
Allow dynamic class loading

Method Detail

activate

public void activate()
              throws Exception
Deprecated. 
The activate method initializes a layer or component.

An activate() implementation of a subclass should be of the form:

   {
     super.activate();
     «local activation code»
   }
 

Specified by:
activate in interface Manageable_1_0
Throws:
Exception - the application framwork maps all java Exceptions internally to standard ServiceExceptions.

deactivate

public void deactivate()
                throws Exception
Deprecated. 
The deactivate method releases a layer or component.

A deactivate() implementation of a subclass should be of the form: of the form:

   {
     «local deactivation code»
     super.deactivate();
   }
 

Specified by:
deactivate in interface Manageable_1_0
Throws:
Exception - the application framwork maps all java Exceptions internally to standard ServiceExceptions.

initialContext

protected Context initialContext()
                          throws NamingException
Deprecated. 
Gets or creates an initial context

Returns:
the service locator specific initial context
Throws:
NamingException

lookup

public Object lookup(String registrationId)
              throws ServiceException
Deprecated. 
Description copied from interface: ServiceLocator_1_0
Lookup a service

Specified by:
lookup in interface ServiceLocator_1_0
Parameters:
registrationId - A colon-separated list of naming elements
Returns:
An object, usually the service's connection factory
Throws:
ServiceException

bind

public void bind(String registrationId,
                 Object object)
          throws ServiceException
Deprecated. 
Description copied from interface: ServiceLocator_1_0
Bind a service to the registry

Specified by:
bind in interface ServiceLocator_1_0
Parameters:
registrationId - A colon-separated list of naming elements
object - The object to be bound, usually the service's connection factory
Throws:
ServiceException

unbind

public void unbind(String registrationId)
            throws ServiceException
Deprecated. 
Description copied from interface: ServiceLocator_1_0
Removes a service from the registry

Specified by:
unbind in interface ServiceLocator_1_0
Parameters:
registrationId - A colon-separated list of naming elements
Throws:
ServiceException

listBindings

public Enumeration listBindings(String registrationId)
                         throws ServiceException
Deprecated. 
Specified by:
listBindings in interface ServiceLocator_1_0
Throws:
ServiceException


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.