Package org.jboss.marshalling

Examples of org.jboss.marshalling.ClassResolver


      baseCfg.setObjectTable(externalizerTable);

      proxy = new ExternalizerTableProxy(externalizerTable);
      baseCfg.setObjectTable(proxy);

      ClassResolver classResolver = globalCfg.serialization().classResolver();
      if (classResolver == null) {
         // Override the class resolver with one that can detect injected
         // classloaders via AdvancedCache.with(ClassLoader) calls.
         ClassLoader cl = cfg == null ? globalCfg.classLoader() : cfg.classLoader();
         classResolver = new EmbeddedContextClassResolver(cl, icc);
View Full Code Here


            if (config.getObjectTable() != null) {
                throw new SkipException("object tables not supported");
            }
            final ObjectResolver objectResolver = config.getObjectResolver();
            this.objectResolver = objectResolver == null ? Marshalling.nullObjectResolver() : objectResolver;
            final ClassResolver classResolver = config.getClassResolver();
            this.classResolver = classResolver == null ? new SimpleClassResolver(getClass().getClassLoader()) : classResolver;
            enableResolveObject(true);
            //noinspection ThisEscapedInObjectConstruction
            unmarshaller = new ObjectInputStreamUnmarshaller(this);
        }
View Full Code Here

            if (config.getClassExternalizerFactory() != null) {
                throw new SkipException("externalizers not supported");
            }
            final ObjectResolver objectResolver = config.getObjectResolver();
            this.objectResolver = objectResolver == null ? Marshalling.nullObjectResolver() : objectResolver;
            final ClassResolver classResolver = config.getClassResolver();
            this.classResolver = classResolver == null ? new SimpleClassResolver(getClass().getClassLoader()) : classResolver;
            enableReplaceObject(true);
            //noinspection ThisEscapedInObjectConstruction
            marshaller = new ObjectOutputStreamMarshaller(this);
        }
View Full Code Here

        // Distributable
        if (metaData.getDistributable() != null) {
            try {
                Module module = this.deploymentUnitContext.getAttachment(Attachments.MODULE);
                ClassResolver resolver = ModularClassResolver.getInstance(module.getModuleLoader());
                context.setManager(new DistributableSessionManager<OutgoingDistributableSessionData>(this.factory.getValue(), metaData, new ClassLoaderAwareClassResolver(resolver, module.getClassLoader())));
                context.setDistributable(true);
            } catch (Exception e) {
                WebLogger.WEB_LOGGER.clusteringNotSupported();
            }
View Full Code Here

      this.externalizerTable = externalizerTable;

      proxy = new ExternalizerTableProxy(externalizerTable);
      baseCfg.setObjectTable(proxy);

      ClassResolver classResolver = globalCfg.serialization().classResolver();
      if (classResolver == null) {
         // Override the class resolver with one that can detect injected
         // classloaders via AdvancedCache.with(ClassLoader) calls.
         classResolver = new EmbeddedContextClassResolver(cl, icc);
      }
View Full Code Here

         InvocationContextContainer icc, GlobalConfiguration globalCfg) {
      log.debug("Using JBoss Marshalling");
      this.externalizerTable = externalizerTable;
      baseCfg.setObjectTable(externalizerTable);

      ClassResolver classResolver = globalCfg.getClassResolver();
      if (classResolver == null) {
         // Override the class resolver with one that can detect injected
         // classloaders via AdvancedCache.with(ClassLoader) calls.
         classResolver = new EmbeddedContextClassResolver(cl, icc);
      }
View Full Code Here

        // Distributable
        // [TODO] Distributable for unresolved WABs
        Module module = this.deploymentUnitContext.getAttachment(Attachments.MODULE);
        if (module != null && metaData.getDistributable() != null) {
            try {
                ClassResolver resolver = ModularClassResolver.getInstance(module.getModuleLoader());
                context.setManager(new DistributableSessionManager<OutgoingDistributableSessionData>(this.factory.getValue(), metaData, new ClassLoaderAwareClassResolver(resolver, module.getClassLoader())));
                context.setDistributable(true);
            } catch (Exception e) {
                WebLogger.WEB_LOGGER.clusteringNotSupported();
            }
View Full Code Here

        return this.factory.createMarshaller(this.getMarshallingConfiguration(version));
    }

    // AS7-2496 Workaround
    public ClassLoader getContextClassLoader(int version) {
        final ClassResolver resolver = this.getMarshallingConfiguration(version).getClassResolver();
        return (resolver instanceof ClassLoaderProvider) ? ((ClassLoaderProvider) resolver).getClassLoader() : null;
    }
View Full Code Here

            }

            String serviceName = ((HAServiceResponse) retval).getServiceName();
            byte[] payload = ((HAServiceResponse) retval).getPayload();

            ClassResolver resolver = CoreGroupCommunicationService.this.resolvers.get(serviceName);
            if (resolver == null) {
                resolver = new SimpleClassResolver(CoreGroupCommunicationService.class.getClassLoader());
            }
            return CoreGroupCommunicationService.this.objectFromByteBufferResponseInternal(resolver, payload, offset, length);
        }
View Full Code Here

                CoreGroupCommunicationService.this.log.partitionFailedUnserialing(e, CoreGroupCommunicationService.this.getGroupName(), req);
                return null;
            }

            // If client registered the service with a classloader, override the thread classloader here
            ClassResolver resolver = CoreGroupCommunicationService.this.resolvers.get(service);
            if (resolver == null) {
                resolver = new SimpleClassResolver(CoreGroupCommunicationService.class.getClassLoader());
            }
            try {
                body = CoreGroupCommunicationService.this.objectFromByteBufferInternal(resolver, request_bytes, 0, request_bytes.length);
View Full Code Here

TOP

Related Classes of org.jboss.marshalling.ClassResolver

Copyright © 2018 www.massapicom. 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.