Package com.sun.jmx.mbeanserver

Examples of com.sun.jmx.mbeanserver.GetPropertyAction


  // instead of buffer.size
  final String oldP = "jmx.remote.x.buffer.size";

  // the default value re-specified in the system
  try {
      GetPropertyAction act = new GetPropertyAction(BUFFER_SIZE_PROPERTY);
      String s = (String)AccessController.doPrivileged(act);
      if (s != null) {
    defaultQueueSize = Integer.parseInt(s);
      } else { // try the old one
    act = new GetPropertyAction(oldP);
    s = (String)AccessController.doPrivileged(act);
    if (s != null) {
        defaultQueueSize = Integer.parseInt(s);
    }
      }
View Full Code Here


     * Instantiate a new builder according to the
     * javax.management.builder.initial System property - if needed.
     **/
    private static synchronized void checkMBeanServerBuilder() {
        try {
            GetPropertyAction act =
                    new GetPropertyAction(JMX_INITIAL_BUILDER);
            String builderClassName = AccessController.doPrivileged(act);

            try {
                final Class<?> newBuilderClass;
                if (builderClassName == null || builderClassName.length() == 0)
View Full Code Here

        // Since LinkedHashMap was introduced in SE 1.4, it's conceivable even
        // if very unlikely that we might be the server of a 1.3 client.  In
        // that case you'll need to set this property.  See CR 6334663.
        String useHashMapProp = AccessController.doPrivileged(
                new GetPropertyAction("jmx.tabular.data.hash.map"));
        boolean useHashMap = "true".equalsIgnoreCase(useHashMapProp);

        // Construct the empty contents HashMap
        //
        this.dataMap = useHashMap ?
View Full Code Here

    private void checkClassNameOverride() throws SecurityException {
        if (this.getClass().getClassLoader() == null)
            return// We trust bootstrap classes.
        if (overridesGetClassName(this.getClass())) {
            final GetPropertyAction getExtendOpenTypes =
                new GetPropertyAction("jmx.extend.open.types");
            if (AccessController.doPrivileged(getExtendOpenTypes) == null) {
                throw new SecurityException("Cannot override getClassName() " +
                        "unless -Djmx.extend.open.types");
            }
        }
View Full Code Here

            // by the value of the "jmx.remote.x.mlet.allow.getMBeansFromURL"
            // system property. If the value of this property is true, calling
            // the MLet's getMBeansFromURL method is allowed. The default value
            // for this property is false.
            final String propName = "jmx.remote.x.mlet.allow.getMBeansFromURL";
            GetPropertyAction propAction = new GetPropertyAction(propName);
            String propValue = AccessController.doPrivileged(propAction);
            boolean allowGetMBeansFromURL = "true".equalsIgnoreCase(propValue);
            if (!allowGetMBeansFromURL) {
                throw new SecurityException("Access denied! MLet method " +
                        "getMBeansFromURL cannot be invoked unless a " +
View Full Code Here

     * Instantiate a new builder according to the
     * javax.management.builder.initial System property - if needed.
     **/
    private static synchronized void checkMBeanServerBuilder() {
  try {
      GetPropertyAction act =
    new GetPropertyAction(JmxProperties.JMX_INITIAL_BUILDER);
      String builderClassName = AccessController.doPrivileged(act);

      try {
    final Class newBuilderClass;
    if (builderClassName == null || builderClassName.length() == 0)
View Full Code Here

    private void checkClassNameOverride() throws SecurityException {
        if (this.getClass().getClassLoader() == null)
            return// We trust bootstrap classes.
        if (overridesGetClassName(this.getClass())) {
            final GetPropertyAction getExtendOpenTypes =
                new GetPropertyAction("jmx.extend.open.types");
            if (AccessController.doPrivileged(getExtendOpenTypes) == null) {
                throw new SecurityException("Cannot override getClassName() " +
                        "unless -Djmx.extend.open.types");
            }
        }
View Full Code Here

        // instead of buffer.size
        final String oldP = "jmx.remote.x.buffer.size";

        // the default value re-specified in the system
        try {
            GetPropertyAction act = new GetPropertyAction(BUFFER_SIZE_PROPERTY);
            String s = AccessController.doPrivileged(act);
            if (s != null) {
                defaultQueueSize = Integer.parseInt(s);
            } else { // try the old one
                act = new GetPropertyAction(oldP);
                s = AccessController.doPrivileged(act);
                if (s != null) {
                    defaultQueueSize = Integer.parseInt(s);
                }
            }
View Full Code Here

            // by the value of the "jmx.remote.x.mlet.allow.getMBeansFromURL"
            // system property. If the value of this property is true, calling
            // the MLet's getMBeansFromURL method is allowed. The default value
            // for this property is false.
            final String propName = "jmx.remote.x.mlet.allow.getMBeansFromURL";
            GetPropertyAction propAction = new GetPropertyAction(propName);
            String propValue = (String) AccessController.doPrivileged(propAction);
            boolean allowGetMBeansFromURL = "true".equalsIgnoreCase(propValue);
            if (!allowGetMBeansFromURL) {
                throw new SecurityException("Access denied! MLet method " +
                        "getMBeansFromURL cannot be invoked unless a " +
View Full Code Here

  // instead of buffer.size
  final String oldP = "jmx.remote.x.buffer.size";

  // the default value re-specified in the system
  try {
      GetPropertyAction act = new GetPropertyAction(BUFFER_SIZE_PROPERTY);
      String s = (String)AccessController.doPrivileged(act);
      if (s != null) {
    defaultQueueSize = Integer.parseInt(s);
      } else { // try the old one
    act = new GetPropertyAction(oldP);
    s = (String)AccessController.doPrivileged(act);
    if (s != null) {
        defaultQueueSize = Integer.parseInt(s);
    }
      }
View Full Code Here

TOP

Related Classes of com.sun.jmx.mbeanserver.GetPropertyAction

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.