use of org.omg.CORBA.ORBPackage.InvalidName in project alliance by codice.
the class StandingQueryMgrImplTest method setUp.
@Before
public void setUp() throws Exception {
setupCommonMocks();
setupStandingQueryMgrMocks();
try {
setupOrb();
orbRunThread = new Thread(() -> orb.run());
orbRunThread.start();
} catch (InvalidName | AdapterInactive | WrongPolicy | ServantNotActive e) {
LOGGER.error("Unable to start the CORBA server", e);
} catch (IOException e) {
LOGGER.error("Unable to generate the IOR file", e);
} catch (SecurityServiceException e) {
LOGGER.error("Unable to setup guest security credentials", e);
}
String managerId = UUID.randomUUID().toString();
standingQueryMgr = new StandingQueryMgrImpl(null);
standingQueryMgr.setFilterBuilder(new GeotoolsFilterBuilder());
standingQueryMgr.setCatalogFramework(mockCatalogFramework);
standingQueryMgr.setDefaultUpdateFrequencyMsec(60000);
standingQueryMgr.setMaxWaitToStartTimeMsecs(TimeUnit.MINUTES.toMillis(5));
standingQueryMgr.setMaxPendingResults(10000);
if (!CorbaUtils.isIdActive(rootPOA, managerId.getBytes(Charset.forName(NsiliEndpoint.ENCODING)))) {
try {
rootPOA.activate_object_with_id(managerId.getBytes(Charset.forName(NsiliEndpoint.ENCODING)), standingQueryMgr);
} catch (ServantAlreadyActive | ObjectAlreadyActive | WrongPolicy e) {
LOGGER.error("Error activating StandingQueryMgr: {}", e);
}
}
rootPOA.create_reference_with_id(managerId.getBytes(Charset.forName(NsiliEndpoint.ENCODING)), StandingQueryMgrHelper.id());
}
use of org.omg.CORBA.ORBPackage.InvalidName in project Payara by payara.
the class IiopFolbGmsClient method setORB.
public void setORB(ORB orb) {
try {
orb.register_initial_reference(ORBConstants.FOLB_SERVER_GROUP_INFO_SERVICE, (org.omg.CORBA.Object) gis);
fineLog(".initGIS: naming registration complete: {0}", gis);
// Just for logging
GroupInfoService gisRef = (GroupInfoService) orb.resolve_initial_references(ORBConstants.FOLB_SERVER_GROUP_INFO_SERVICE);
List<ClusterInstanceInfo> lcii = gisRef.getClusterInstanceInfo(null);
fineLog("Results from getClusterInstanceInfo:");
if (lcii != null) {
for (ClusterInstanceInfo cii : lcii) {
fineLog(cii.toString());
}
}
} catch (InvalidName e) {
fineLog(".initGIS: registering GIS failed: {0}", e);
}
}
use of org.omg.CORBA.ORBPackage.InvalidName in project Payara by payara.
the class NamingClusterInfoImpl method initGroupInfoService.
@Override
public void initGroupInfoService(Hashtable<?, ?> myEnv, String defaultHost, String defaultPort, ORB orb, ServiceLocator services, boolean updateCluster) {
// Always create one rrPolicy to be shared, if needed.
final List<String> epList = getEndpointList(myEnv, defaultHost, defaultPort);
rrPolicy = new RoundRobinPolicy(epList);
if (updateCluster) {
GroupInfoService gis = null;
try {
gis = (GroupInfoService) (orb.resolve_initial_references(ORBLocator.FOLB_CLIENT_GROUP_INFO_SERVICE));
} catch (InvalidName ex) {
logger.log(Level.SEVERE, FAILED_TO_RESOLVE_GROUPINFOSERVICE, ORBLocator.FOLB_CLIENT_GROUP_INFO_SERVICE);
logger.log(Level.SEVERE, "", ex);
}
giso = new GroupInfoServiceObserverImpl(gis, rrPolicy);
gis.addObserver(giso);
}
// this should force the initialization of the resources providers
if (services != null) {
for (ServiceHandle<?> provider : services.getAllServiceHandles(NamingObjectsProvider.class)) {
provider.getService();
// no - op. Do nothing with the provided object
}
// endpoints.
if (updateCluster) {
giso.forceMembershipChange();
}
}
if (logger.isLoggable(Level.FINE))
logger.log(Level.FINE, "NamingClusterInfoImpl.initGroupInfoService RoundRobinPolicy {0}", rrPolicy);
}
Aggregations