public class PlusDescriptorProcessor extends IterativeDescriptorProcessor
__signature, _visitors
Constructor and Description |
---|
PlusDescriptorProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
addInjections(WebAppContext context,
Descriptor descriptor,
XmlParser.Node node,
String jndiName,
Class<?> valueClass)
Iterate over the
<injection-target> entries for a node |
protected void |
bindEntry(WebAppContext context,
String name,
Class<?> typeClass)
Bind a resource with the given name from web.xml of the given type
with a jndi resource from either the server or the webapp's naming
environment.
|
void |
bindEnvEntry(String name,
Object value) |
void |
bindMessageDestinationRef(WebAppContext context,
String name,
Class<?> typeClass) |
void |
bindResourceEnvRef(WebAppContext context,
String name,
Class<?> typeClass) |
void |
bindResourceRef(WebAppContext context,
String name,
Class<?> typeClass)
Bind a resource reference.
|
void |
end(WebAppContext context,
Descriptor descriptor) |
void |
start(WebAppContext context,
Descriptor descriptor) |
void |
visitEnvEntry(WebAppContext context,
Descriptor descriptor,
XmlParser.Node node)
JavaEE 5.4.1.3
|
void |
visitMessageDestinationRef(WebAppContext context,
Descriptor descriptor,
XmlParser.Node node)
Common Annotations Spec section 2.3:
|
void |
visitPostConstruct(WebAppContext context,
Descriptor descriptor,
XmlParser.Node node)
If web.xml has at least 1 post-construct, then all post-constructs in fragments
are ignored.
|
void |
visitPreDestroy(WebAppContext context,
Descriptor descriptor,
XmlParser.Node node)
pre-destroy is the name of a class and method to call just as
the instance is being destroyed
|
void |
visitResourceEnvRef(WebAppContext context,
Descriptor descriptor,
XmlParser.Node node)
Common Annotations Spec section 2.3:
|
void |
visitResourceRef(WebAppContext context,
Descriptor descriptor,
XmlParser.Node node)
Common Annotations Spec section 2.3:
|
process, registerVisitor, visit
public void start(WebAppContext context, Descriptor descriptor)
start
in class IterativeDescriptorProcessor
IterativeDescriptorProcessor.start(WebAppContext, org.eclipse.jetty.webapp.Descriptor)
public void end(WebAppContext context, Descriptor descriptor)
end
in class IterativeDescriptorProcessor
public void visitEnvEntry(WebAppContext context, Descriptor descriptor, XmlParser.Node node) throws Exception
context
- the contextdescriptor
- the descriptornode
- the xml nodeException
- if unable to process jndi bindingspublic void visitResourceRef(WebAppContext context, Descriptor descriptor, XmlParser.Node node) throws Exception
resource-ref is for:
Maintenance update 3.0a to spec:
Update Section 8.2.3.h.ii with the following - If a resource reference
element is specified in two fragments, while absent from the main web.xml,
and all the attributes and child elements of the resource reference element
are identical, the resource reference will be merged into the main web.xml.
It is considered an error if a resource reference element has the same name
specified in two fragments, while absent from the main web.xml and the attributes
and child elements are not identical in the two fragments. For example, if two
web fragments declare a <resource-ref>
with the same <resource-ref-name>
element
but the type in one is specified as javax.sql.DataSource while the type in the
other is that of a java mail resource, then an error must be reported and the
application MUST fail to deploy.
context
- the contextdescriptor
- the descriptornode
- the xml nodeException
- if unable to bind nodes, or load classespublic void visitResourceEnvRef(WebAppContext context, Descriptor descriptor, XmlParser.Node node) throws Exception
resource-env-ref is for:
context
- the contextdescriptor
- the descriptornode
- the xml nodeException
- if unable to load classes, or bind jndi entriespublic void visitMessageDestinationRef(WebAppContext context, Descriptor descriptor, XmlParser.Node node) throws Exception
message-destination-ref is for:
context
- the contextdescriptor
- the descriptornode
- the xml nodeException
- if unable to load classes or bind jndi entriespublic void visitPostConstruct(WebAppContext context, Descriptor descriptor, XmlParser.Node node)
context
- the contextdescriptor
- the descriptornode
- the xml nodepublic void visitPreDestroy(WebAppContext context, Descriptor descriptor, XmlParser.Node node)
context
- the contextdescriptor
- the descriptornode
- the xml nodepublic void addInjections(WebAppContext context, Descriptor descriptor, XmlParser.Node node, String jndiName, Class<?> valueClass)
<injection-target>
entries for a nodecontext
- the contextdescriptor
- the descriptornode
- the xml nodejndiName
- the jndi namevalueClass
- the value classpublic void bindEnvEntry(String name, Object value) throws Exception
name
- the jndi namevalue
- the valueException
- if unable to bind entrypublic void bindResourceRef(WebAppContext context, String name, Class<?> typeClass) throws Exception
If a resource reference with the same name is in a jetty-env.xml file, it will already have been bound.
context
- the contextname
- the jndi nametypeClass
- the type classException
- if unable to bind resourcepublic void bindResourceEnvRef(WebAppContext context, String name, Class<?> typeClass) throws Exception
Exception
public void bindMessageDestinationRef(WebAppContext context, String name, Class<?> typeClass) throws Exception
Exception
protected void bindEntry(WebAppContext context, String name, Class<?> typeClass) throws Exception
As the servlet spec does not cover the mapping of names in web.xml with names from the execution environment, jetty uses the concept of a Link, which is a subclass of the NamingEntry class. A Link defines a mapping of a name from web.xml with a name from the execution environment (ie either the server or the webapp's naming environment).
context
- the contextname
- name of the resource from web.xmltypeClass
- the type classException
- the exceptionCopyright © 1995-2015 Webtide. All Rights Reserved.