Package org.jboss.marshalling

Examples of org.jboss.marshalling.ClassResolver


    @Test
    public void test() {
        MarshallerFactory marshallerFactory = mock(MarshallerFactory.class);
        LocalDistributableSessionManager manager = mock(LocalDistributableSessionManager.class);
        SessionAttributeMarshallerFactory factory = new SessionAttributeMarshallerFactoryImpl(marshallerFactory);
        ClassResolver resolver = mock(ClassResolver.class);

        when(manager.getApplicationClassResolver()).thenReturn(resolver);

        SessionAttributeMarshaller marshaller = factory.createMarshaller(manager);
View Full Code Here


      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

        return this.factory.createMarshaller(this.configuration);
    }

    // AS7-2496 Workaround
    public ClassLoader getContextClassLoader() {
        final ClassResolver resolver = configuration.getClassResolver();
        return (resolver instanceof ClassLoaderProvider) ? ((ClassLoaderProvider) resolver).getClassLoader() : null;
    }
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(), this.context, metaData, new ClassLoaderAwareClassResolver(resolver, module.getClassLoader())));
                context.setDistributable(true);
            } catch (Exception e) {
                WebLogger.WEB_LOGGER.clusteringNotSupported();
            }
View Full Code Here

      baseCfg.setClassExternalizerFactory(new SerializeWithExtFactory());

      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 = globalCfg.classLoader();
         classResolver = new EmbeddedContextClassResolver(cl, icc);
View Full Code Here

      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

        // 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

   public void start() {
      super.start();

      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.
         ClassLoader cl = cfg == null ? globalCfg.getClassLoader() : cfg.getClassLoader();
         classResolver = new EmbeddedContextClassResolver(cl, icc);
View Full Code Here

      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

      baseCfg.setClassExternalizerFactory(new SerializeWithExtFactory());

      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 = Configurations.getClassLoader(cfg, globalCfg);
         classResolver = new EmbeddedContextClassResolver(cl, icc);
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.