code: private Set<RemotingDestinationMetadata> findRemotingDestinations(ConfigurableListableBeanFactory beanFactory) {
          Set<RemotingDestinationMetadata> remotingDestinations = new HashSet<RemotingDestinationMetadata>();
          Set<String> beanNames = new HashSet<String>();
          beanNames.addAll(Arrays.asList(beanFactory.getBeanDefinitionNames()));
          if (beanFactory.getParentBeanFactory() instanceof ListableBeanFactory) {
              beanNames.addAll(Arrays.asList(((ListableBeanFactory)beanFactory.getParentBeanFactory()).getBeanDefinitionNames()));
          }
          for (String beanName : beanNames) {
              if (beanName.startsWith("scopedTarget.")) {
                  continue;
              }
              RemotingDestination remotingDestination = null;
              BeanDefinition bd = beanFactory.getMergedBeanDefinition(beanName);
              if (bd.isAbstract() || bd.isLazyInit()) {
                  continue;
              }
              if (bd instanceof AbstractBeanDefinition) {
                  AbstractBeanDefinition abd = (AbstractBeanDefinition) bd;
                  if (abd.hasBeanClass()) {
                      Class<?> beanClass = abd.getBeanClass();
                      remotingDestination = AnnotationUtils.findAnnotation(beanClass, RemotingDestination.class);
                      if (remotingDestination != null) {
                          remotingDestinations.add(new RemotingDestinationMetadata(remotingDestination, beanName, beanClass));
                          continue;
                      }
                  }
              }
              Class<?> handlerType = beanFactory.getType(beanName);
              if (handlerType != null) {
                  remotingDestination = AnnotationUtils.findAnnotation(handlerType, RemotingDestination.class);
              } else {
                  if (log.isDebugEnabled()) {
                      log.debug("Could not get type of bean '" + beanName + "' from bean factory.");
                  }
              }
              if (remotingDestination != null) {
                  remotingDestinations.add(new RemotingDestinationMetadata(remotingDestination, beanName, handlerType));
              } 
          }
          return remotingDestinations;
      }
docs: Helper that searches the BeanFactory for beans annotated with @RemotingDestination, being careful not to force
  eager creation of the beans if it can be avoided.
  
  @param beanFactory the BeanFactory to search
  @return a set of collected RemotingDestinationMetadata