Search in sources :

Example 21 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.v3.common.PropsFileActionReporter) CommandRunner(org.glassfish.api.admin.CommandRunner) Before(org.junit.Before)

Example 22 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)

Example 23 with IiopListener

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

the class GlassFishORBManager method checkORBInitialHost.

private String checkORBInitialHost(Properties props) {
    // Host setting in system properties always takes precedence.
    String initialHost = System.getProperty(ORBConstants.INITIAL_HOST_PROPERTY);
    if (initialHost == null) {
        initialHost = props.getProperty(ORBConstants.INITIAL_HOST_PROPERTY);
    }
    if (initialHost == null) {
        IiopListener il = getClearTextIiopListener();
        if (il != null) {
            initialHost = il.getAddress();
        }
    }
    if (initialHost == null) {
        initialHost = DEFAULT_ORB_INIT_HOST;
    }
    initialHost = checkForAddrAny(props, initialHost);
    props.setProperty(ORBConstants.INITIAL_HOST_PROPERTY, initialHost);
    if (logger.isLoggable(Level.FINE)) {
        logger.log(Level.FINE, "Setting orb initial host to {0}", initialHost);
    }
    return initialHost;
}
Also used : IiopListener(org.glassfish.orb.admin.config.IiopListener)

Example 24 with IiopListener

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

the class GlassFishORBManager method initProperties.

private void initProperties() {
    fineLog("GlassFishORBManager: initProperties: processType {0}", processType);
    if (processType != ProcessType.ACC) {
        String sslClientRequired = System.getProperty(ORB_SSL_STANDALONE_CLIENT_REQUIRED);
        if (sslClientRequired != null && sslClientRequired.equals("true")) {
            csiv2Props.put(GlassFishORBHelper.ORB_SSL_CLIENT_REQUIRED, "true");
        }
    }
    if (!processType.isServer()) {
        // No access to domain.xml.  Just init properties.
        // In this case iiopListener beans will be null.
        checkORBInitialPort(EMPTY_PROPERTIES);
    } else {
        iiopService = iiopUtils.getIiopService();
        iiopListeners = iiopService.getIiopListener();
        assert iiopListeners != null;
        // checkORBInitialPort looks at iiopListenerBeans, if present
        checkORBInitialPort(EMPTY_PROPERTIES);
        orbBean = iiopService.getOrb();
        assert (orbBean != null);
        // Initialize IOR security config for non-EJB CORBA objects
        // iiopServiceBean.isClientAuthenticationRequired()));
        csiv2Props.put(GlassFishORBHelper.ORB_CLIENT_AUTH_REQUIRED, String.valueOf(iiopService.getClientAuthenticationRequired()));
        // If there is at least one non-SSL listener, then it means
        // SSL is not required for CORBA objects.
        boolean corbaSSLRequired = true;
        for (IiopListener bean : iiopListeners) {
            if (bean.getSsl() == null) {
                corbaSSLRequired = false;
                break;
            }
        }
        csiv2Props.put(GlassFishORBHelper.ORB_SSL_SERVER_REQUIRED, String.valueOf(corbaSSLRequired));
    }
}
Also used : IiopListener(org.glassfish.orb.admin.config.IiopListener)

Aggregations

IiopListener (org.glassfish.orb.admin.config.IiopListener)24 IiopService (org.glassfish.orb.admin.config.IiopService)9 Test (org.junit.Test)7 PropertyVetoException (java.beans.PropertyVetoException)5 TransactionFailure (org.jvnet.hk2.config.TransactionFailure)5 ParameterMap (org.glassfish.api.admin.ParameterMap)4 Config (com.sun.enterprise.config.serverbeans.Config)3 ActionReport (org.glassfish.api.ActionReport)3 CommandTarget (org.glassfish.config.support.CommandTarget)3 Ssl (org.glassfish.grizzly.config.dom.Ssl)3 Target (org.glassfish.internal.api.Target)3 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 ThreadPoolManager (com.sun.corba.ee.spi.threadpool.ThreadPoolManager)1 Acceptor (com.sun.corba.ee.spi.transport.Acceptor)1 CreateSsl (com.sun.enterprise.admin.commands.CreateSsl)1