Examples of InvokerLocator


Examples of org.jboss.remoting.InvokerLocator

     
      Thread.sleep(10 * 1000);
     
      Connector serverConnector = new Connector();

      InvokerLocator serverLocator = new InvokerLocator("socket://localhost:9099");

      serverConnector.setInvokerLocator(serverLocator.getLocatorURI());

      serverConnector.create();
     
      serverConnector.setLeasePeriod(5000);
     
      serverConnector.addConnectionListener(new SimpleConnectionListener());

      SimpleServerInvocationHandler invocationHandler = new SimpleServerInvocationHandler();

      serverConnector.addInvocationHandler("JMS", invocationHandler);

      serverConnector.start();

      InvokerLocator serverLocator2 = new InvokerLocator("socket://localhost:9099/forceRemoting=true&leasing=true");
     
      for (int i = 0; i < 500; i++)
      {
         Client cl = new Client(serverLocator2);
        
View Full Code Here

Examples of org.jboss.remoting.InvokerLocator

      //We execute this on it's own client
      Client client;
     
      try
      {
         client = new Client(new InvokerLocator(serverLocatorURI), configuration);
         client.setSubsystem(ServerPeer.REMOTING_JMS_SUBSYSTEM);
         client.connect();
      }
      catch (Exception e)
      {
View Full Code Here

Examples of org.jboss.remoting.InvokerLocator

                                      locatorURI, enablePing, prefetchSize,
                                      defaultTempQueueFullSize, defaultTempQueuePageSize,                                     
                                      defaultTempQueueDownCacheSize, dupsOKBatchSize, clustered,
                                      loadBalancingFactory);
     
         InvokerLocator locator = new InvokerLocator(locatorURI);

         String info = "Connector " + locator.getProtocol() + "://" +
            locator.getHost() + ":" + locator.getPort();
                
         if (enablePing)
         {
            info += " has leasing enabled, lease period " + leasePeriod + " milliseconds";
         }
View Full Code Here

Examples of org.jboss.remoting.InvokerLocator

   // Constructors ---------------------------------------------------------------------------------

   public JMSRemotingConnection(String serverLocatorURI, boolean clientPing) throws Throwable
   {
      serverLocator = new InvokerLocator(serverLocatorURI);
      this.clientPing = clientPing;

      log.debug(this + " created");
   }
View Full Code Here

Examples of org.jboss.remoting.InvokerLocator

      }


      log.debug("Using locator uri: " + locatorURI);

      InvokerLocator locator = new InvokerLocator(locatorURI);

      log.debug("Started remoting connector on uri:" + locator.getLocatorURI());

      mbean = new RemotingJMXWrapper(locator);
      mbeanServer.registerMBean(mbean, objectName);
      mbeanServer.invoke(objectName, "start", new Object[0], new String[0]);
View Full Code Here

Examples of org.jboss.remoting.InvokerLocator

   public void testInvokerThreadSafety() throws Exception
   {
      Connector serverConnector = new Connector();

      InvokerLocator serverLocator = new InvokerLocator("socket://localhost:9099");

      serverConnector.setInvokerLocator(serverLocator.getLocatorURI());

      serverConnector.create();

      SimpleServerInvocationHandler invocationHandler = new SimpleServerInvocationHandler();
View Full Code Here

Examples of org.jboss.remoting.InvokerLocator

      ServerManagement.start(0, "remoting", sao, true, false);

      String s = (String)ServerManagement.
         getAttribute(ServiceContainer.REMOTING_OBJECT_NAME, "InvokerLocator");

      serverLocator = new InvokerLocator(s);

      log.debug("setup done");
   }
View Full Code Here

Examples of org.jboss.remoting.InvokerLocator

         JMSRemotingConnection remotingConnection = delegate.getRemotingConnection();
         Client client = remotingConnection.getRemotingClient();

         Field field = JMSRemotingConnection.class.getDeclaredField("serverLocator");
         field.setAccessible(true);
         InvokerLocator locator = (InvokerLocator)field.get(remotingConnection);
         String transport = locator.getProtocol();

         if (!"http".equals(transport))
         {
            // not interesting
            return;
View Full Code Here

Examples of org.jboss.remoting.InvokerLocator

         JMSRemotingConnection remotingConnection = delegate.getRemotingConnection();
         Client client = remotingConnection.getRemotingClient();

         Field field = JMSRemotingConnection.class.getDeclaredField("serverLocator");
         field.setAccessible(true);
         InvokerLocator locator = (InvokerLocator)field.get(remotingConnection);
         String transport = locator.getProtocol();

         if ("socket".equals(transport)
               || "sslsocket".equals(transport)
               || "bisocket".equals(transport)
               || "sslbisocket".equals(transport))
         {
            field = Client.class.getDeclaredField("callbackConnectors");
            field.setAccessible(true);
            Map callbackConnectors = (Map)field.get(client);

            InvokerCallbackHandler callbackHandler = remotingConnection.getCallbackManager();
            Connector connector = (Connector)callbackConnectors.get(callbackHandler);
            locator = new InvokerLocator(connector.getInvokerLocator());
            assertEquals(address, locator.getHost());
            assertEquals(freePort, locator.getPort());
         }
         else if ("http".equals(transport))
         {
            field = Client.class.getDeclaredField("callbackPollers");
            field.setAccessible(true);
View Full Code Here

Examples of org.jboss.remoting.InvokerLocator

      ServerManagement.start(0, "remoting", null, true, false);

      String s = (String)ServerManagement.
         getAttribute(ServiceContainer.REMOTING_OBJECT_NAME, "InvokerLocator");

      serverLocator = new InvokerLocator(s);

   }
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.