net.sf.jabb.util.context
Class InitialContextFinder

java.lang.Object
  extended by net.sf.jabb.util.context.InitialContextFinder

public class InitialContextFinder
extends Object

找到InitialContext,如果存在则返回缺省的,如果不存在则创建并返回一个 com.sun.jndi.fscontext.RefFSContextFactory。

Finds InitialContext. If there is one, then return the one. If not, then create a one of type com.sun.jndi.fscontext.RefFSContextFactory and return it.

Author:
Zhengmao HU (James)

Field Summary
protected static boolean found
           
 
Constructor Summary
InitialContextFinder()
           
 
Method Summary
protected static InitialContext createFSContext()
           
static InitialContext findDefault()
          找到现成的。
static InitialContext findDefault(Hashtable<?,?> environment)
          找到现成的。
static InitialContext findOrCreate()
          找到现成的的或创建一个。
static InitialContext findOrCreate(Hashtable<?,?> environment)
          找到现成的的或创建一个。
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

found

protected static boolean found
Constructor Detail

InitialContextFinder

public InitialContextFinder()
Method Detail

findDefault

public static InitialContext findDefault(Hashtable<?,?> environment)
                                  throws NamingException
找到现成的。

Finds the existing one.

Parameters:
environment -
Returns:
the default context
Throws:
NamingException

findDefault

public static InitialContext findDefault()
                                  throws NamingException
找到现成的。

Finds the existing one.

Returns:
the default context
Throws:
NamingException

findOrCreate

public static InitialContext findOrCreate(Hashtable<?,?> environment)
                                   throws NamingException
找到现成的的或创建一个。

Finds the existing one or create a new one.

Parameters:
environment -
Returns:
the context found or created
Throws:
NamingException

findOrCreate

public static InitialContext findOrCreate()
                                   throws NamingException
找到现成的的或创建一个。

Finds the existing one or create a new one.

Returns:
the context found or created
Throws:
NamingException

createFSContext

protected static InitialContext createFSContext()
                                         throws NamingException
Throws:
NamingException


Copyright © 2012. All Rights Reserved.