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();
}
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);
}
}
}
}
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;
}
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));
}
}
Aggregations