Examples of MarshallingConfiguration


Examples of org.jboss.marshalling.MarshallingConfiguration

    private static final int CURRENT_VERSION = 1;

    private final Map<Integer, MarshallingConfiguration> configurations = new ConcurrentHashMap<>();

    public SessionAttributeMarshallingContext(Module module) {
        MarshallingConfiguration configuration = MarshallingConfigurationFactory.createMarshallingConfiguration(module.getModuleLoader());
        configuration.setClassTable(new SimpleClassTable(Serializable.class, Externalizable.class));
        this.configurations.put(CURRENT_VERSION, configuration);
    }
View Full Code Here

Examples of org.jboss.marshalling.MarshallingConfiguration

        return CURRENT_VERSION;
    }

    @Override
    public MarshallingConfiguration getMarshallingConfiguration(int version) {
        MarshallingConfiguration config = this.configurations.get(version);
        if (config == null) {
            throw new IllegalArgumentException(String.valueOf(version));
        }
        return config;
    }
View Full Code Here

Examples of org.jboss.marshalling.MarshallingConfiguration

* @author Paul Ferraro
*/
public class MarshallingConfigurationFactory {

    public static MarshallingConfiguration createMarshallingConfiguration(ModuleLoader loader) {
        MarshallingConfiguration config = new MarshallingConfiguration();
        config.setClassResolver(ModularClassResolver.getInstance(loader));
        return config;
    }
View Full Code Here

Examples of org.jboss.marshalling.MarshallingConfiguration

            }

            @Override
            public MarshallingConfiguration getMarshallingConfiguration(int version) {
                assertEquals(0, version);
                return new MarshallingConfiguration();
            }
        };
        this.context = new SimpleMarshallingContext(Marshalling.getMarshallerFactory("river", Marshalling.class.getClassLoader()), configuration, Thread.currentThread().getContextClassLoader());
        this.factory = this.createFactory(this.context);
    }
View Full Code Here

Examples of org.jboss.marshalling.MarshallingConfiguration

    }

    @Override
    public void start(StartContext context) throws StartException {
        ModuleLoader loader = this.loader.getValue();
        MarshallingConfiguration config = MarshallingConfigurationFactory.createMarshallingConfiguration(loader);
        try {
            Module module = loader.loadModule(this.identifier);
            config.setClassTable(new DynamicClassTable(module.getClassLoader()));
            this.configurations.put(CURRENT_VERSION, config);
            this.marshallingContext = new SimpleMarshallingContextFactory().createMarshallingContext(this, module.getClassLoader());
        } catch (ModuleLoadException e) {
            throw new StartException(e);
        }
View Full Code Here

Examples of org.jboss.marshalling.MarshallingConfiguration

        return CURRENT_VERSION;
    }

    @Override
    public MarshallingConfiguration getMarshallingConfiguration(int version) {
        MarshallingConfiguration configuration = this.configurations.get(version);
        if (configuration == null) {
            throw new IllegalArgumentException(Integer.toString(version));
        }
        return configuration;
    }
View Full Code Here

Examples of org.jboss.marshalling.MarshallingConfiguration

   private final ConcurrentMap<Class, Boolean> isMarshallableMap = new ConcurrentWeakKeyHashMap<Class, Boolean>();

   public GenericJBossMarshaller() {
      factory = Marshalling.getMarshallerFactory("river", Marshalling.class.getClassLoader());

      configuration = new MarshallingConfiguration();
      configuration.setCreator(new SunReflectiveCreator());
      configuration.setExceptionListener(new DebuggingExceptionListener());
      // ContextClassResolver provides same functionality as MarshalledValueInputStream
      configuration.setClassResolver(new DefaultContextClassResolver(defaultCl));
      configuration.setClassExternalizerFactory(new SerializeWithExtFactory());
View Full Code Here

Examples of org.jboss.marshalling.MarshallingConfiguration

   private final ConcurrentMap<Class, Boolean> isMarshallableMap = new ConcurrentWeakKeyHashMap<Class, Boolean>();

   public GenericJBossMarshaller() {
      factory = Marshalling.getMarshallerFactory("river");

      configuration = new MarshallingConfiguration();
      configuration.setCreator(new SunReflectiveCreator());
      configuration.setExceptionListener(new DebuggingExceptionListener());
      // ContextClassResolver provides same functionality as MarshalledValueInputStream
      configuration.setClassResolver(new ContextClassResolver());
      configuration.setVersion(2);
View Full Code Here

Examples of org.jboss.marshalling.MarshallingConfiguration

    public synchronized void start(final StartContext startContext) throws StartException {

        try {
            final RiverMarshallerFactory factory = new RiverMarshallerFactory();
            final MarshallingConfiguration configuration = new MarshallingConfiguration();
            configuration.setClassResolver(ModularClassResolver.getInstance(serviceModuleLoaderInjectedValue.getValue()));
            this.configuration = configuration;
            this.factory = factory;


            // Should create a CORBA interface repository?
View Full Code Here

Examples of org.jboss.marshalling.MarshallingConfiguration

        this.postActivate = Interceptors.getChainedInterceptorFactory(componentConfiguration.getPostActivateInterceptors());
        this.statefulTimeout = componentDescription.getStatefulTimeout();
        //the interceptor chain for EJB e.x remove methods
        this.ejb2XRemoveMethod = Interceptors.getChainedInterceptorFactory(StatefulSessionSynchronizationInterceptor.factory(componentDescription.getTransactionManagementType()), new ImmediateInterceptorFactory(new StatefulRemoveInterceptor(false)), Interceptors.getTerminalInterceptorFactory());
        this.cache = componentDescription.getCache();
        this.marshallingConfiguration = new MarshallingConfiguration();
        this.marshallingConfiguration.setSerializedCreator(new SunReflectiveCreator());
        this.marshallingConfiguration.setExternalizerCreator(new ReflectiveCreator());
        this.marshallingConfiguration.setClassResolver(new ClassLoaderAwareClassResolver(ModularClassResolver.getInstance(componentConfiguration.getModuleLoader()), componentConfiguration.getModuleClassLoder()));
        this.marshallingConfiguration.setSerializabilityChecker(new StatefulSessionBeanSerializabilityChecker(componentConfiguration.getComponentClass()));
        this.marshallingConfiguration.setClassTable(new StatefulSessionBeanClassTable());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.