* 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;
}