public static NettyMarshallingEncoder buildMarshallingEncoder() {
   MarshallerFactory marshallerFactory = Marshalling.getProvidedMarshallerFactory("serial");
   MarshallingConfiguration configuration = new MarshallingConfiguration();
   configuration.setVersion(5);
   MarshallerProvider provider = new DefaultMarshallerProvider(marshallerFactory, configuration);
   NettyMarshallingEncoder encoder = new NettyMarshallingEncoder(provider);
   return encoder;
 }
 public AbstractJBossMarshaller() {
   factory = new JBossMarshallerFactory();
   // Class resolver now set when marshaller/unmarshaller will be created
   baseCfg = new MarshallingConfiguration();
   baseCfg.setCreator(new SunReflectiveCreator());
   baseCfg.setExceptionListener(new DebuggingExceptionListener());
   baseCfg.setClassExternalizerFactory(new SerializeWithExtFactory());
   baseCfg.setVersion(3);
 }
Esempio n. 3
0
  static {
    MARSHALLER_FACTORY =
        Marshalling.getMarshallerFactory("river", Marshalling.class.getClassLoader());

    final ClassLoader cl = ManagedServer.class.getClassLoader();
    final MarshallingConfiguration config = new MarshallingConfiguration();
    config.setVersion(2);
    config.setClassResolver(new SimpleClassResolver(cl));
    CONFIG = config;
  }