Package java.rmi

Examples of java.rmi.RMISecurityManager


   public void init(Global glob, CallbackAddress callbackAddress) throws XmlBlasterException {
      this.glob = glob;

      // Create and install a security manager
      if (System.getSecurityManager() == null) {
         System.setSecurityManager(new RMISecurityManager());
         if (log.isLoggable(Level.FINE)) log.fine("Started RMISecurityManager");
      }

      this.callbackAddress = callbackAddress;
      String addr = callbackAddress.getRawAddress(); // e.g. "rmi://localhost/xmlBlaster"
View Full Code Here


      if (System.getSecurityManager() == null) {
         String exist = System.getProperty("java.security.policy");
         if (exist == null) {
            throw new SecurityException("You must specify a -Djava.security.policy when starting the server to be able to use the RMI driver");
         }else {
            System.setSecurityManager(new RMISecurityManager());
         } // end of else
      }
   }
View Full Code Here

    * @param args
    */
   private void initRmi() throws XmlBlasterException {
      // Create and install a security manager
      if (System.getSecurityManager() == null) {
         System.setSecurityManager(new RMISecurityManager());
         if (log.isLoggable(Level.FINE)) log.fine("Started RMISecurityManager");
      }

      String hostname;
      try  {
View Full Code Here

               String text = "java.security.policy is not set, please include config/xmlBlaster.policy into your CLASSPATH or pass the file on startup like 'java -Djava.security.policy=<path>xmlBlaster.policy'...";
               throw new XmlBlasterException(glob, ErrorCode.RESOURCE_CONFIGURATION, "XmlBlasterSecurityManagerFailed", text);
            }
         }

         System.setSecurityManager(new RMISecurityManager());
         if (log.isLoggable(Level.FINE)) log.fine("Started RMISecurityManager");
         if (createdTemporary) {
            if (log.isLoggable(Level.FINE)) log.fine("Removed temporary xmlBlaster.policy from local directory.");
            FileLocator.deleteFile(".", "xmlBlaster.policy");
         }
View Full Code Here

        bc = null;
    }

    synchronized static void ensureSecurityManager() {
        if (System.getSecurityManager() == null) {
            System.setSecurityManager(new RMISecurityManager());
        }
    }
View Full Code Here

     * @param args the port number as a command-line argument.
     */
    public static void main(String [] args) {
        // Set the security manager.
        if(System.getSecurityManager() == null) {
            System.setSecurityManager(new RMISecurityManager());
        }

        // Set the host name and port number.
        String host = null;
        int port = 1099; // default port is 1099
View Full Code Here

     */
    public static void main(String [] args) {

        // Set the security manager.
        if(System.getSecurityManager() == null) {
            System.setSecurityManager(new RMISecurityManager());
        }

  // Load all JAIServerConfigurationSpi implementations on the CLASSPATH
  Iterator spiIter = Service.providers(JAIServerConfigurationSpi.class);
  JAI jai = JAI.getDefaultInstance();
View Full Code Here

 
  /** Main method.
   * @param args the program arguments
   */
  public static void main (String[] args) {
    System.setSecurityManager (new RMISecurityManager ());
   
    try {
      ComputeEngineImpl obj = new ComputeEngineImpl ();
      registerToRegistry ("ComputeEngine", obj, true);
    } catch (RemoteException ex) {
View Full Code Here

    processArguments (args);
   
    log.log (Level.FINER, "Starting ComputeProxy");
   
    log.log (Level.FINEST, "Setting SecurityManager");
    System.setSecurityManager (new RMISecurityManager ());
   
    ResultChannelImpl resultChannel = null;
    ServerSocket ss = null;
   
    //Prepare the return data channel
View Full Code Here

    try {
      Resource policy = new ClassPathResource("policy");
      System.out.println("policy is " + policy);
      System.setProperty("java.security.policy", policy.getFile().getAbsolutePath());
      System.setSecurityManager(new RMISecurityManager());
      System.setSecurityManager(null);
    }
    finally {
      System.setSecurityManager(securityManager);
    }
View Full Code Here

TOP

Related Classes of java.rmi.RMISecurityManager

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.