Examples of loadClass()


Examples of org.jboss.modules.ModuleClassLoader.loadClass()

            // Load the server Module and get its ClassLoader
            final ModuleIdentifier serverModuleId = ModuleIdentifier.create("org.jboss.as.server");
            final Module serverModule = moduleLoader.loadModule(serverModuleId);
            final ModuleClassLoader serverModuleClassLoader = serverModule.getClassLoader();

            Class<?> embeddedStandAloneServerFactoryClass = serverModuleClassLoader.loadClass("org.jboss.as.server.EmbeddedStandAloneServerFactory");
            Method createMethod = embeddedStandAloneServerFactoryClass.getMethod("create", File.class, ModuleLoader.class, Properties.class, Map.class);
            final StandaloneServer standaloneServer = (StandaloneServer) createMethod.invoke(null, jbossHomeDir, moduleLoader, systemProps, systemEnv);
            return standaloneServer;
        } catch (ModuleLoadException e) {
            throw MESSAGES.moduleLoaderError(e, e.getMessage(), moduleLoader);
View Full Code Here

Examples of org.jboss.mx.loading.LoaderRepository.loadClass()

              
               try
               {
                  Object o =  server.getAttribute(name, "Instance");
                  LoaderRepository repository = (LoaderRepository) o;
                  Class c = repository.loadClass(className);
                  if (c == null)
                  {
                     continue;
                  }
                  log.debug("found class in repository " + name);
View Full Code Here

Examples of org.jboss.mx.loading.RepositoryClassLoader.loadClass()

      UnifiedLoaderRepository3 parent = new UnifiedLoaderRepository3();
      HeirarchicalLoaderRepository3 repository0 = new HeirarchicalLoaderRepository3(parent);
      URL j0URL = getDeployURL("tests-dummy.jar");
      RepositoryClassLoader ucl0 = repository0.newClassLoader(j0URL, true);

      Class c0 = ucl0.loadClass("java.sql.SQLException");
      StringBuffer info = new StringBuffer();
      ClassLoaderUtils.displayClassInfo(c0, info);
      log.info("Loaded c0: "+info);

      HeirarchicalLoaderRepository3 repository1 = new HeirarchicalLoaderRepository3(parent);
View Full Code Here

Examples of org.jboss.mx.loading.UnifiedLoaderRepository3.loadClass()

      URL[] cp = getEarClassPath(ear);
      UnifiedLoaderRepository3 repository = new UnifiedLoaderRepository3();
      for(URL url : cp)
         repository.newClassLoader(url, true);
      log.debug("ear classpath: "+Arrays.asList(cp));
      repository.loadClass("org.jboss.seam.example.booking.Hotel");
      repository.loadClass("org.jboss.seam.debug.Contexts");
   }

   public void testVFSPolicy() throws Exception
   {
View Full Code Here

Examples of org.jboss.osgi.resolver.XBundle.loadClass()

        if (bundle == null && module == null)
            throw new IllegalStateException("Cannot determine deployment type: " + depUnit);

        Class<?> testClass;
        if (bundle != null) {
            testClass = bundle.loadClass(className);
            BundleAssociation.setBundle(bundle);
        } else {
            testClass = module.getClassLoader().loadClass(className);
        }
View Full Code Here

Examples of org.jboss.profiler.aop.logger.FileProfileLogger.loadClass()

    public void testLoadClassFormats() throws Exception {
        ByteArrayOutputStream arrayOutput = new ByteArrayOutputStream(1024);
        FileProfileLogger logger = new FileProfileLogger(arrayOutput);

        for (int i=0;i<100;i++) {
            logger.loadClass(1,1,this.getClass().getName(),10);
            for (int j=0;j<10;j++) logger.loadMethod(1,1,1,"method" +j,"()");
        }

        ByteArrayInputStream input = new ByteArrayInputStream(arrayOutput.toByteArray());
        SpyFileReader reader = new SpyFileReader(input,false);
View Full Code Here

Examples of org.jboss.shrinkwrap.api.classloader.ShrinkWrapClassLoader.loadClass()

             * All reflection in this section is to avoid CCE when we load these classes from the isolated ClassLoader,
             * we can't have them assignable to the ClassLoader which loaded this class.
             */
            final Class<?> testClass;
            try {
                testClass = isolatedArchiveCL.loadClass(testClassName);
            } catch (final ClassNotFoundException cnfe) {
                throw new IllegalStateException("Could not load class " + testClassName + " from deployed archive: "
                    + archive.toString());
            }
            final Class<?> testRunnersClass;
View Full Code Here

Examples of org.jboss.weld.resources.ClassTransformer.loadClass()

            SecurityActions.setContextClassLoader(classLoader);
            final BeanManagerImpl bm = beanManager.getValue();
            final ClassTransformer transformer = bm.getServices().get(ClassTransformer.class);
            final List<Injection> injectionPoints = new ArrayList<Injection>();
            //we do it this way to get changes introduced by extensions
            WeldClass<?> weldClass = transformer.loadClass(componentClass);
            for (AnnotatedField<?> field : weldClass.getFields()) {
                if (field.isAnnotationPresent(Inject.class)) {
                    final Set<Annotation> qualifiers = new HashSet<Annotation>();
                    for (Annotation annotation : field.getAnnotations()) {
                        if (bm.isQualifier(annotation.annotationType())) {
View Full Code Here

Examples of org.jibx.binding.Loader.loadClass()

                    Loader loader = new Loader();
                    loader.loadResourceBinding(args[offset]);
                   
                    // invoke the "runTest" method of the runner class
                    Thread.currentThread().setContextClassLoader(loader);
                    Class clas = loader.loadClass("org.jibx.match.TestRunner");
                    Method test = clas.getDeclaredMethod("runTest",
                        RUNNER_PARAM_TYPES);
                    pargs[0] = args[offset+1];
                    pargs[1] = args[offset+2];
                    pargs[2] = args[offset+3];
View Full Code Here

Examples of org.jibx.util.IClass.loadClass()

            // check for default value to be converted
            if (m_defaultText != null && m_deserializerItem != null) {
               
                // first load the class to handle conversion
                IClass iclas = m_deserializerItem.getOwningClass();
                Class clas = iclas.loadClass();
                Exception ex = null;
                boolean construct = false;
                try {
                    if (clas == null) {
                        vctx.addError("Unable to load class " +
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.