Package org.glassfish.contextpropagation

Examples of org.glassfish.contextpropagation.SerializableContextFactory


       * In general for OPAQUE that originated on WLS, we must have that class
       * on the glassfish server or things will break down. That is also
       * a requirement on WLS so we are not worse off.
       * We also need an implementation of ContextOutput
       */
      SerializableContextFactory factory = HELPER.findContextFactory(key, className);
      if (factory == null) {
        /* In this case if will not be possible to continue reading from the
         * stream. LATER We can try to look for the next entry, but that is problematic.
         * A brute force approach would be to read a byte, mark the stream,
         * and attempt reading the next entry and repeat if we fail to read the entry
         * However this can be tricky because we do no know where the end of data is
         * so we can easily read past the end of context data and thus affect the
         * overall reading of the message if the protocol does not record the size
         * of the context data. We can get around this by modifying legacy
         * wls to either include a catalog or write a long context that contains
         * the length of context data.
         */
        error(MessageID.ERROR_NO_WORK_CONTEXT_FACTORY, key, className);
        return null;
      } else {
        WLSContext ctx = factory.createInstance();
        if (ctx != null) {
          ctx.readContext(ois);
        }
        value = ctx;
      }
View Full Code Here


      break;
    case OPAQUE:
      boolean hasClassName = ois.readBoolean();
      className = hasClassName ? readAscii() : null;
      byte[] bytes = readBytes(ois);
      SerializableContextFactory factory = WireAdapter.HELPER.findContextFactory(key, className);
      value = factory == null ?
          bytes : WLSContext.HELPER.readFromBytes(factory.createInstance(), bytes);
      break;
    default:
      // TODO log unexpected case
      break;
    }
View Full Code Here

TOP

Related Classes of org.glassfish.contextpropagation.SerializableContextFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.