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(indexName);
    RemoteSearchable impl = new RemoteSearchable(local);
     
View Full Code Here


        return tCreated;
    }

    private TransactionManager findTransactionManager(String uri) throws IOException, ClassNotFoundException {
        if (System.getSecurityManager() == null) {
            System.setSecurityManager(new RMISecurityManager());
        }

        // Creating service template to find transaction manager service by matching fields.
        Class<?>[] classes = new Class<?>[] {net.jini.core.transaction.server.TransactionManager.class};
        // Name sn = new Name("*");
 
View Full Code Here

    }
   
    public static JavaSpace findSpace(String url, String spaceName) throws Exception {

        if (System.getSecurityManager() == null) {
            System.setSecurityManager(new RMISecurityManager());
        }

        Class<?>[] classes = new Class<?>[] {net.jini.space.JavaSpace.class};
        Name sn = new Name(spaceName);
        ServiceTemplate tmpl = new ServiceTemplate(null/* serviceID */, classes, new Entry[] {sn});
View Full Code Here

    }
   
    public static JavaSpace findSpace(String url, String spaceName) throws Exception {

        if (System.getSecurityManager() == null) {
            System.setSecurityManager(new RMISecurityManager());
        }

        Class<?>[] classes = new Class<?>[] {net.jini.space.JavaSpace.class};
        Name sn = new Name(spaceName);
        ServiceTemplate tmpl = new ServiceTemplate(null/* serviceID */, classes, new Entry[] {sn});
View Full Code Here

        return tCreated;
    }

    private TransactionManager findTransactionManager(String uri) throws IOException, ClassNotFoundException {
        if (System.getSecurityManager() == null) {
            System.setSecurityManager(new RMISecurityManager());
        }

        // Creating service template to find transaction manager service by matching fields.
        Class<?>[] classes = new Class<?>[] {net.jini.core.transaction.server.TransactionManager.class};
        // Name sn = new Name("*");
 
View Full Code Here

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

     * Install the RMISecurityManager if not already installed.
     */
    public static void setupRMISecurityManager() {
        final SecurityManager origSecurityManager = System.getSecurityManager();
        if (origSecurityManager == null) {
            System.setSecurityManager(new RMISecurityManager());
        } else if (origSecurityManager.getClass().getName().indexOf("JavaWebStart") > -1) {
            // do nothing, we're running under webstart
        } else if (!(origSecurityManager instanceof RMISecurityManager)) {
            final String msg = "Unexpected Security Manager. origSecurityManager: "
                    + origSecurityManager;
View Full Code Here

     *
     * @throws  Exception
     *          If some error occurs.
     */
    public void testBasic() throws Exception {
        System.setSecurityManager(new RMISecurityManager());

        // Create registry.
        int port = CUSTOM_PORT_1;
        Registry reg = LocateRegistry.createRegistry(port);
        System.out.println("Registry on CUSTOM port ("
View Full Code Here

     * @throws  Exception
     *          If some error occurs.
     */
    public void testDetailed() throws Exception {
        try {
            System.setSecurityManager(new RMISecurityManager());

            String localHost = InetAddress.getLocalHost().getHostName();

            // Create registry.
            int port = REGISTRY_PORT;
View Full Code Here

     *          If some error occurs.
     */
    private void runTestSingle(int config) throws Exception {
        try {
            System.err.println("Test server started.");
            System.setSecurityManager(new RMISecurityManager());
            setEnvironmentForConfig(config);
            initServer();
            mainTestBody();
            System.err.println("Test server complete.");
            SubProcess.tellOut();
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.