Search in sources :

Example 26 with IiopListener

use of org.glassfish.orb.admin.config.IiopListener in project Payara by payara.

the class CreateIiopListenerTest method testExecuteSuccessNoValueOptionEnabled.

/**
 * Test of execute method, of class CreateIiopListener when enabled has no value
 * asadmin create-iiop-listener --listeneraddress localhost
 * --iiopport 4440 --enable iiop_1
 */
@Test
public void testExecuteSuccessNoValueOptionEnabled() {
    parameters.set("listeneraddress", "localhost");
    parameters.set("iiopport", "4440");
    parameters.set("listener_id", "iiop_1");
    parameters.set("enabled", "");
    CreateIiopListener command = services.getService(CreateIiopListener.class);
    cr.getCommandInvocation("create-iiop-listener", context.getActionReport(), adminSubject()).parameters(parameters).execute(command);
    checkActionReport(context.getActionReport());
    boolean isCreated = false;
    List<IiopListener> listenerList = iiopService.getIiopListener();
    for (IiopListener listener : listenerList) {
        if (listener.getId().equals("iiop_1")) {
            assertEquals("localhost", listener.getAddress());
            assertEquals("true", listener.getEnabled());
            assertEquals("4440", listener.getPort());
            isCreated = true;
            logger.fine("IIOPListener name iiop_1 is created.");
            break;
        }
    }
    assertTrue(isCreated);
    logger.fine("msg: " + context.getActionReport().getMessage());
}
Also used : IiopListener(org.glassfish.orb.admin.config.IiopListener) Test(org.junit.Test)

Example 27 with IiopListener

use of org.glassfish.orb.admin.config.IiopListener in project Payara by payara.

the class ListIiopListenersTest method setUp.

@Before
public void setUp() {
    services = getHabitat();
    IiopService iiopService = services.getService(IiopService.class);
    parameters = new ParameterMap();
    cr = services.getService(CommandRunner.class);
    context = new AdminCommandContextImpl(LogDomains.getLogger(ListIiopListenersTest.class, LogDomains.ADMIN_LOGGER), new PropsFileActionReporter());
    List<IiopListener> listenerList = iiopService.getIiopListener();
    origNum = listenerList.size();
}
Also used : IiopListener(org.glassfish.orb.admin.config.IiopListener) AdminCommandContextImpl(org.glassfish.api.admin.AdminCommandContextImpl) IiopService(org.glassfish.orb.admin.config.IiopService) ParameterMap(org.glassfish.api.admin.ParameterMap) PropsFileActionReporter(com.sun.enterprise.admin.report.PropsFileActionReporter) CommandRunner(org.glassfish.api.admin.CommandRunner) Before(org.junit.Before)

Example 28 with IiopListener

use of org.glassfish.orb.admin.config.IiopListener in project Payara by payara.

the class ORBConnectorStartup method initializeLazyListener.

/**
 * Start Grizzly based ORB lazy listener, which is going to initialize
 * ORB container on first request.
 */
private void initializeLazyListener() {
    final IiopService iiopService = config.getExtensionByType(IiopService.class);
    if (iiopService != null) {
        List<IiopListener> iiopListenerList = iiopService.getIiopListener();
        for (IiopListener oneListener : iiopListenerList) {
            if (Boolean.valueOf(oneListener.getEnabled()) && Boolean.valueOf(oneListener.getLazyInit())) {
                NetworkListener dummy = new DummyNetworkListener();
                dummy.setPort(oneListener.getPort());
                dummy.setAddress(oneListener.getAddress());
                dummy.setProtocol("light-weight-listener");
                dummy.setTransport("tcp");
                dummy.setName("iiop-service");
                grizzlyService.createNetworkProxy(dummy);
            }
        }
    }
}
Also used : IiopListener(org.glassfish.orb.admin.config.IiopListener) DummyNetworkListener(com.sun.enterprise.v3.services.impl.DummyNetworkListener) IiopService(org.glassfish.orb.admin.config.IiopService) DummyNetworkListener(com.sun.enterprise.v3.services.impl.DummyNetworkListener) NetworkListener(org.glassfish.grizzly.config.dom.NetworkListener)

Aggregations

IiopListener (org.glassfish.orb.admin.config.IiopListener)28 IiopService (org.glassfish.orb.admin.config.IiopService)11 Test (org.junit.Test)7 Config (com.sun.enterprise.config.serverbeans.Config)5 PropertyVetoException (java.beans.PropertyVetoException)5 Ssl (org.glassfish.grizzly.config.dom.Ssl)5 TransactionFailure (org.jvnet.hk2.config.TransactionFailure)5 ParameterMap (org.glassfish.api.admin.ParameterMap)4 ActionReport (org.glassfish.api.ActionReport)3 CommandTarget (org.glassfish.config.support.CommandTarget)3 Protocol (org.glassfish.grizzly.config.dom.Protocol)3 Target (org.glassfish.internal.api.Target)3 MasterPasswordImpl (com.sun.enterprise.security.ssl.impl.MasterPasswordImpl)2 File (java.io.File)2 List (java.util.List)2 TransientNameService (com.sun.corba.ee.impl.naming.cosnaming.TransientNameService)1 ClusterInstanceInfo (com.sun.corba.ee.spi.folb.ClusterInstanceInfo)1 SocketInfo (com.sun.corba.ee.spi.folb.SocketInfo)1 NoSuchWorkQueueException (com.sun.corba.ee.spi.threadpool.NoSuchWorkQueueException)1 ThreadPool (com.sun.corba.ee.spi.threadpool.ThreadPool)1