private MarshallingConfiguration createMarshallingConfig(URI uri) { final MarshallingConfiguration marshallingConfiguration = new MarshallingConfiguration(); marshallingConfiguration.setObjectResolver(new HttpProtocolV1ObjectResolver(uri)); marshallingConfiguration.setObjectTable(HttpProtocolV1ObjectTable.INSTANCE); marshallingConfiguration.setVersion(2); return marshallingConfiguration; }
EJBServerChannel(final RemotingTransactionServer transactionServer, final Channel channel, final int version, final MessageTracker messageTracker) { this.transactionServer = transactionServer; this.channel = channel; this.version = version; this.messageTracker = messageTracker; final MarshallingConfiguration configuration = new MarshallingConfiguration(); if (version < 3) { configuration.setClassTable(ProtocolV1ClassTable.INSTANCE); configuration.setObjectTable(ProtocolV1ObjectTable.INSTANCE); configuration.setObjectResolver(new ProtocolV1ObjectResolver(channel.getConnection(), true)); configuration.setVersion(2); } else { configuration.setObjectTable(ProtocolV3ObjectTable.INSTANCE); configuration.setObjectResolver(new ProtocolV3ObjectResolver(channel.getConnection(), true)); configuration.setVersion(4); } marshallerFactory = new RiverMarshallerFactory(); this.configuration = configuration; }
public HotRodMarshaller(Module module) { super(); super.baseCfg.setClassResolver(ModularClassResolver.getInstance(module.getModuleLoader())); super.baseCfg.setClassTable(new DynamicClassTable(module.getClassLoader())); super.baseCfg.setObjectTable(new ExternalizerObjectTable(module.getClassLoader())); } }
@Override public MarshallingConfiguration apply(MarshallingConfigurationContext context) { MarshallingConfiguration config = new MarshallingConfiguration(); config.setClassResolver(ModularClassResolver.getInstance(context.getModuleLoader())); config.setClassTable(new DynamicClassTable(context.getModule().getClassLoader())); config.setObjectTable(new ExternalizerObjectTable(context.getModule().getClassLoader())); return config; } },
@SuppressWarnings("deprecation") @Override public MarshallingConfiguration apply(MarshallingConfigurationContext context) { Module module = context.getModule(); ModuleDeployment deployment = context.getDeployment(); MarshallingConfiguration config = new MarshallingConfiguration(); config.setClassResolver(ModularClassResolver.getInstance(module.getModuleLoader())); config.setSerializabilityChecker(new StatefulSessionBeanSerializabilityChecker(deployment)); config.setClassTable(new StatefulSessionBeanClassTable()); config.setObjectTable(new EJBClientContextIdentifierObjectTable()); return config; } },
@Override public MarshallingConfiguration apply(MarshallingConfigurationContext context) { Module module = context.getModule(); ModuleDeployment deployment = context.getDeployment(); MarshallingConfiguration config = new MarshallingConfiguration(); config.setClassResolver(ModularClassResolver.getInstance(module.getModuleLoader())); config.setSerializabilityChecker(new StatefulSessionBeanSerializabilityChecker(deployment)); config.setClassTable(new StatefulSessionBeanClassTable()); config.setObjectResolver(new EJBClientContextIdentifierResolver()); config.setObjectTable(new ExternalizerObjectTable(module.getClassLoader())); return config; } },
try { final MarshallingConfiguration marshallingConfiguration = new MarshallingConfiguration(); marshallingConfiguration.setObjectTable(HttpProtocolV1ObjectTable.INSTANCE); marshallingConfiguration.setVersion(2); Unmarshaller unmarshaller = HttpServerHelper.RIVER_MARSHALLER_FACTORY.createUnmarshaller(marshallingConfiguration);
LegacyJBossMarshaller(StreamingMarshaller parent, Map<Integer, ? extends AdvancedExternalizer<?>> externalizerMap) { baseCfg.setClassExternalizerFactory(new SerializeWithExtFactory()); baseCfg.setObjectTable(new ExternalizerTable(parent, externalizerMap)); baseCfg.setClassResolver(new DefaultContextClassResolver(GlobalConfigurationBuilder.class.getClassLoader())); } }
private MarshallingConfiguration createMarshallingConfig(URI uri) { final MarshallingConfiguration marshallingConfiguration = new MarshallingConfiguration(); marshallingConfiguration.setObjectResolver(new HttpProtocolV1ObjectResolver(uri)); marshallingConfiguration.setObjectTable(HttpProtocolV1ObjectTable.INSTANCE); marshallingConfiguration.setVersion(2); return marshallingConfiguration; }
private MarshallingConfiguration createMarshallingConfig(URI uri) { final MarshallingConfiguration marshallingConfiguration = new MarshallingConfiguration(); marshallingConfiguration.setObjectResolver(new HttpProtocolV1ObjectResolver(uri)); marshallingConfiguration.setObjectTable(HttpProtocolV1ObjectTable.INSTANCE); marshallingConfiguration.setVersion(2); return marshallingConfiguration; }
/** * Creates and returns a {@link org.jboss.marshalling.Marshaller} * * @param marshallerFactory The marshaller factory * @return * @throws IOException */ private org.jboss.marshalling.Marshaller getMarshaller(final org.jboss.marshalling.MarshallerFactory marshallerFactory) throws IOException { final MarshallingConfiguration marshallingConfiguration = new MarshallingConfiguration(); marshallingConfiguration.setClassTable(ProtocolV1ClassTable.INSTANCE); marshallingConfiguration.setObjectTable(ProtocolV1ObjectTable.INSTANCE); marshallingConfiguration.setVersion(2); marshallingConfiguration.setSerializedCreator(new SunReflectiveCreator()); return marshallerFactory.createMarshaller(marshallingConfiguration); }
EJBServerChannel(final RemotingTransactionServer transactionServer, final Channel channel, final int version, final MessageTracker messageTracker) { this.transactionServer = transactionServer; this.channel = channel; this.version = version; this.messageTracker = messageTracker; final MarshallingConfiguration configuration = new MarshallingConfiguration(); if (version < 3) { configuration.setClassTable(ProtocolV1ClassTable.INSTANCE); configuration.setObjectTable(ProtocolV1ObjectTable.INSTANCE); configuration.setObjectResolver(new ProtocolV1ObjectResolver(channel.getConnection(), true)); configuration.setVersion(2); } else { configuration.setObjectTable(ProtocolV3ObjectTable.INSTANCE); configuration.setObjectResolver(new ProtocolV3ObjectResolver(channel.getConnection(), true)); configuration.setVersion(4); } marshallerFactory = new RiverMarshallerFactory(); this.configuration = configuration; }
EJBServerChannel(final RemotingTransactionServer transactionServer, final Channel channel, final int version, final MessageTracker messageTracker) { this.transactionServer = transactionServer; this.channel = channel; this.version = version; this.messageTracker = messageTracker; final MarshallingConfiguration configuration = new MarshallingConfiguration(); if (version < 3) { configuration.setClassTable(ProtocolV1ClassTable.INSTANCE); configuration.setObjectTable(ProtocolV1ObjectTable.INSTANCE); configuration.setObjectResolver(new ProtocolV1ObjectResolver(channel.getConnection(), true)); configuration.setVersion(2); } else { configuration.setObjectTable(ProtocolV3ObjectTable.INSTANCE); configuration.setObjectResolver(new ProtocolV3ObjectResolver(channel.getConnection(), true)); configuration.setVersion(4); } marshallerFactory = new RiverMarshallerFactory(); this.configuration = configuration; }
public HotRodMarshaller(Module module) { super(); super.baseCfg.setClassResolver(ModularClassResolver.getInstance(module.getModuleLoader())); super.baseCfg.setClassTable(new DynamicClassTable(module.getClassLoader())); super.baseCfg.setObjectTable(new ExternalizerObjectTable(module.getClassLoader())); } }
@Override public MarshallingConfiguration apply(Module module) { MarshallingConfiguration config = new MarshallingConfiguration(); config.setClassResolver(ModularClassResolver.getInstance(module.getModuleLoader())); config.setClassTable(new SimpleClassTable(Serializable.class, Externalizable.class)); config.setObjectTable(new ExternalizerObjectTable(module.getClassLoader())); return config; } },
/** * Creates and returns a {@link Unmarshaller} * * @param marshallerFactory The marshaller factory * @return * @throws IOException */ private Unmarshaller getUnMarshaller(final MarshallerFactory marshallerFactory, final ClassResolver classResolver) throws IOException { final MarshallingConfiguration marshallingConfiguration = new MarshallingConfiguration(); marshallingConfiguration.setVersion(2); marshallingConfiguration.setClassTable(ProtocolV1ClassTable.INSTANCE); marshallingConfiguration.setObjectTable(ProtocolV1ObjectTable.INSTANCE); marshallingConfiguration.setClassResolver(classResolver); marshallingConfiguration.setSerializedCreator(new SunReflectiveCreator()); return marshallerFactory.createUnmarshaller(marshallingConfiguration); } }
@Override public MarshallingConfiguration apply(Module module) { ModuleLoader loader = module.getModuleLoader(); MarshallingConfiguration config = new MarshallingConfiguration(); config.setClassResolver(ModularClassResolver.getInstance(loader)); config.setClassTable(new DynamicClassTable(module.getClassLoader())); config.setObjectTable(new ExternalizerObjectTable(module.getClassLoader())); return config; } },
@Override public MarshallingConfiguration apply(MarshallingConfigurationContext context) { MarshallingConfiguration config = new MarshallingConfiguration(); config.setClassResolver(ModularClassResolver.getInstance(context.getModuleLoader())); config.setClassTable(new DynamicClassTable(context.getModule().getClassLoader())); config.setObjectTable(new ExternalizerObjectTable(context.getModule().getClassLoader())); return config; } },
@Override public MarshallingConfiguration getMarshallingConfiguration(int version) { MarshallingConfiguration config = this.passivationManager.getMarshallingConfiguration(version); MarshallingConfiguration result = new MarshallingConfiguration(); result.setBufferSize(config.getBufferSize()); result.setClassCount(config.getClassCount()); result.setClassExternalizerFactory(config.getClassExternalizerFactory()); result.setClassResolver(config.getClassResolver()); result.setClassTable(config.getClassTable()); result.setExceptionListener(config.getExceptionListener()); result.setExternalizerCreator(config.getExternalizerCreator()); result.setInstanceCount(config.getInstanceCount()); result.setObjectResolver(config.getObjectResolver()); result.setObjectTable(config.getObjectTable()); result.setSerializabilityChecker(this.serializabilityChecker); result.setSerializedCreator(config.getSerializedCreator()); result.setStreamHeader(config.getStreamHeader()); result.setVersion(config.getVersion()); return result; }
marshallingConfiguration.setClassTable(new StatefulSessionBeanClassTable()); marshallingConfiguration.setObjectTable(new EJBClientContextIdentifierObjectTable()); this.marshallingConfigurations = Collections.singletonMap(CURRENT_MARSHALLING_VERSION, marshallingConfiguration); this.serializableInterceptorContextKeys = componentConfiguration.getInterceptorContextKeys();