this.poa = POAHelper.narrow(orb.resolve_initial_references(this.poaName)); } catch (Exception e) { throw IIOPLogger.ROOT_LOGGER.errorResolvingInitRef(this.poaName, e);
public static org.omg.PortableServer.POA extract(final org.omg.CORBA.Any any) { return narrow(any.extract_Object()) ; } public static String id()
public static org.omg.PortableServer.POA extract(final org.omg.CORBA.Any any) { return narrow(any.extract_Object()) ; } public static String id()
public org.omg.PortableServer.POA default_POA( org.omg.PortableServer.Servant self) { return org.omg.PortableServer.POAHelper.narrow(resolve("RootPOA")); }
public void orb(org.omg.CORBA.ORB orb) { try { POA _poa = POAHelper.narrow(orb .resolve_initial_references("RootPOA")); _poa.activate_object(this); } catch (org.omg.CORBA.ORBPackage.InvalidName ex) { throw new RuntimeException("ORB must have POA support", ex); } catch (org.omg.PortableServer.POAPackage.WrongPolicy ex) { throw new RuntimeException("wrong policy: " + ex.getMessage(), ex); } catch (org.omg.PortableServer.POAPackage.ServantAlreadyActive ex) { throw new RuntimeException("already active: " + ex.getMessage(), ex); } }
/** * Constructs an IIOP Wrapper context * @param iiopCtx the initial IIOP context * @throws NamingException if POA cannot be activated */ public IIOPContext(final Context iiopCtx) throws NamingException { super(iiopCtx); // Initialize ORB if null ORB orb = IIOPCosNaming.getOrb(); if (rootPOA == null) { try { rootPOA = org.omg.PortableServer.POAHelper.narrow(orb.resolve_initial_references("RootPOA")); } catch (Exception e) { throw NamingExceptionHelper.create("Cannot get a single instance" + e.getMessage(), e); } } }
public Object getComponentInstance(PicoContainer container) { try { ORB orb = (ORB) container.getComponentInstance(ORB.class); POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA")); return poa; } catch (InvalidName e) { throw new PicoInitializationException("could not resolve RootPOA", e); } }
/** * Constructs an IIOP Wrapper context for JacORB * @param iiopCtx the inital IIOP context * @throws NamingException if POA cannot be activated */ public JacORBIIOPContext(final Context iiopCtx) throws NamingException { super(iiopCtx); this.sasComponent = (SasComponent) iiopCtx.getEnvironment().get(SAS_COMPONENT); ORB orb = JacORBCosNaming.getOrb(); if (rootPOA == null) { try { rootPOA = org.omg.PortableServer.POAHelper.narrow(orb.resolve_initial_references("RootPOA")); } catch (Exception e) { throw NamingExceptionHelper.create("Cannot get a single instance of rootPOA : " + e.getMessage(), e); } } }
public void init (com.arjuna.orbportability.orb.core.ORB orb) throws InvalidName, AdapterInactive, SystemException { if (!_init) { _poa = POAHelper.narrow(orb.orb().resolve_initial_references( "RootPOA")); _poa.the_POAManager().activate(); _init = true; } }
public void init (com.arjuna.orbportability.orb.core.ORB orb) throws InvalidName, AdapterInactive, SystemException { if (!_init) { _poa = POAHelper.narrow(orb.orb().resolve_initial_references( "RootPOA")); _poa.the_POAManager().activate(); _init = true; } }
public void init (com.arjuna.orbportability.orb.core.ORB orb) throws InvalidName, AdapterInactive, SystemException { if (!_init) { _poa = POAHelper.narrow(orb.orb().resolve_initial_references( "RootPOA")); _poa.the_POAManager().activate(); _init = true; } }
private void initORB(String[] args) throws InvalidName, AdapterInactive { final Properties _props = ConsoleMain.parseProperties(args); orb_ = ORB.init(args, _props); PortableRemoteObjectDelegateImpl.setORB(orb_); logger_ = ((org.jacorb.orb.ORB) orb_).getConfiguration().getLogger( getClass().getName()); final Thread _orbRunner = new Thread("ORB-Thread") { public void run() { orb_.run(); } }; final POA _poa = POAHelper.narrow(orb_.resolve_initial_references("RootPOA")); _poa.the_POAManager().activate(); _orbRunner.start(); }
public static POA extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return narrow(any.extract_Object()); throw new org.omg.CORBA.BAD_OPERATION(); }
public POA default_POA(org.omg.PortableServer.Servant self) { check(); try { return POAHelper.narrow(orb(self).resolve_initial_references("RootPOA")); } catch(InvalidName e) { throw new org.omg.CORBA.INITIALIZE(e.toString()); } }
public RecoveryManagerService(org.omg.CORBA.ORB theCorbaORB) throws Exception { jbossatxLogger.i18NLogger.info_jts_RecoveryManagerService_init(); if (ORBType.JACORB == ORBInfo.getOrbEnumValue()) { // Make sure the orb is ready: TODO improve on this Class c = ClassloadingUtility.loadClass("com.arjuna.ats.internal.jts.orbspecific.jacorb.recoverycoordinators.JacOrbRCServiceInit"); Method m = c.getDeclaredMethod("waitForRunningORBRunner", null); m.invoke(null, null); } /** Create an ORB portability wrapper around the CORBA ORB services orb **/ ORB orb = ORB.getInstance(TransactionManagerService.ORB_NAME); org.omg.PortableServer.POA rootPOA = org.omg.PortableServer.POAHelper.narrow(theCorbaORB.resolve_initial_references("RootPOA")); orb.setOrb(theCorbaORB); OA oa = OA.getRootOA(orb); oa.setPOA(rootPOA); ORBManager.setORB(orb); ORBManager.setPOA(oa); }
/** * @return le root poa utilise ( statique) */ public static POA getPOA() { if (poa_ == null) { final ORB orb = getORB(); try { poa_ = POAHelper.narrow(orb.resolve_initial_references("RootPOA")); poa_.the_POAManager().activate(); } catch (final InvalidName _e) { _e.printStackTrace(); } catch (final AdapterInactive _e) { _e.printStackTrace(); } } return poa_; }
public RecoveryManagerService(org.omg.CORBA.ORB theCorbaORB) throws Exception { jbossatxLogger.i18NLogger.info_jts_RecoveryManagerService_init(); /** Create an ORB portability wrapper around the CORBA ORB services orb **/ ORB orb = ORB.getInstance("jboss-atx"); org.omg.PortableServer.POA rootPOA = org.omg.PortableServer.POAHelper.narrow(theCorbaORB.resolve_initial_references("RootPOA")); orb.setOrb(theCorbaORB); OA oa = OA.getRootOA(orb); oa.setPOA(rootPOA); ORBManager.setORB(orb); ORBManager.setPOA(oa); } }
static public void main( String[] args ) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, null); try { org.omg.PortableServer.POA poa = org.omg.PortableServer.POAHelper.narrow( orb.resolve_initial_references("RootPOA")); EventChannelImpl channel = new EventChannelImpl(orb,poa); poa.the_POAManager().activate(); org.omg.CORBA.Object o = poa.servant_to_reference(channel); NamingContextExt nc = NamingContextExtHelper.narrow( orb.resolve_initial_references("NameService")); String channelName = ( args.length > 0 ? args[0] : "Generic.channel" ); nc.bind(nc.to_name( channelName ), o); orb.run(); } catch( Exception e ) { e.printStackTrace(); } }
public void start(org.omg.CORBA.ORB theCorbaORB) throws Exception { jbossatxLogger.i18NLogger.info_jts_TransactionManagerService_start(); // Create an ORB portability wrapper around the CORBA ORB services orb ORB orb = ORB.getInstance("jboss-atx"); org.omg.PortableServer.POA rootPOA = org.omg.PortableServer.POAHelper.narrow(theCorbaORB.resolve_initial_references("RootPOA")); orb.setOrb(theCorbaORB); OA oa = OA.getRootOA(orb); oa.setPOA(rootPOA); try { // OTSManager won't play nice unless we explicity bootstrap the portability layer: ORBManager.setORB(orb); ORBManager.setPOA(oa); org.omg.CosTransactions.TransactionFactory factory = com.arjuna.ats.jts.OTSManager.get_factory(); final int resolver = Services.getResolver(); com.arjuna.ats.jts.TransactionServer.registerTransactionManager(resolver, orb, factory); } catch (final Exception ex) { throw new Exception(jbossatxLogger.i18NLogger.get_jts_TransactionManagerService_failed(), ex); } }
public static void main( String[] args ) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, null); try { org.omg.PortableServer.POA poa = org.omg.PortableServer.POAHelper.narrow( orb.resolve_initial_references("RootPOA")); poa.the_POAManager().activate(); org.omg.CORBA.Object o = poa.servant_to_reference(new TracingServiceImpl()); NamingContextExt nc = NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService")); nc.bind( nc.to_name("tracing.service"), o); poa.the_POAManager().activate(); } catch ( Exception e ) { e.printStackTrace(); } orb.run(); } }