Index: geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
===================================================================
--- geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java	(revision 552413)
+++ geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java	(working copy)
@@ -300,6 +300,8 @@
     }
 
     public static class AdminObjectRefProcessor extends ResourceAnnotationHelper.ResourceProcessor {
+        public static final AdminObjectRefProcessor INSTANCE = new AdminObjectRefProcessor(null, null, null);
+
         private final EARContext earContext;
         private final Map<String, GerResourceEnvRefType> refMap;
         private final Map<String, Map<String, GerMessageDestinationType>> messageDestinations;
@@ -345,25 +347,40 @@
             }
 
             //if it maps to a message-destination in the geronimo plan, it's a message-destination.
-            GerMessageDestinationType gerMessageDestinationType = getMessageDestination(resourceName, messageDestinations);
+            GerMessageDestinationType gerMessageDestinationType = null;
+            if (messageDestinations != null) {
+                gerMessageDestinationType = getMessageDestination(resourceName, messageDestinations);
+            }
             if (gerMessageDestinationType != null) {
                 addMethodDestinationRef(annotatedApp, resourceName, resourceType, method, field, annotation);
                 return true;
             } else {
                 //if it maps to a resource-env-ref in the geronimo plan, it's a resource-ref
-                GerResourceEnvRefType resourceEnvRefType = refMap.get(resourceName);
+                GerResourceEnvRefType resourceEnvRefType = null;
+                if (refMap != null) {
+                    resourceEnvRefType = refMap.get(resourceName);
+                }
                 if (resourceEnvRefType != null || resourceType.equals("javax.transaction.UserTransaction")) {
                     //mapped resource-env-ref
                     addResourceEnvRef(annotatedApp, resourceName, resourceType, method, field, annotation);
                     return true;
                 } else {
-                    //look for an JCAAdminObject gbean with the right name
-                    AbstractNameQuery containerId = buildAbstractNameQuery(null, null, resourceName, NameFactory.JCA_ADMIN_OBJECT, NameFactory.RESOURCE_ADAPTER_MODULE);
-                    try {
-                        earContext.findGBean(containerId);
-                    } catch (GBeanNotFoundException e) {
-                        //not identifiable as an admin object ref
-                        return false;
+                    if (earContext != null) {
+                        // look for an JCAAdminObject gbean with the right name
+                        AbstractNameQuery containerId = buildAbstractNameQuery(null, null, resourceName,
+                                NameFactory.JCA_ADMIN_OBJECT, NameFactory.RESOURCE_ADAPTER_MODULE);
+                        try {
+                            earContext.findGBean(containerId);
+                        } catch (GBeanNotFoundException e) {
+                            // not identifiable as an admin object ref
+                            return false;
+                        }
+                    } else {
+                        if (!("javax.jms.Queue".equals(resourceType) || "javax.jms.Topic".equals(resourceType) 
+                                || "javax.jms.Destination".equals(resourceType))) {
+                            // not identifiable as an admin object ref
+                            return false;
+                        }
                     }
                     addResourceEnvRef(annotatedApp, resourceName, resourceType, method, field, annotation);
                     return true;
Index: geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
===================================================================
--- geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java	(revision 552413)
+++ geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java	(working copy)
@@ -734,15 +734,17 @@
     }
 
     protected ClassFinder createWebAppClassFinder(WebAppType webApp, WebModule webModule) throws DeploymentException {
+        // Get the classloader from the module's EARContext
+        ClassLoader classLoader = webModule.getEarContext().getClassLoader();
+        return createWebAppClassFinder(webApp, classLoader);
+    }
 
+    public static ClassFinder createWebAppClassFinder(WebAppType webApp, ClassLoader classLoader) throws DeploymentException {
         //------------------------------------------------------------------------------------
         // Find the list of classes from the web.xml we want to search for annotations in
         //------------------------------------------------------------------------------------
         List<Class> classes = new ArrayList<Class>();
 
-        // Get the classloader from the module's EARContext
-        ClassLoader classLoader = webModule.getEarContext().getClassLoader();
-
         // Get all the servlets from the deployment descriptor
         ServletType[] servlets = webApp.getServletArray();
         for (ServletType servlet : servlets) {
@@ -787,7 +789,7 @@
         return new ClassFinder(classes);
     }
 
-    private void addClass(List<Class> classes, Class<?> clas) {
+    private static void addClass(List<Class> classes, Class<?> clas) {
         while (clas != Object.class) {
             classes.add(clas);
             clas = clas.getSuperclass();
