public class VirtualDirContext extends FileDirContext
<Context docBase="\webapps\mydocbase">
<Resources className="org.apache.naming.resources.VirtualDirContext"
virtualClasspath="\dir\classes;\somedir\somejar.jar"/>
</Resources>
This is not meant to be used for production.
Its meant to ease development with IDE's without the
need for fully republishing jars in WEB-INF/libFileDirContext.FileResource, FileDirContext.FileResourceAttributes
absoluteBase, allowLinking, base, BUFFER_SIZE, caseSensitive
cached, cacheMaxSize, cacheObjectMaxSize, cacheTTL, docBase, env, nameParser
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
Constructor and Description |
---|
VirtualDirContext() |
Modifier and Type | Method and Description |
---|---|
void |
allocate()
Allocate resources for this directory context.
|
Attributes |
getAttributes(String name)
Retrieves all of the attributes associated with a named object.
|
protected ArrayList |
list(File file)
List the resources which are members of a collection.
|
Object |
lookup(String name)
Retrieves the named object.
|
void |
release()
Release any resources allocated for this directory context.
|
void |
setVirtualClasspath(String path)
virtualClasspath attribute that will be automatically set
from the Context virtualClasspath attribute
from the context xml file. |
bind, createSubcontext, destroySubcontext, file, getAllowLinking, getAttributes, getNameInNamespace, getSchema, getSchemaClassDefinition, isCaseSensitive, list, listBindings, lookupLink, modifyAttributes, modifyAttributes, normalize, rebind, rename, search, search, search, search, setAllowLinking, setCaseSensitive, setDocBase, unbind
addToEnvironment, bind, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, createSubcontext, destroySubcontext, getAttributes, getAttributes, getCacheMaxSize, getCacheObjectMaxSize, getCacheTTL, getDocBase, getEnvironment, getNameParser, getNameParser, getSchema, getSchemaClassDefinition, isCached, list, listBindings, lookup, lookupLink, modifyAttributes, modifyAttributes, rebind, rebind, rebind, removeFromEnvironment, rename, search, search, search, search, setCached, setCacheMaxSize, setCacheObjectMaxSize, setCacheTTL, unbind
public void setVirtualClasspath(String path)
virtualClasspath
attribute that will be automatically set
from the Context
virtualClasspath
attribute
from the context xml file.path
- ;
separated list of path elements.public void allocate()
allocate
in class BaseDirContext
public void release()
release
in class FileDirContext
public Attributes getAttributes(String name) throws NamingException
BaseDirContext
getAttributes
in interface DirContext
getAttributes
in class BaseDirContext
name
- the name of the object from which to retrieve attributesNamingException
- if a naming exception is encounteredprotected ArrayList list(File file)
FileDirContext
list
in class FileDirContext
file
- Collectionpublic Object lookup(String name) throws NamingException
FileDirContext
lookup
in interface Context
lookup
in class FileDirContext
name
- the name of the object to look upNamingException
- if a naming exception is encounteredCopyright © 2018 JBoss by Red Hat. All rights reserved.