@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.conversation = (ConversationImpl) in.readObject(); super.readExternal(in); }
@Override public void writeExternal(ObjectOutput out) throws IOException { out.writeObject(conversation); super.writeExternal(out); } }
@Override public void destroy(Contextual<?> contextual) { super.destroy(contextual); SessionScopedBeanInterceptorHandler.removeThreadLocals(); } }
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { WebBeansContext webBeansContext = WebBeansContext.currentInstance(); scopeType = (Class<? extends Annotation>) in.readObject(); Map<String, BeanInstanceBag<?>> map = (Map<String, BeanInstanceBag<?>>)in.readObject(); setComponentInstanceMap(); for (Map.Entry<String, BeanInstanceBag<?>> beanBagEntry : map.entrySet()) { String id = beanBagEntry.getKey(); if (id != null) { Contextual<?> contextual = webBeansContext.getBeanManagerImpl().getPassivationCapableBean(id); if (contextual != null) { componentInstanceMap.put(contextual, beanBagEntry.getValue()); } } } }