tyrex.naming

Class MemoryContextFactory

public final class MemoryContextFactory extends Object implements InitialContextFactory

Implements a context factory for MemoryContext. When set properly javax.naming.InitialContext will return a MemoryContext referencing the named path in the shared memory space.

To use this context factory the JNDI properties file must include the following properties:

 java.naming.factory.initial=tyrex.naming.MemoryContextFactory
 java.naming.provider.url=
 
Any non-empty URL will return a context to that path in the object tree, relative to the same shared root. The returned context is read/write.

Version: $Revision: 1.6 $ $Date: 2001/03/19 17:39:01 $

Author: Assaf Arkin

See Also: MemoryContext JavaContext

Method Summary
static MemoryBindinggetBindings(String path)
Returns a binding in the specified path.
ContextgetInitialContext(Hashtable env)
Returns an initial context based on the Context.PROVIDER_URL environment attribute.

Method Detail

getBindings

static MemoryBinding getBindings(String path)
Returns a binding in the specified path. If the binding does not exist, the full path is created and a new binding is returned. The binding is always obtained from the shared root.

Parameters: path The path

Returns: The memory binding for the path

Throws: NamingException Name is invalid

getInitialContext

public Context getInitialContext(Hashtable env)
Returns an initial context based on the Context.PROVIDER_URL environment attribute. If this attribute is missing or an empty string, a new memory context be returned. Otherwise, the specified context will be returned.
Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.