code: public Object getExPcBindingContext() {
          Object jpaContext = null;
  
          // First, if a new bean instance is being created in this method context,
          // then the jpa context of that new bean instance is the current active
          // context... even if it is null.
          if (ivCreateBeanO != null) {
              jpaContext = ivCreateBeanO.ivExPcContext;
          } else if (beanO != null) {
              // Second, if the bean the current method was invoked on is NOT
              // a home (i.e. it has a home) then the jpa context is that of
              // the current bean... even if it is null.
              if (beanO.home != null) {
                  if (beanO instanceof StatefulBeanO) {
                      jpaContext = ((StatefulBeanO) beanO).ivExPcContext;
                  }
              }
              // Finally, if the bean associated with this method context is a
              // stateful home then the jpa context is that of the calling
              // bean (i.e. the bean that called home.create).
              else if (ivWrapper.bmd.isStatefulSessionBean() && ivCallerContext != null) {
                  jpaContext = ivCallerContext.getExPcBindingContext();
              }
          }
  
          return jpaContext;
      }
docs: Returns the binding context for the currently active extended-scoped
  persistence context for the thread of execution. Null will be returned
  if an extended-scoped persistence context is not currently active. <p>
  
  @return binding context for currently active extended-scoped
  persistence context.