code: public void start( final BundleContext bundleContext )
          throws Exception
      {
          //!! Absolutely necessary for RMIClassLoading to work
          ContextClassLoaderUtils.doWithClassLoader(
              null, // getClass().getClassLoader()
              new Callable<Object>()
              {
                  public Object call()
                      throws Exception
                  {
                      try
                      {
                          // try to find port from property
                          int port = getPort();
                          m_registry = LocateRegistry.getRegistry( port );
                          LOG.debug( "Binding " + RemoteBundleContext.class.getSimpleName() + " to RMI registry" );
                          m_registry.bind(
                              RemoteBundleContext.class.getName(),
                              UnicastRemoteObject.exportObject(
                                  m_remoteBundleContext = new RemoteBundleContextImpl( bundleContext ),
                                  0
                              )
                          );
                          LOG.info( "Remote Bundle Context started" );
                      }
                      catch( Exception e )
                      {
                          throw new BundleException( "Cannot bind RBC to RMI registry", e );
                      }
                      return null;
                  }
              }
          );
      }
docs: {@inheritDoc}