Examples of NamingService


Examples of mx4j.tools.naming.NamingService

      MBeanServer server = MBeanServerFactory.createMBeanServer("remote.notification.example");
      // Register the connector server as MBean
      server.registerMBean(cntorServer, cntorServerName);

      // The rmiregistry needed to bind the RMI stub
      NamingService naming = new NamingService();
      ObjectName namingName = ObjectName.getInstance(":service=" + NamingService.class.getName());
      server.registerMBean(naming, namingName);
      naming.start();

      // Start the connector server
      cntorServer.start();

      System.out.println("Server up and running");
View Full Code Here

Examples of mx4j.tools.naming.NamingService

      ObjectName cntorServerName = ObjectName.getInstance(":service=" + JMXConnectorServer.class.getName() + ",protocol=" + url.getProtocol());
      MBeanServer server = MBeanServerFactory.createMBeanServer("remote.security.example");
      server.registerMBean(cntorServer, cntorServerName);

      // Setup the rmiregistry to bind in JNDI the RMIConnectorServer stub.
      NamingService naming = new NamingService();
      ObjectName namingName = ObjectName.getInstance(":service=" + NamingService.class.getName());
      server.registerMBean(naming, namingName);
      naming.start();

      // Setup the interception
      SubjectTrackingMBeanServer interceptor = new SubjectTrackingMBeanServer();
      cntorServer.setMBeanServerForwarder(interceptor);
View Full Code Here

Examples of mx4j.tools.naming.NamingService

      ObjectName cntorServerName = ObjectName.getInstance(":service=" + JMXConnectorServer.class.getName() + ",protocol=" + url.getProtocol());
      MBeanServer server = MBeanServerFactory.createMBeanServer("remote.security.example");
      server.registerMBean(cntorServer, cntorServerName);

      // Setup the rmiregistry to bind in JNDI the RMIConnectorServer stub.
      NamingService naming = new NamingService();
      ObjectName namingName = ObjectName.getInstance(":service=" + NamingService.class.getName());
      server.registerMBean(naming, namingName);
      naming.start();

      // Start the connector server
      cntorServer.start();

      System.out.println("Server up and running");
View Full Code Here

Examples of mx4j.tools.naming.NamingService

      super(s);
   }

   public void startNaming() throws Exception
   {
      naming = new NamingService(getNamingPort());
      naming.start();
   }
View Full Code Here

Examples of mx4j.tools.naming.NamingService

      return new JMXServiceURL("rmi", "localhost", 0);
   }

   public void startNaming() throws Exception
   {
      naming = new NamingService(getNamingPort());
      naming.start();
   }
View Full Code Here

Examples of mx4j.tools.naming.NamingService

    private void registerConnectorServer(MBeanServer server) throws Exception {
        if (useConnectorServer()) {
            // Create and start the naming service
            ObjectName naming = new ObjectName("Naming:type=rmiregistry");
            rmiRegistry = new NamingService(connectorServerPort);
            server.registerMBean(rmiRegistry, naming);

            JMXServiceURL address = new JMXServiceURL("rmi", "localhost", 0, JNDI_NAME);

            Map environment = new HashMap();
View Full Code Here

Examples of org.apache.naming.NamingService

  
   public TestJmsAdmin(String name) throws Exception {
      super(name);
      XMLUnit.setIgnoreWhitespace(true);
      try {
         this.namingService = new NamingService();
         this.namingService.start();
      }
      catch (Exception ex) {
         ex.printStackTrace();
         assertTrue("exception in constructor when starting naming service", false);
View Full Code Here

Examples of org.apache.naming.NamingService

            else if (args[i].equalsIgnoreCase("-fillNames")) {
               fillNames = (new Boolean(args[++i])).booleanValue();
            }
         }

         NamingService namingService = null;
         if (startNamingService) {
            namingService = new NamingService();
            namingService.start();
            System.out.println("Started an ebedded naming service.");
         }

         Hashtable properties = new Hashtable();
         if (factory != null) {
            properties.put("java.naming.factory.initial", factory);
            System.out.println("Forcing java.naming.factory.initial=" + factory);
         }
         else {
            System.out.println("Using System.getProperty(java.naming.factory.initial)=" + System.getProperty("java.naming.factory.initial"));
         }
        
         InitialContext context = new InitialContext(properties);
         if (fillNames) {
            context.bind("first", new String("first"));
            context.bind("second", new String("first"));
            context.bind("third", new String("first"));
            context.createSubcontext("dir1");
            context.createSubcontext("dir2");
            context.createSubcontext("dir3");
            context.bind("dir1/first", new String("first"));
            context.bind("dir1/second", new String("first"));
            context.bind("dir1/third", new String("first"));
                    
            Context ctx = (Context)context.lookup("dir2");
            ctx.bind("first", new String("first"));
            ctx.bind("second", new String("first"));
            ctx.bind("third", new String("first"));
         }
        
         System.out.println("================JNDI CONTENT START=============");
         JndiDumper.scanContext(null, context, System.out);
         System.out.println("================JNDI CONTENT END  =============");

         if (namingService != null) namingService.stop();
      }
      catch (Exception ex) {
         ex.getMessage();
         ex.printStackTrace();
      }
View Full Code Here

Examples of org.apache.naming.NamingService

  
   public TestJmsSubscribe(String name) {
      super(name);
      try {
         this.namingService = new NamingService();
         this.namingService.start();
      }
      catch (Exception ex) {
         ex.printStackTrace();
         assertTrue("exception in constructor when starting naming service", false);
View Full Code Here

Examples of org.jboss.as.naming.service.NamingService

        final ServiceBasedNamingStore namingStore = new WritableServiceBasedNamingStore(context.getServiceRegistry(false), ContextNames.JAVA_CONTEXT_SERVICE_NAME);

        // Create the Naming Service
        final ServiceTarget target = context.getServiceTarget();
        newControllers.add(target.addService(NamingService.SERVICE_NAME, new NamingService(namingStore))
                .addAliases(ContextNames.JAVA_CONTEXT_SERVICE_NAME)
                .setInitialMode(ServiceController.Mode.ACTIVE)
                .addListener(verificationHandler)
                .install());
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.