sending_exception = orb.create_any();
private Delegate(ORB orb, boolean parseIORLazy) { this(orb, orb.getConfiguration(), parseIORLazy); }
/** * Creates a new instance of GOA * * @param orb * @param name * @param parent * @param manager * @param policies */ public GOA (ORB orb, String name, org.jacorb.poa.POA parent, POAManager manager, Policy[] policies) { super (orb, name, parent, manager, policies); Factories f = orb.getTransportManager ().getFactories (TAG_UIPMC.value); logger = orb.getConfiguration ().getLogger("org.jacorb.poa"); if ( f != null) { listener = (MIOPListener)f.create_listener ((ProtocolProperties)null, 0, (short)0); agm = new AGM(); portTable = new HashMap<byte[], MIOPProfile> (); } }
protected BiDirConnectionServerInterceptor( ORB orb ) { super(); this.orb = orb; this.logger = orb.getConfiguration().getLogger("org.jacorb.giop.bidir.interceptor"); conn_mg = orb.getClientConnectionManager(); }
private void removeContext(Thread current) { //remove control from Hashtable contexts.remove(current); try { org.omg.PortableInterceptor.Current pi_current = (org.omg.PortableInterceptor.Current)orb.resolve_initial_references("PICurrent"); //remove control from PICurrent by overwriting it with //an empty any Any empty = orb.create_any(); pi_current.set_slot(slot_id, empty); } catch (Exception e) { if (logger.isDebugEnabled()) logger.debug("Exception: ", e); } } } // TransactionCurrentImpl
private static final NamedValue createVoidResultValue(ORB orb) { Any any = orb.create_any(); any.type(orb.get_primitive_tc(TCKind.tk_void)); org.jacorb.orb.NamedValue namedValue = new org.jacorb.orb.NamedValue(1); namedValue.set_value(any); return namedValue; }
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()); } }
logger = orb.getConfiguration().getLogger("org.jacorb.orb.interceptors"); this.received_exception = orb.create_any(); this.target = orb._getDelegate(piorOriginal); this.current = orb.getInterceptorManager().getCurrent(); logger = orb.getConfiguration().getLogger("org.jacorb.orb.interceptors"); this.received_exception = orb.create_any(); this.sync_scope = sync_scope; this.target = orb._getDelegate (piorOriginal); this.invocationContext = invocationContext; InterceptorManager manager = orb.getInterceptorManager();
private ProfileSelector getProfileSelector() { if (profileSelector == null) { return orb.getTransportManager().getProfileSelector (); } return profileSelector; } }
orb.notifyTransportListeners(request.getConnection()); if (orb.hasServerRequestInterceptors()) servant); InterceptorManager manager = orb.getInterceptorManager(); info.setCurrent(manager.getEmptyCurrent()); orb.set_delegate(servant); orb.getInterceptorManager(); info.setCurrent(manager.getCurrent()); Any sendingException = orb.create_any(); SystemExceptionHelper.insert(sendingException, new org.omg.CORBA.UNKNOWN("Stream-based UserExceptions are not available!")); Any sendingException = orb.create_any(); SystemExceptionHelper.insert(sendingException, request.getSystemException()); info.sending_exception(sendingException);
private static Admin getAdmin() { Admin _admin = null; try { _admin = AdminHelper.narrow( m_orb.resolve_initial_references("ImplementationRepository")); } catch( org.omg.CORBA.ORBPackage.InvalidName in ) { if (logger.isWarnEnabled()) logger.warn("Could not contact Impl. Repository!"); } if (_admin == null) { System.out.println("Unable to connect to repository process!"); System.exit(-1); } return _admin; }
/** * This function setup all informations that will be needed later */ private void setImRInfo () { try { org.omg.CORBA.Object ref = this.orb_.resolve_initial_references("ImplRepoService"); this.pior = new ParsedIOR(this.orb_, this.orb_.object_to_string (ref)); this.corbaloc = CorbaLoc.generateCorbalocForMultiIIOPProfiles (this.orb_, ref); this.profile = (IIOPProfile) this.pior.getEffectiveProfile(); } catch (org.omg.CORBA.ORBPackage.InvalidName e) { throw new INTERNAL ("ImRAccessImpl.setImRInfo: unable to resolve TAO ImplRepoService: " + e.toString()); } }
public CodeSetInfoInterceptor(ORB orb) throws ConfigurationException { super(); configure(orb.getConfiguration()); // encapsulate it into TaggedComponent final CDROutputStream out = new CDROutputStream( orb ); try { out.beginEncapsulatedArray(); CodeSetComponentInfoHelper.write( out, orb.getLocalCodeSetComponentInfo() ); tagc = new TaggedComponent(TAG_CODE_SETS.value, out.getBufferCopy()); } finally { out.close(); } }
/** * The resulting any must be used to create an input stream from * which the result value can be read. */ public org.omg.CORBA.Any result() { if( isStreamBased ) { org.omg.CORBA.Any any = orb.create_any(); // create the output stream for the result CDROutputStream _out = ((CDROutputStream)any.create_output_stream()); // get a copy of the content of this reply byte[] result_buf = orb.getBufferManager().getBuffer( out.size() - out.getBodyBegin()); System.arraycopy( out.getBufferCopy(), out.getBodyBegin(), result_buf, 0, result_buf.length ); // ... and insert it _out.setBuffer( result_buf ); // important: set the _out buffer's position to the end of the contents! _out.skip( result_buf.length ); return any; } return result; }
return; BasicAdapter ba = orb.getBasicAdapter(); org.omg.CORBA.Any any = orb.create_any(); BiDirIIOPServiceContextHelper.insert( any, context );
work_pending(); org.omg.CORBA.Any any = create_any (); any.type (param.type); switch (param.mode.value())
InterceptorManager manager = orb.getInterceptorManager(); info.setCurrent (manager.getCurrent()); any = orb.create_any (); any.read_value (e.getInputStream (), typeCode); env.exception (new org.omg.CORBA.UnknownUserException (any));
Configuration config = orb.getConfiguration(); this.logger = config.getLogger("org.jacorb.org.giop"); this.cachePoaNames = config.getAttributeAsBoolean("jacorb.cachePoaNames", false); object_key = orb.mapObjectKey(org.jacorb.orb.ParsedIOR.extractObjectKey(inStream.req_hdr.target, orb)); oid = org.jacorb.poa.util.POAUtil.extractOID( object_key );
/** * Initialization method, called from within the super class * org.omg.CORBA.ORB */ @Override protected void set_parameters(java.applet.Applet app, java.util.Properties props) { String id = ""; if( props != null ) { id = props.getProperty("ORBid", ""); } try { configure( org.jacorb.config.JacORBConfiguration.getConfiguration(props, this, id, true)); //applet support } catch ( ConfigurationException e ) { logger.error("configuration exception during configure", e); throw new org.omg.CORBA.INITIALIZE( e.toString() ); } orb_id = id; internalInit(); }
@Override public org.omg.CORBA.Object string_to_object (String str) { work_pending(); if (str == null) { return null; } try { ParsedIOR pior = new ParsedIOR( this, str ); if ( pior.isNull() ) { return null; } return _getDelegate(pior); } catch (Exception e) { logger.error("Exception while converting string to object", e); throw new BAD_PARAM(10, CompletionStatus.COMPLETED_NO); } }