namingPOA.servant_to_reference(ns)); final String rootContext = properties.getProperty(Constants.NAMING_ROOT_CONTEXT); ((com.sun.corba.se.impl.orb.ORBImpl) orb).register_initial_reference(rootContext, namingPOA.servant_to_reference(ns));
public org.omg.CORBA.Object corbaReference (Servant obj, POA poa) { try { return poa.servant_to_reference(obj); } catch (Exception e) { return null; } }
public org.omg.CORBA.Object corbaReference (Servant obj, POA poa) { try { return poa.servant_to_reference(obj); } catch (Exception e) { return null; } }
public org.omg.CORBA.Object corbaReference (Servant obj, POA poa) { try { return poa.servant_to_reference(obj); } catch (Exception e) { return null; } }
public SortedRelationFactoryImpl (org.omg.PortableServer.POA poa) { this.poa = poa; try { poa.servant_to_reference (this); } catch (Exception e) { System.out.println ("Internal error: Can not activate factory"); e.printStackTrace (); throw new org.omg.CORBA.INTERNAL (); } }
public SequenceFactoryImpl (org.omg.PortableServer.POA poa) { this.poa = poa; try { poa.servant_to_reference (this); } catch (Exception e) { System.out.println ("Internal error: Can not activate factory"); e.printStackTrace (); throw new org.omg.CORBA.INTERNAL (); } }
/** * Return the consumerAdmin interface */ public ConsumerAdmin for_consumers() { try { return ConsumerAdminHelper.narrow(myPoa.servant_to_reference(this)); } catch( Exception e ) { e.printStackTrace(); return null; } }
/** * Return the supplierAdmin interface */ public SupplierAdmin for_suppliers() { try { return SupplierAdminHelper.narrow(myPoa.servant_to_reference(this)); } catch( Exception e ) { e.printStackTrace(); return null; } }
synchronized LockCoordinator get_lock_coordinator( TransactionalLockSetImpl ls ){ LockCoordinatorImpl lc = (LockCoordinatorImpl)locksets.get( ls ); if( lc == null ){ lc = new LockCoordinatorImpl( this, ls ); locksets.put( ls, lc ); } try { return LockCoordinatorHelper.narrow(poa.servant_to_reference(lc)); } catch ( Exception e ){ e.printStackTrace( System.out ); throw new org.omg.CORBA.INTERNAL(); } };
/** * Rebind an object by using a secure POA (csiv2) * @param name name of the object * @param r remote object to bind * @throws Exception if the object cannot be bound */ private void rebindWithSpecificPoa(final Name name, final Remote r) throws Exception { POA securedPOA = createSecurePOA(name.toString()); org.omg.PortableServer.Servant servant = (org.omg.PortableServer.Servant) Util.getTie(r); securedPOA.activate_object_with_id(name.toString().getBytes(), servant); getWrappedContext().rebind(name, securedPOA.servant_to_reference(servant)); }
/** * Bind an object by using a secure POA (csiv2) * @param name name of the object * @param r remote object to bind * @throws Exception if the object cannot be bound */ private void bindWithSpecificPoa(final Name name, final Remote r) throws Exception { POA securedPOA = createSecurePOA(name.toString()); org.omg.PortableServer.Servant servant = (org.omg.PortableServer.Servant) Util.getTie(r); securedPOA.activate_object_with_id(name.toString().getBytes(), servant); getWrappedContext().bind(name, securedPOA.servant_to_reference(servant)); }
public TransactionalLockSet create_transactional(){ TransactionalLockSetImpl ls = new TransactionalLockSetImpl( this ); try { return TransactionalLockSetHelper.narrow( poa.servant_to_reference( ls ) ); } catch ( Exception e ){ e.printStackTrace( System.out ); throw new org.omg.CORBA.INTERNAL(); } }; /* -------------------------------------------------------------------------- */
public org.omg.CORBA.Object get_reference() throws org.omg.PortableServer.CurrentPackage.NoContext { CurrentState state = (CurrentState) stateKey_.get(Thread .currentThread()); if (state == null || state.poa == null) throw new org.omg.PortableServer.CurrentPackage.NoContext(); try { return state.poa.servant_to_reference(state.servant); } catch (org.omg.PortableServer.POAPackage.WrongPolicy ex) { org.apache.yoko.orb.OB.Assert._OB_assert(ex); } catch (org.omg.PortableServer.POAPackage.ServantNotActive ex) { org.apache.yoko.orb.OB.Assert._OB_assert(ex); } return null; }
public org.omg.CosTransactions.Synchronization getCORBAReference() { if (poa == null) { poa = Configuration.getPOA("transient"/*#Frozen*/); } if (corbaRef == null) { try { poa.activate_object(this); corbaRef = SynchronizationHelper.narrow( poa.servant_to_reference(this)); //corbaRef = (org.omg.CosTransactions.Synchronization) this; } catch (Exception ex) { _logger.log(Level.SEVERE, "jts.unexpected_error_in_getcorbareference",ex); } } return corbaRef; }
public TransactionalLockSet create_transactional_related(TransactionalLockSet which){ TransactionalLockSetImpl ls = new TransactionalLockSetImpl( this ); ls.add_related( which ); try { return TransactionalLockSetHelper.narrow( poa.servant_to_reference( ls ) ); } catch ( Exception e ){ e.printStackTrace( System.out ); throw new org.omg.CORBA.INTERNAL(); } }; /* -------------------------------------------------------------------------- */
public void run (){ try { PushConsumerPOATie pt = new PushConsumerPOATie( this); pt._this_object(orb); pushConsumer = PushConsumerHelper.narrow(poa.servant_to_reference(pt) ); pps.connect_push_consumer( pushConsumer ); System.out.println("PushConsumerImpl registered."); orb.run(); } catch(Exception e) { e.printStackTrace(); } System.out.println("Quit."); }
public synchronized org.omg.CosCollection.Iterator create_iterator(boolean read_only) { PositionalIteratorImpl iter = iterator_factory.create_iterator( this, read_only ); IteratorPOATie servant = new IteratorPOATie( iter ); try { org.omg.CosCollection.Iterator i = IteratorHelper.narrow( poa.servant_to_reference( servant )); iter.set_servant( servant ); return i; } catch ( Exception e ){ e.printStackTrace( System.out ); throw new org.omg.CORBA.INTERNAL(); } }; /* ========================================================================= */
public synchronized OrderedIterator create_ordered_iterator(boolean read_only, boolean reverse_iteration) { PositionalIteratorImpl iter = iterator_factory.create_iterator( this, read_only, reverse_iteration ); IteratorPOATie servant = new IteratorPOATie( iter ); try { OrderedIterator i = OrderedIteratorHelper.narrow( poa.servant_to_reference( servant )); iter.set_servant( servant ); return i; } catch ( Exception e ){ e.printStackTrace( System.out ); throw new org.omg.CORBA.INTERNAL(); } } /* ========================================================================= */
public org.omg.CORBA.PrimitiveDef get_primitive(org.omg.CORBA.PrimitiveKind kind) { try { return org.omg.CORBA.PrimitiveDefHelper.narrow( poa.servant_to_reference( new org.omg.CORBA.PrimitiveDefPOATie( new PrimitiveDef( kind.value() )))); } catch( Exception e ) { logger.error("unexpected exception", e); return null; } }
private org.fudaa.dodico.corba.evenement.IObjetEvent _creeEvenementObjetEvent() { org.fudaa.dodico.evenement.DObjetEvent o = new org.fudaa.dodico.evenement.DObjetEvent(); if (isUsineLocale_) return o; org.fudaa.dodico.corba.evenement.IObjetEvent_Tie nouvTie = new org.fudaa.dodico.corba.evenement.IObjetEvent_Tie(o, getPOA()); org.fudaa.dodico.corba.evenement.IObjetEvent iobjet = null; try { iobjet = org.fudaa.dodico.corba.evenement.IObjetEventHelper.narrow(getPOA().servant_to_reference(nouvTie)); } catch (Exception e) { e.printStackTrace(); return null; } o.setTie(iobjet); return iobjet; }