public org.omg.CORBA.Object resolve(NameComponent[] nc) throws NotFound, CannotProceed, InvalidName { if (this.destroyed) throw new CannotProceed(); if (nc == null || nc.length == 0) throw new InvalidName(); Name n = new Name(nc[0]); if (nc.length > 1) { org.omg.CORBA.Object next_context = (org.omg.CORBA.Object) this.contexts.get(n); if ((next_context == null) || (isDead(next_context))) throw new NotFound(NotFoundReason.missing_node, nc); NameComponent[] nc_prime = new NameComponent[nc.length - 1]; System.arraycopy(nc, 1, nc_prime, 0, nc_prime.length); // try first to call the context implementation object directly. String contextOID = this.getObjectOID(next_context); CorbaNamingContext jbossContext = (contextOID == null ? null : contextImpls.get(contextOID)); if (jbossContext != null) return jbossContext.resolve(nc_prime); else return NamingContextExtHelper.narrow(next_context).resolve(nc_prime); } else { org.omg.CORBA.Object result = (org.omg.CORBA.Object) this.contexts.get(n); if (result == null) result = (org.omg.CORBA.Object) this.names.get(n); if (result == null) throw new NotFound(NotFoundReason.missing_node, n.components()); if (!noPing && isDead(result)) throw new NotFound(NotFoundReason.missing_node, n.components()); return result; } }
public TransactionCurrentImpl(ORB orb, int slot_id) { this.orb = orb; this.slot_id = slot_id; logger = orb.getConfiguration().getLogger("org.jacorb.tx_service.current"); contexts = new Hashtable(); timeouts = new Hashtable(); try { NamingContextExt nc = NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService")); NameComponent [] name = new NameComponent[1]; name[0] = new NameComponent( "TransactionService", "service"); factory = TransactionFactoryHelper.narrow(nc.resolve(name)); } catch (Exception e) { if (logger.isErrorEnabled()) logger.error("Unable to obtain Transaction Service reference. Giving up.", e ); throw new Error(e.getMessage()); } }
public ThreadSubscriber( org.omg.CORBA.ORB orb , org.omg.PortableServer.POA poa ) { ecs = null; ca = null; pushConsumer = null; pps = null; references_domaines_participant = new Vector(); all_Sub = new Vector(); try { this.orb = orb; this.poa = poa; NamingContextExt nc = NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService")); ecs = EventChannelHelper.narrow(nc.resolve(nc.to_name("eventchannel"))); } catch(Exception e) { e.printStackTrace(); } ca = ecs.for_consumers(); pps = ca.obtain_push_supplier(); }
public org.omg.CORBA.Object resolve(NameComponent[] nc) throws NotFound, CannotProceed, InvalidName { if (this.destroyed) throw new CannotProceed(); if (nc == null || nc.length == 0) throw new InvalidName(); Name n = new Name(nc[0]); if (nc.length > 1) { org.omg.CORBA.Object next_context = (org.omg.CORBA.Object) this.contexts.get(n); if ((next_context == null) || (isDead(next_context))) throw new NotFound(NotFoundReason.missing_node, nc); NameComponent[] nc_prime = new NameComponent[nc.length - 1]; System.arraycopy(nc, 1, nc_prime, 0, nc_prime.length); // try first to call the context implementation object directly. String contextOID = this.getObjectOID(next_context); CorbaNamingContext jbossContext = (contextOID == null ? null : contextImpls.get(contextOID)); if (jbossContext != null) return jbossContext.resolve(nc_prime); else return NamingContextExtHelper.narrow(next_context).resolve(nc_prime); } else { org.omg.CORBA.Object result = (org.omg.CORBA.Object) this.contexts.get(n); if (result == null) result = (org.omg.CORBA.Object) this.names.get(n); if (result == null) throw new NotFound(NotFoundReason.missing_node, n.components()); if (!noPing && isDead(result)) throw new NotFound(NotFoundReason.missing_node, n.components()); return result; } }
public Supplier( org.omg.CORBA.ORB orb , org.omg.PortableServer.POA poa ) { e = null; this.orb = orb; this.poa = poa ; try { NamingContextExt nc =NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService")); e = EventChannelHelper.narrow(nc.resolve( nc.to_name("eventchannel"))); supplierAdmin = e.for_suppliers(); proxyPushConsumer = supplierAdmin.obtain_push_consumer(); proxyPushConsumer.connect_push_supplier( _this(orb) ); } catch(Exception ex) { ex.printStackTrace(); } }
public org.omg.CORBA.Object resolve(NameComponent[] nc) throws NotFound, CannotProceed, InvalidName { if (this.destroyed) throw new CannotProceed(); if (nc == null || nc.length == 0) throw new InvalidName(); Name n = new Name(nc[0]); if (nc.length > 1) { org.omg.CORBA.Object next_context = (org.omg.CORBA.Object) this.contexts.get(n); if ((next_context == null) || (isDead(next_context))) throw new NotFound(NotFoundReason.missing_node, nc); NameComponent[] nc_prime = new NameComponent[nc.length - 1]; System.arraycopy(nc, 1, nc_prime, 0, nc_prime.length); // try first to call the context implementation object directly. String contextOID = this.getObjectOID(next_context); CorbaNamingContext jbossContext = (contextOID == null ? null : contextImpls.get(contextOID)); if (jbossContext != null) return jbossContext.resolve(nc_prime); else return NamingContextExtHelper.narrow(next_context).resolve(nc_prime); } else { org.omg.CORBA.Object result = (org.omg.CORBA.Object) this.contexts.get(n); if (result == null) result = (org.omg.CORBA.Object) this.names.get(n); if (result == null) throw new NotFound(NotFoundReason.missing_node, n.components()); if (!noPing && isDead(result)) throw new NotFound(NotFoundReason.missing_node, n.components()); return result; } }
nc_prime[i-1] = nc[i]; return next_context.resolve(nc_prime);
nc.resolve( nc.to_name("tracing.service")));