1 19 20 package org.jacorb.notification.container; 21 22 import org.omg.CORBA.ORB ; 23 import org.omg.CORBA.ORBPackage.InvalidName ; 24 import org.omg.PortableServer.POA ; 25 import org.omg.PortableServer.POAHelper ; 26 import org.picocontainer.PicoContainer; 27 import org.picocontainer.PicoInitializationException; 28 import org.picocontainer.defaults.AbstractComponentAdapter; 29 30 class POAComponentAdapter extends AbstractComponentAdapter 31 { 32 private static final long serialVersionUID = 1L; 33 34 public POAComponentAdapter() 35 { 36 super(POA .class, POA .class); 37 } 38 39 public Object getComponentInstance(PicoContainer container) 40 { 41 try 42 { 43 ORB orb = (ORB ) container.getComponentInstance(ORB .class); 44 45 POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA")); 46 47 return poa; 48 } catch (InvalidName e) 49 { 50 throw new PicoInitializationException("could not resolve RootPOA", e); 51 } 52 } 53 54 public void verify(PicoContainer container) 55 { 56 } 58 } | Popular Tags |