diff --git a/scr/src/main/java/org/apache/felix/scr/impl/helper/BindMethod.java b/scr/src/main/java/org/apache/felix/scr/impl/helper/BindMethod.java
index 24420c2..86a8a1f 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/helper/BindMethod.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/helper/BindMethod.java
@@ -554,25 +554,25 @@
         return null;
     }
 
-    public RefPair getServiceObject( ServiceReference ref, BundleContext context )
+    public boolean getServiceObject( RefPair refPair, BundleContext context )
     {
         //??? this resolves which we need.... better way?
-        if ( methodExists() )
+        if ( refPair.getServiceObject() == null && methodExists() )
         {
             if (m_paramStyle == SERVICE_OBJECT || m_paramStyle == SERVICE_OBJECT_AND_MAP) {
-                Object service = context.getService( ref );
+                Object service = context.getService( refPair.getRef() );
                 if ( service == null )
                 {
                     getLogger().log(
                          LogService.LOG_WARNING,
-                         "Could not get service from ref " + ref, null );
-                    return null;
+                         "Could not get service from ref " + refPair.getRef(), null );
+                    return false;
                 }
-
-                return new RefPair(ref, service);
+                refPair.setServiceObject( service );
+                return true;
             }
         }
-        return new RefPair(ref, null);
+        return true;
     }
 
     protected Object[] getParameters( Method method, Object rawParameter )
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java b/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
index f61326a..b177638 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
@@ -935,7 +935,8 @@
             }
             else
             {
-                refPair = new RefPair( serviceReference,  serviceObject );
+                refPair = new RefPair( serviceReference );
+                refPair.setServiceObject( serviceObject );
                 ((Map)m_componentManager.getDependencyMap().get( this )).put( serviceReference, refPair );
             }
         }
@@ -1039,7 +1040,7 @@
         unbind( componentInstance, getBoundServiceReferences() );
     }
 
-    //returns Map<ServiceReference, Object[]>
+    //returns Map<ServiceReference, RefPair>
     boolean prebind( Map dependencyMap)
     {
         // If no references were received, we have to check if the dependency
@@ -1073,9 +1074,9 @@
             {
                 for ( int index = 0; index < refs.length; index++ )
                 {
-                    RefPair refPair = m_bindMethods.getBind().getServiceObject( refs[index], m_componentManager.getActivator().getBundleContext() );
+                    RefPair refPair = new RefPair( refs[index] );
                     // success is if we have the minimal required number of services bound
-                    if ( refPair != null )
+                    if ( m_bindMethods.getBind().getServiceObject( refPair, m_componentManager.getActivator().getBundleContext() ) )
                     {
                         result.put( refs[index], refPair );
                         // of course, we have success if the service is bound
@@ -1094,9 +1095,9 @@
             ServiceReference ref = getFrameworkServiceReference();
             if ( ref != null )
             {
-                RefPair refPair = m_bindMethods.getBind().getServiceObject( ref, m_componentManager.getActivator().getBundleContext() );
+                RefPair refPair = new RefPair( ref );
                 // success is if we have the minimal required number of services bound
-                if ( refPair != null )
+                if ( m_bindMethods.getBind().getServiceObject( refPair, m_componentManager.getActivator().getBundleContext() ) )
                 {
                     result.put( ref, refPair );
                     // of course, we have success if the service is bound
@@ -1104,7 +1105,7 @@
                 }
                 else if ( isOptional() )
                 {
-                    m_componentManager.getActivator().registerMissingDependency(this, ref);
+                    m_componentManager.getActivator().registerMissingDependency( this, ref );
                 }
             }
         }
@@ -1234,9 +1235,8 @@
 
                 }
                 Map deps = ( Map ) dependencyMap.get( this );
-                BundleContext bundleContext = m_componentManager.getActivator().getBundleContext();
-                RefPair refPair = m_bindMethods.getBind().getServiceObject( ref, bundleContext );
-                if ( refPair == null )
+                RefPair refPair = new RefPair( ref );
+                if ( !m_bindMethods.getBind().getServiceObject( refPair, m_componentManager.getActivator().getBundleContext() ) )
                 {
                     //reference deactivated while we are processing.
                     return false;
@@ -1354,6 +1354,15 @@
                 //TODO should this be possible? If so, reduce or eliminate logging
                 m_componentManager.log( LogService.LOG_WARNING,
                         "DependencyManager : invokeUpdatedMethod : Component set, but reference not present", null );
+                return;
+            }
+            if ( !m_bindMethods.getUpdated().getServiceObject( refPair, m_componentManager.getActivator().getBundleContext() ))
+            {
+                m_componentManager.log( LogService.LOG_WARNING,
+                        "DependencyManager : invokeUpdatedMethod : Service not available from service registry for ServiceReference {0} for reference {1}",
+                        new Object[] {ref, getName()}, null );
+                return;
+
             }
             MethodResult methodResult = m_bindMethods.getUpdated().invoke( componentInstance, refPair, MethodResult.VOID );
             if ( methodResult != null)
@@ -1394,6 +1403,15 @@
                 //TODO should this be possible? If so, reduce or eliminate logging
                 m_componentManager.log( LogService.LOG_WARNING,
                         "DependencyManager : invokeUnbindMethod : Component set, but reference not present", null );
+                return;
+            }
+            if ( !m_bindMethods.getUnbind().getServiceObject( refPair, m_componentManager.getActivator().getBundleContext() ))
+            {
+                m_componentManager.log( LogService.LOG_WARNING,
+                        "DependencyManager : invokeUnbindMethod : Service not available from service registry for ServiceReference {0} for reference {1}",
+                        new Object[] {ref, getName()}, null );
+                return;
+
             }
             MethodResult methodResult = m_bindMethods.getUnbind().invoke( componentInstance, refPair, MethodResult.VOID );
             if ( methodResult != null )
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/manager/RefPair.java b/scr/src/main/java/org/apache/felix/scr/impl/manager/RefPair.java
index eb041db..34cf14e 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/manager/RefPair.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/manager/RefPair.java
@@ -30,10 +30,9 @@
     private final ServiceReference ref;
     private Object serviceObject;
 
-    public RefPair( ServiceReference ref, Object serviceObject )
+    public RefPair( ServiceReference ref )
     {
         this.ref = ref;
-        this.serviceObject = serviceObject;
     }
 
     public ServiceReference getRef()
diff --git a/scr/src/test/java/org/apache/felix/scr/impl/helper/BindMethodTest.java b/scr/src/test/java/org/apache/felix/scr/impl/helper/BindMethodTest.java
index b06bc3a..e184790 100644
--- a/scr/src/test/java/org/apache/felix/scr/impl/helper/BindMethodTest.java
+++ b/scr/src/test/java/org/apache/felix/scr/impl/helper/BindMethodTest.java
@@ -436,7 +436,8 @@
         ImmediateComponentManager icm = new ImmediateComponentManager( null, null, metadata, new ComponentMethods() );
         BindMethod bm = new BindMethod( icm, methodName, component.getClass(),
                 FakeService.class.getName(), isDS11, false );
-        RefPair refPair = bm.getServiceObject( m_serviceReference, m_context );
+        RefPair refPair = new RefPair( m_serviceReference );
+        assertTrue( bm.getServiceObject( refPair, m_context ) );
         bm.invoke( component, refPair, null );
         assertEquals( expectCallPerformed, component.callPerformed );
     }
