Examples of MarshallingConfiguration


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

     * @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);
    }
View Full Code Here

Examples of org.jboss.marshalling.MarshallingConfiguration

     * @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);
    }
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();
        MarshallingConfiguration marshallingConfiguration = new MarshallingConfiguration();
        marshallingConfiguration.setSerializedCreator(new SunReflectiveCreator());
        marshallingConfiguration.setExternalizerCreator(new ReflectiveCreator());
        marshallingConfiguration.setClassResolver(new ClassLoaderAwareClassResolver(ModularClassResolver.getInstance(componentConfiguration.getModuleLoader()), componentConfiguration.getModuleClassLoader()));
        marshallingConfiguration.setSerializabilityChecker(new StatefulSessionBeanSerializabilityChecker(componentConfiguration.getComponentClass()));
        marshallingConfiguration.setClassTable(new StatefulSessionBeanClassTable());
        // ObjectTable which handles serialization of EJB proxies
        marshallingConfiguration.setObjectTable(new EJBClientContextIdentifierObjectTable());
        this.marshallingConfigurations = Collections.singletonMap(CURRENT_MARSHALLING_VERSION, marshallingConfiguration);
        this.serializableInterceptorContextKeys = componentConfiguration.getInterceptorContextKeys();
    }
View Full Code Here

Examples of org.jboss.marshalling.MarshallingConfiguration

        return this.currentMarshallingVersion;
    }

    @Override
    public MarshallingConfiguration getMarshallingConfiguration(int version) {
        MarshallingConfiguration config = this.marshallingConfigurations.get(version);
        if (config == null) {
            throw MESSAGES.unsupportedMarshallingVersion(version);
        }
        return config;
    }
View Full Code Here

Examples of org.jboss.marshalling.MarshallingConfiguration

    @Override
    public synchronized void start(final StartContext context) {

        final RiverMarshallerFactory factory = new RiverMarshallerFactory();
        final MarshallingConfiguration configuration = new MarshallingConfiguration();
        configuration.setClassResolver(ModularClassResolver.getInstance(moduleLoader.getValue()));

        this.configuration = configuration;
        this.factory = factory;
        if (pathRelativeTo != null) {
            callbackHandle = pathManager.getValue().registerCallback(pathRelativeTo, PathManager.ReloadServerCallback.create(), PathManager.Event.UPDATED, PathManager.Event.REMOVED);
View Full Code Here

Examples of org.jboss.marshalling.MarshallingConfiguration

   protected MarshallerFactory factory;

   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

            FileInputStream inputStream = null;
            try {
                inputStream = FISAction.open(file);
                SimpleDataInput input = new SimpleDataInput(Marshalling.createByteInput(inputStream));
                int version = input.readInt();
                MarshallingConfiguration config = this.passivationManager.getMarshallingConfiguration(version);
                Unmarshaller unmarshaller = this.marshallerFactory.createUnmarshaller(config);
                unmarshaller.start(input);
                try {
                    V value = (V) unmarshaller.readObject();
                    unmarshaller.finish();
View Full Code Here

Examples of org.jboss.marshalling.MarshallingConfiguration

            try {
                outputStream = FOSAction.open(file);
                SimpleDataOutput output = new SimpleDataOutput(Marshalling.createByteOutput(outputStream));
                int version = this.passivationManager.getCurrentMarshallingVersion();
                output.writeInt(version);
                MarshallingConfiguration config = this.passivationManager.getMarshallingConfiguration(version);
                Marshaller marshaller = this.marshallerFactory.createMarshaller(config);
                marshaller.start(output);
                try {
                    marshaller.writeObject(obj);
                    marshaller.finish();
View Full Code Here

Examples of org.jboss.marshalling.MarshallingConfiguration

        return this.passivationManager.getCurrentMarshallingVersion();
    }

    @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;
    }
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.