Package java.rmi

Examples of java.rmi.RMISecurityManager


      return;
    }
   
    // create and install a security manager
    if (System.getSecurityManager() == null) {
      System.setSecurityManager(new RMISecurityManager());
    }
   
    Searchable local = new IndexSearcher(FSDirectory.open(new File(indexName)), true);
    RemoteSearchable impl = new RemoteSearchable(local);
     
View Full Code Here


    public Window getMainWindow() {
      System.setProperty("java.security.policy",
          "./ressources/security.txt");
      // Create and install a security manager
      if (System.getSecurityManager() == null) {
        System.setSecurityManager(new RMISecurityManager());
      }

      try {
        // Set cross-platform Java L&F (also called "Metal")
        UIManager.setLookAndFeel(UIManager
View Full Code Here

  public static void main(String[] args) {
    // Log.TRACE();
    System.setProperty("java.security.policy", "./ressources/security.txt");
    // Create and install a security manager
    if (System.getSecurityManager() == null) {
      System.setSecurityManager(new RMISecurityManager());
    }

    // Initialize log4j
    DOMConfigurator.configure("./ressources/log/log4j.xml");
View Full Code Here

  private ResourceBundle bundle =
      Util.getResourceBundle(CheckPersistence.class);

  public Object run(String[] args) {
      System.setSecurityManager(new RMISecurityManager());
      String dir = args[0];
      File dirFile = new File(dir);
      if (!dirFile.exists()) {
    return null; // the OK value
      }
View Full Code Here

        // output the name of this test
        logger.log(Level.FINE, "Test Name = " + this.getClass().getName());

        // set security manager
        System.setSecurityManager(new RMISecurityManager());
    }
View Full Code Here

    public JavaSpace getSpace() throws TestException {
        JavaSpace js = null;

        try {
            if (System.getSecurityManager() == null) {
                System.setSecurityManager(new RMISecurityManager());
            }
            printSpaceInfo();
            js = (JavaSpace) manager.startService(spaceName); // prepared
        } catch (Exception e) {
            throw new TestException(
View Full Code Here

     * Utility routine that sets a security manager if one isn't already
     * present.
     */
    synchronized static void ensureSecurityManager() {
        if (System.getSecurityManager() == null) {
            System.setSecurityManager(new RMISecurityManager());
        }
    }
View Full Code Here

     */
    public static int createRegistry( int port )
        throws RemoteException
    {
        log.debug( "createRegistry> setting security manager" );
        System.setSecurityManager( new RMISecurityManager() );
        if ( port < 1024 )
        {
            port = Registry.REGISTRY_PORT;
        }
        log.debug( "createRegistry> creating registry" );
View Full Code Here

     *          is installed and prohibits installing a new security manager.
     */
    protected void installSecurityManager() throws NoPermissionException {
        if (! (System.getSecurityManager() instanceof RMISecurityManager)) {
            try {
                System.setSecurityManager(new RMISecurityManager());
            } catch (SecurityException e) {
                // jndi.84=Cannot install RMISecurityManager
                throw (NoPermissionException) new NoPermissionException(
                        Messages.getString("jndi.84")).initCause(e); //$NON-NLS-1$
            }
View Full Code Here

  /** Exports a searcher for the index in args[0] named
   * "//localhost/Searchable". */
  public static void main(String args[]) throws Exception {
    // create and install a security manager
    if (System.getSecurityManager() == null) {
      System.setSecurityManager(new RMISecurityManager());
    }
   
    Searchable local = new IndexSearcher(args[0]);
    RemoteSearchable impl = new RemoteSearchable(local);
     
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.