[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-commit] r2502 - jetty/branches/jetty-8/jetty-plus/src/main/java/org/eclipse/jetty/plus/webapp

Author: jbartel
Date: 2010-11-15 01:20:14 -0500 (Mon, 15 Nov 2010)
New Revision: 2502

Modified:
   jetty/branches/jetty-8/jetty-plus/src/main/java/org/eclipse/jetty/plus/webapp/PlusDescriptorProcessor.java
Log:
328008 Handle update to Servlet Spec 3 Section 8.2.3.h.ii . Further fixes to merge injection list.


Modified: jetty/branches/jetty-8/jetty-plus/src/main/java/org/eclipse/jetty/plus/webapp/PlusDescriptorProcessor.java
===================================================================
--- jetty/branches/jetty-8/jetty-plus/src/main/java/org/eclipse/jetty/plus/webapp/PlusDescriptorProcessor.java	2010-11-15 06:18:24 UTC (rev 2501)
+++ jetty/branches/jetty-8/jetty-plus/src/main/java/org/eclipse/jetty/plus/webapp/PlusDescriptorProcessor.java	2010-11-15 06:20:14 UTC (rev 2502)
@@ -316,9 +316,11 @@
                     //ServletSpec p.75. No declaration of resource-ref in web xml, but different in multiple web-fragments. Error.
                     if (!type.equals(otherType) || !auth.equals(otherAuth) || !shared.equals(otherShared))
                         throw new IllegalStateException("Conflicting resource-ref "+jndiName+" in "+descriptor.getResource());
-                    
-                    //TODO get clarification from jsr315 if injection-targets should be merged
+                    //same in multiple web-fragments, merge the injections
+                    addInjections(context, descriptor, node, jndiName, TypeUtil.fromName(type));
                 }
+                else
+                    throw new IllegalStateException("resource-ref."+jndiName+" not found in declaring descriptor "+otherFragment);
                 
             }
         }
@@ -416,8 +418,11 @@
                     if (!type.equals(otherType))
                         throw new IllegalStateException("Conflicting resource-env-ref "+jndiName+" in "+descriptor.getResource());   
                     
-                    //TODO get clarification from jsr315 if injection-targets should be merged
+                    //same in multiple web-fragments, merge the injections
+                    addInjections(context, descriptor, node, jndiName, TypeUtil.fromName(type));
                 }
+                else
+                    throw new IllegalStateException("resource-env-ref."+jndiName+" not found in declaring descriptor "+otherFragment);
             }
         }
     }
@@ -506,8 +511,11 @@
                     if (!type.equals(otherType) || !usage.equalsIgnoreCase(otherUsage))
                         throw new IllegalStateException("Conflicting message-destination-ref "+jndiName+" in "+descriptor.getResource());
                     
-                    //TODO get clarification from jsr315 if injection-targets should be merged
+                    //same in multiple web-fragments, merge the injections
+                    addInjections(context, descriptor, node, jndiName, TypeUtil.fromName(type));
                 }
+                else
+                    throw new IllegalStateException("message-destination-ref."+jndiName+" not found in declaring descriptor "+otherFragment);
             }
         }