code: public synchronized void setBeanContext(BeanContext beanContext)
          throws PropertyVetoException
      {
          ControlBeanContext cbcs = null;
  
          if (beanContext != null)
          {
              //
              // ControlBeans can only be nested in context service instances that derive
              // from ControlBeanContext.
              //
              if (!(beanContext instanceof ControlBeanContext))
              {
                  PropertyChangeEvent pce = new PropertyChangeEvent(_bean, "beanContext", getBeanContext(), beanContext);
                  throw new PropertyVetoException("Context does not support nesting controls: " +
                                                  beanContext.getClass(), pce);
              }
  
              cbcs = (ControlBeanContext)beanContext;
          }
  
  
          _beanContextServicesDelegate.setBeanContext(beanContext);
  
          resetControlID();
  
          _hasSingleThreadedParent = cbcs != null ? cbcs.isSingleThreadedContainer() : false;
  
          //
          // Notify the bean that its context (container) has been set.
          //
          if (_bean != null)
              _bean.setBeanContext(beanContext);
      }
docs: Overrides the {@link java.beans.beancontext.BeanContextChild#setBeanContext(java.beans.beancontext.BeanContext)}
  method.  This hook is used to perform additional processing that needs to occur when the control is associated
  with a new nesting context.