code: public Map<String, Object> getContextData() // d644886
      {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
  
          Map<String, Object> contextData;
          if (isLifecycleMethodActive()) // d704496
          {
              if (ivLifecycleContextData == null)
              {
                  ivLifecycleContextData = new HashMap<String, Object>();
  
                  if (isTraceOn && tc.isDebugEnabled())
                      Tr.debug(tc, "getContextData: created empty");
              }
              else
              {
                  if (isTraceOn && tc.isDebugEnabled())
                      Tr.debug(tc, "getContextData: lifecycle");
              }
  
              contextData = ivLifecycleContextData;
          }
          else
          {
              if (isTraceOn && tc.isDebugEnabled())
                  Tr.debug(tc, "getContextData: method");
  
              EJSDeployedSupport s = getMethodContext();
              if (s == null)
              {
                  IllegalStateException ex = new IllegalStateException(
                                  "Context data not available outside the scope of an EJB or lifecycle callback method");
                  if (isTraceOn && tc.isDebugEnabled())
                      Tr.debug(tc, "getContextData: " + ex);
                  throw ex;
              }
  
              contextData = s.getContextData();
          }
  
          return contextData;
      }
docs: Gets the context data associated with the current EJB method or EJB
  lifecycle callback.
  
  @see BeanO#getContextData
  @throws IllegalStateException if neither an EJB method nor an EJB
  lifecycle method is active on the thread