diff --git a/scrplugin/src/main/java/org/apache/felix/scrplugin/Constants.java b/scrplugin/src/main/java/org/apache/felix/scrplugin/Constants.java
index 92bf0a0..f6dcdf8 100644
--- a/scrplugin/src/main/java/org/apache/felix/scrplugin/Constants.java
+++ b/scrplugin/src/main/java/org/apache/felix/scrplugin/Constants.java
@@ -100,6 +100,9 @@
     public static final String REFERENCE_UNDBIND = "unbind";
 
     public static final String REFERENCE_CHECKED = "checked";
+    
+    /** @since 1.0.10 */
+    public static final String REFERENCE_STRATEGY = "strategy";
 
     public static final String ABSTRACT_DESCRIPTOR_FILENAME = "scrinfo.xml";
 
diff --git a/scrplugin/src/main/java/org/apache/felix/scrplugin/SCRDescriptorMojo.java b/scrplugin/src/main/java/org/apache/felix/scrplugin/SCRDescriptorMojo.java
index 3907392..6df4f9b 100644
--- a/scrplugin/src/main/java/org/apache/felix/scrplugin/SCRDescriptorMojo.java
+++ b/scrplugin/src/main/java/org/apache/felix/scrplugin/SCRDescriptorMojo.java
@@ -570,10 +570,15 @@
         if ( isChecked != null ) {
             ref.setChecked(Boolean.valueOf(isChecked).booleanValue());
         }
+        final String strategy = reference.getNamedParameter(Constants.REFERENCE_STRATEGY);
+        if ( strategy != null ) {
+            ref.setStrategy(strategy);
+        }
+        
         // if this is a field with a single cardinality,
         // we look for the bind/unbind methods
         // and create them if they are not availabe
-        if ( this.generateAccessors ) {
+        if ( this.generateAccessors && !ref.isLookupStrategy() ) {
             if ( reference.getField() != null && component.getJavaClassDescription() instanceof ModifiableJavaClassDescription ) {
                 if ( ref.getCardinality().equals("0..1") || ref.getCardinality().equals("1..1") ) {
                     boolean createBind = false;
diff --git a/scrplugin/src/main/java/org/apache/felix/scrplugin/om/Reference.java b/scrplugin/src/main/java/org/apache/felix/scrplugin/om/Reference.java
index 1dbbb9d..ab458e4 100644
--- a/scrplugin/src/main/java/org/apache/felix/scrplugin/om/Reference.java
+++ b/scrplugin/src/main/java/org/apache/felix/scrplugin/om/Reference.java
@@ -37,6 +37,9 @@
     protected String policy;
     protected String bind;
     protected String unbind;
+    
+    /** @since 1.0.10 */
+    protected String strategy;
 
     /** Is this reference already checked? */
     protected boolean checked = false;
@@ -125,6 +128,21 @@
     public void setChecked(boolean checked) {
         this.checked = checked;
     }
+    
+    /** @since 1.0.10 */
+    public String getStrategy() {
+        return strategy;
+    }
+
+    /** @since 1.0.10 */
+    public void setStrategy(String strategy) {
+        this.strategy = strategy;
+    }
+    
+    /** @since 1.0.10 */
+    public boolean isLookupStrategy() {
+        return "lookup".equals(getStrategy());
+    }
 
     /**
      * Validate the property.
@@ -163,24 +181,36 @@
         } else if (!"static".equals(this.policy) && !"dynamic".equals(this.policy)) {
             issues.add(this.getMessage("Invalid Policy specification " + this.policy));
         }
+        
+        // validate strategy
+        if (this.strategy == null) {
+            this.strategy = "event";
+        } else if (!"event".equals(this.strategy) && !"lookup".equals(this.strategy)) {
+            issues.add(this.getMessage("Invalid startegy type " + this.strategy));
+        }
 
         // validate bind and unbind methods
-        final String oldBind = this.bind;
-        final String oldUnbind = this.unbind;
-        this.bind = this.validateMethod(this.bind, issues, warnings, componentIsAbstract);
-        this.unbind = this.validateMethod(this.unbind, issues, warnings, componentIsAbstract);
-        if ( issues.size() == currentIssueCount ) {
-            if ( this.bind != null && this.unbind != null ) {
-                // no errors, so we're checked
-                this.checked = true;
-            } else {
-                if ( this.bind == null ) {
-                    this.bind = oldBind;
-                }
-                if ( this.unbind == null ) {
-                    this.unbind = oldUnbind;
+        if (!isLookupStrategy()) {
+            final String oldBind = this.bind;
+            final String oldUnbind = this.unbind;
+            this.bind = this.validateMethod(this.bind, issues, warnings, componentIsAbstract);
+            this.unbind = this.validateMethod(this.unbind, issues, warnings, componentIsAbstract);
+            if ( issues.size() == currentIssueCount ) {
+                if ( this.bind != null && this.unbind != null ) {
+                    // no errors, so we're checked
+                    this.checked = true;
+                } else {
+                    if ( this.bind == null ) {
+                        this.bind = oldBind;
+                    }
+                    if ( this.unbind == null ) {
+                        this.unbind = oldUnbind;
+                    }
                 }
             }
+        } else {
+            this.bind = null;
+            this.unbind = null;
         }
     }
 
diff --git a/scrplugin/src/main/java/org/apache/felix/scrplugin/tags/cl/ClassLoaderJavaTag.java b/scrplugin/src/main/java/org/apache/felix/scrplugin/tags/cl/ClassLoaderJavaTag.java
index 17f5dc9..8980aeb 100644
--- a/scrplugin/src/main/java/org/apache/felix/scrplugin/tags/cl/ClassLoaderJavaTag.java
+++ b/scrplugin/src/main/java/org/apache/felix/scrplugin/tags/cl/ClassLoaderJavaTag.java
@@ -113,6 +113,7 @@
             map.put(Constants.REFERENCE_TARGET, this.reference.getTarget());
             map.put(Constants.REFERENCE_UNDBIND, this.reference.getUnbind());
             map.put(Constants.REFERENCE_CHECKED, String.valueOf(this.reference.isChecked()));
+            map.put(Constants.REFERENCE_STRATEGY, this.reference.getStrategy());
             return map;
         } else if ( this.property != null ) {
             final Map map = new HashMap();
diff --git a/scrplugin/src/main/java/org/apache/felix/scrplugin/xml/ComponentDescriptorIO.java b/scrplugin/src/main/java/org/apache/felix/scrplugin/xml/ComponentDescriptorIO.java
index c75dcff..9b0ecab 100644
--- a/scrplugin/src/main/java/org/apache/felix/scrplugin/xml/ComponentDescriptorIO.java
+++ b/scrplugin/src/main/java/org/apache/felix/scrplugin/xml/ComponentDescriptorIO.java
@@ -283,10 +283,14 @@
         IOUtils.addAttribute(ai, "cardinality", reference.getCardinality());
         IOUtils.addAttribute(ai, "policy", reference.getPolicy());
         IOUtils.addAttribute(ai, "target", reference.getTarget());
-        IOUtils.addAttribute(ai, "bind", reference.getBind());
-        IOUtils.addAttribute(ai, "unbind", reference.getUnbind());
+        
+        if (!reference.isLookupStrategy()) {
+            IOUtils.addAttribute(ai, "bind", reference.getBind());
+            IOUtils.addAttribute(ai, "unbind", reference.getUnbind());
+        }
         if ( isScrPrivateFile ) {
             IOUtils.addAttribute(ai, "checked", String.valueOf(reference.isChecked()));
+            IOUtils.addAttribute(ai, "strategy", reference.getStrategy());
         }
         IOUtils.indent(contentHandler, 2);
         contentHandler.startElement(INNER_NAMESPACE_URI, ComponentDescriptorIO.REFERENCE, ComponentDescriptorIO.REFERENCE_QNAME, ai);
@@ -420,6 +424,7 @@
                     ref.setTarget(attributes.getValue("target"));
                     ref.setBind(attributes.getValue("bind"));
                     ref.setUnbind(attributes.getValue("unbind"));
+                    ref.setStrategy(attributes.getValue("strategy"));
 
                     if ( attributes.getValue("checked") != null ) {
                         ref.setChecked(Boolean.valueOf(attributes.getValue("checked")).booleanValue());
