Home about services products contact login
   com.smardec.jndi

MirrorJNDI

  mirror
com.smardec.jndi.mirror
Class MirrorInitialCtxFactory

java.lang.Object
|
+--com.smardec.jndi.mirror.MirrorInitialCtxFactory
All Implemented Interfaces:
javax.naming.spi.InitialContextFactory

public class MirrorInitialCtxFactory
extends java.lang.Object
implements javax.naming.spi.InitialContextFactory

InitialContextFactory implementation.


Constructor Summary
MirrorInitialCtxFactory()
Creates MirrorInitialCtxFactory object.
Method Summary
javax.naming.Context getInitialContext(java.util.Hashtable env)
Creates an Initial Context for beginning name resolution.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail
MirrorInitialCtxFactory
public MirrorInitialCtxFactory()

Creates MirrorInitialCtxFactory object.

Method Detail
getInitialContext
public javax.naming.Context getInitialContext(java.util.Hashtable env)
Creates an Initial Context for beginning name resolution. It reads Context.PROVIDER_URL from the env and performs the following operations:
1) if the value of the Context.PROVIDER_URL ends with '.xml' it tries to load the xml file with xml-serialized context.
2) if the value of the Context.PROVIDER_URL not ends with '.xml' it tries to load the binary file with serialized context.
3) if the first and the second steps failed it creates new MirrorCtx object.

The environment parameter is owned by the caller. The implementation will not modify the object or keep a reference to it, although it may keep a reference to a clone or copy.

Specified by:
getInitialContext in interface javax.naming.spi.InitialContextFactory
Parameters:
env - The possibly null environment specifying information to be used in the creation of the initial context.
Returns:
A non-null initial context object that implements the Context interface.
Home about services products contact login