Examples of JVM


Examples of com.sun.appserv.management.j2ee.JVM

   
    String  lastVendor  = null;
    String  lastVersion  = null;
    while ( iter.hasNext() )
    {
      final JVM  jvm  = (JVM)iter.next();
     
      // the ObjectName of the Node must match the String version for "node"
      assert( jvm.getnode() != null );
     
      // the JVMs should all have the same vendor (presumably)
      assert( jvm.getjavaVendor() != null );
      if ( lastVendor == null )
      {
        lastVendor  = jvm.getjavaVendor();
      }
      else
      {
        assert( lastVendor.equals( jvm.getjavaVendor() ) );
      }
     
      // the JVMs should all have the same version (presumably)
      assert( jvm.getjavaVersion() != null );
      if ( lastVersion == null )
      {
        lastVersion  = jvm.getjavaVersion();
      }
      else
      {
        assert( lastVersion.equals( jvm.getjavaVersion() ) );
      }
    }
  }
View Full Code Here

Examples of com.thoughtworks.xstream.core.JVM

public final class XStreamUtil {
    private XStreamUtil() {
    }

    public static XStream createXStream() {
        JVM jvm = new JVM();
        ReflectionProvider reflectionProvider = jvm.bestReflectionProvider();
        XStream xstream = new XStream(reflectionProvider);

        // AbstractName
        xstream.alias("abstractName", AbstractName.class);
        xstream.addImmutableType(AbstractName.class);
View Full Code Here

Examples of com.thoughtworks.xstream.core.JVM

    }

    @Override
    protected Converter createDefaultConverter() {
        // replace default reflection converter
        reflectionConverter = new RobustReflectionConverter(getMapper(),new JVM().bestReflectionProvider());
        return reflectionConverter;
    }
View Full Code Here

Examples of com.thoughtworks.xstream.core.JVM

                    return Functions.getCurrentLocale();
                }
            });

            // quick check to see if we (seem to) have enough permissions to run. (see #719)
            JVM jvm;
            try {
                jvm = new JVM();
                new URLClassLoader(new URL[0],getClass().getClassLoader());
            } catch(SecurityException e) {
                context.setAttribute(APP,new InsufficientPermissionDetected(e));
                return;
            }

            try {// remove Sun PKCS11 provider if present. See http://wiki.jenkins-ci.org/display/JENKINS/Solaris+Issue+6276483
                Security.removeProvider("SunPKCS11-Solaris");
            } catch (SecurityException e) {
                // ignore this error.
            }

            installLogger();

            final FileAndDescription describedHomeDir = getHomeDir(event);
            final File home = describedHomeDir.file.getAbsoluteFile();
            home.mkdirs();
            System.out.println("Jenkins home directory: "+home+" found at: "+describedHomeDir.description);

            // check that home exists (as mkdirs could have failed silently), otherwise throw a meaningful error
            if (! home.exists()) {
                context.setAttribute(APP,new NoHomeDir(home));
                return;
            }

            // make sure that we are using XStream in the "enhanced" (JVM-specific) mode
            if(jvm.bestReflectionProvider().getClass()==PureJavaReflectionProvider.class) {
                // nope
                context.setAttribute(APP,new IncompatibleVMDetected());
                return;
            }
View Full Code Here

Examples of com.thoughtworks.xstream.core.JVM

    public static class ConverterImpl extends GlobalMatrixAuthorizationStrategy.ConverterImpl {
        private RobustReflectionConverter ref;

        public ConverterImpl(Mapper m) {
            ref = new RobustReflectionConverter(m,new JVM().bestReflectionProvider());
        }
View Full Code Here

Examples of com.thoughtworks.xstream.core.JVM

        setupMappers();
        locked = true;

        final ClassLoader classLoader = classLoaderReference.getReference();
        arguments = new Object[]{
            this, classLoaderReference, reflectionProvider, converterLookup, new JVM(),
            classLoader != null ? classLoader : new TypedNull<ClassLoader>(ClassLoader.class)};
    }
View Full Code Here

Examples of com.thoughtworks.xstream.core.JVM

            arguments[i] = in.readObject();
            if (arguments[i] instanceof ClassLoaderReference) {
                arguments[max + 1] = ((ClassLoaderReference)arguments[i]).getReference();
            }
        }
        arguments[max] = new JVM();
    }
View Full Code Here

Examples of com.thoughtworks.xstream.core.JVM

public final class XStreamUtil {
    private XStreamUtil() {
    }

    public static XStream createXStream() {
        JVM jvm = new JVM();
        ReflectionProvider reflectionProvider = jvm.bestReflectionProvider();
        XStream xstream = new XStream(reflectionProvider);

        // AbstractName
        xstream.alias("abstractName", AbstractName.class);
        xstream.addImmutableType(AbstractName.class);
View Full Code Here

Examples of com.thoughtworks.xstream.core.JVM

        addDriverTest(new StaxDriver());
        addDriverTest(new XppDomDriver());
        addDriverTest(new XppDriver());
        addDriverTest(new XomDriver());
        if (JVM.is14()) {
            JVM jvm = new JVM();
            Class driverType = jvm.loadClass("com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver");
            try {
                addDriverTest((HierarchicalStreamDriver)driverType.newInstance());
            } catch (InstantiationException e) {
                throw new AssertionFailedError("Cannot instantiate " + driverType.getName());
            } catch (IllegalAccessException e) {
View Full Code Here

Examples of com.thoughtworks.xstream.core.JVM

     */
    public XStream(
        ReflectionProvider reflectionProvider, HierarchicalStreamDriver driver,
        ClassLoader classLoader, Mapper mapper, ConverterLookup converterLookup,
        ConverterRegistry converterRegistry) {
        jvm = new JVM();
        if (reflectionProvider == null) {
            reflectionProvider = jvm.bestReflectionProvider();
        }
        this.reflectionProvider = reflectionProvider;
        this.hierarchicalStreamDriver = driver;
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.