Class PlusDescriptorProcessor
- All Implemented Interfaces:
- DescriptorProcessor
- 
Field SummaryFields inherited from class IterativeDescriptorProcessor__signature, _visitors
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddInjections(WebAppContext context, Descriptor descriptor, XmlParser.Node node, String jndiName, Class<?> valueClass) Iterate over the<injection-target>entries for a nodeprotected voidbindEntry(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.voidbindEnvEntry(String name, Object value) voidbindMessageDestinationRef(WebAppContext context, String name, Class<?> typeClass) voidbindResourceEnvRef(WebAppContext context, String name, Class<?> typeClass) voidbindResourceRef(WebAppContext context, String name, Class<?> typeClass) Bind a resource reference.voidend(WebAppContext context, Descriptor descriptor) voidmakeEnvEntryInjectionsAndBindings(WebAppContext context, Descriptor descriptor, XmlParser.Node node, String name, String type, String value) Make injections and any java:comp/env bindings necessary given an env-entry declaration.voidstart(WebAppContext context, Descriptor descriptor) voidvisitEnvEntry(WebAppContext context, Descriptor descriptor, XmlParser.Node node) JavaEE 5.4.1.3voidvisitMessageDestinationRef(WebAppContext context, Descriptor descriptor, XmlParser.Node node) Common Annotations Spec section 2.3:voidvisitPostConstruct(WebAppContext context, Descriptor descriptor, XmlParser.Node node) If web.xml has at least 1 post-construct, then all post-constructs in fragments are ignored.voidvisitPreDestroy(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 destroyedvoidvisitResourceEnvRef(WebAppContext context, Descriptor descriptor, XmlParser.Node node) Common Annotations Spec section 2.3:voidvisitResourceRef(WebAppContext context, Descriptor descriptor, XmlParser.Node node) Common Annotations Spec section 2.3:Methods inherited from class IterativeDescriptorProcessorprocess, registerVisitor, visit
- 
Constructor Details- 
PlusDescriptorProcessorpublic PlusDescriptorProcessor()
 
- 
- 
Method Details- 
start- Specified by:
- startin class- IterativeDescriptorProcessor
 
- 
end- Specified by:
- endin class- IterativeDescriptorProcessor
 
- 
visitEnvEntrypublic void visitEnvEntry(WebAppContext context, Descriptor descriptor, XmlParser.Node node) throws Exception JavaEE 5.4.1.3- Parameters:
- context- the context
- descriptor- the descriptor
- node- the xml node
- Throws:
- Exception- if unable to process jndi bindings
 
- 
visitResourceRefpublic void visitResourceRef(WebAppContext context, Descriptor descriptor, XmlParser.Node node) throws Exception Common Annotations Spec section 2.3:resource-ref is for: - javax.sql.DataSource
- javax.jms.ConnectionFactory
- javax.jms.QueueConnectionFactory
- javax.jms.TopicConnectionFactory
- javax.mail.Session
- java.net.URL
- javax.resource.cci.ConnectionFactory
- org.omg.CORBA_2_3.ORB
- any other connection factory defined by a resource adapter
 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.- Parameters:
- context- the context
- descriptor- the descriptor
- node- the xml node
- Throws:
- Exception- if unable to bind nodes, or load classes
 
- 
visitResourceEnvRefpublic void visitResourceEnvRef(WebAppContext context, Descriptor descriptor, XmlParser.Node node) throws Exception Common Annotations Spec section 2.3:resource-env-ref is for: - javax.transaction.UserTransaction
- javax.resource.cci.InteractionSpec
- anything else that is not a connection factory
 - Parameters:
- context- the context
- descriptor- the descriptor
- node- the xml node
- Throws:
- Exception- if unable to load classes, or bind jndi entries
 
- 
visitMessageDestinationRefpublic void visitMessageDestinationRef(WebAppContext context, Descriptor descriptor, XmlParser.Node node) throws Exception Common Annotations Spec section 2.3:message-destination-ref is for: - javax.jms.Queue
- javax.jms.Topic
 - Parameters:
- context- the context
- descriptor- the descriptor
- node- the xml node
- Throws:
- Exception- if unable to load classes or bind jndi entries
 
- 
visitPostConstructIf web.xml has at least 1 post-construct, then all post-constructs in fragments are ignored. Otherwise, post-constructs from fragments are merged. post-construct is the name of a class and method to call after all resources have been setup but before the class is put into use- Parameters:
- context- the context
- descriptor- the descriptor
- node- the xml node
 
- 
visitPreDestroypre-destroy is the name of a class and method to call just as the instance is being destroyed- Parameters:
- context- the context
- descriptor- the descriptor
- node- the xml node
 
- 
addInjectionspublic void addInjections(WebAppContext context, Descriptor descriptor, XmlParser.Node node, String jndiName, Class<?> valueClass) Iterate over the<injection-target>entries for a node- Parameters:
- context- the context
- descriptor- the descriptor
- node- the xml node
- jndiName- the jndi name
- valueClass- the value class
 
- 
bindEnvEntry
- 
makeEnvEntryInjectionsAndBindingspublic void makeEnvEntryInjectionsAndBindings(WebAppContext context, Descriptor descriptor, XmlParser.Node node, String name, String type, String value) throws Exception Make injections and any java:comp/env bindings necessary given an env-entry declaration. The handling of env-entries is different to other resource declarations like resource-ref, resource-env-ref etc because we allow the EnvEntry (@see org.eclipse.jetty.plus.jndi.EnvEntry) class that is configured externally to the webapp to specify a value that can override a value present in a web.xml descriptor.- Parameters:
- context- the WebAppContext of the env-entry
- descriptor- the web.xml, web-default.xml, web-override.xml or web-fragment.xml
- node- the parsed xml representation of the env-entry declaration
- name- the name field of the env-entry
- type- the type field of the env-entry
- value- the value field of the env-entry
- Throws:
- Exception- if there is an unspecified problem
 
- 
bindResourceRefpublic void bindResourceRef(WebAppContext context, String name, Class<?> typeClass) throws Exception Bind a resource reference.If a resource reference with the same name is in a jetty-env.xml file, it will already have been bound. - Parameters:
- context- the context
- name- the jndi name
- typeClass- the type class
- Throws:
- Exception- if unable to bind resource
 
- 
bindResourceEnvRefpublic void bindResourceEnvRef(WebAppContext context, String name, Class<?> typeClass) throws Exception - Throws:
- Exception
 
- 
bindMessageDestinationRefpublic void bindMessageDestinationRef(WebAppContext context, String name, Class<?> typeClass) throws Exception - Throws:
- Exception
 
- 
bindEntryBind 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.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). - Parameters:
- context- the context
- name- name of the resource from web.xml
- typeClass- the type class
- Throws:
- Exception- the exception
 
 
-