"Niclas Hedhman" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED]
> > how exactly would tha facility expose data to the embedding application? > > is there a better way than using a singleton or some static methods of the > > outside world? > > I think I need to know what "outside world" is. > I assumed you were talking about accessing Merlin components from for instance > SOAP, or maybe some RMI interface. > > But the above sounds like you want the 'non-Merlin managed' part of an > application within the same JVM to lookup components. yes! sorry i was not aware that i have to mention that explicitely for an embedded merlin. > If it is the later, get the Model from the Kernel, lookup the componentmodel > and call resolve(). This is out of my head and could be slightly off; > > String path = "/outcontainer/innercontainer/somename"; > ContainmentModel tlm = kernel.getModel(); > DeploymentModel dm = tlm.getModel( path ); > Object comp = dm.resolve(); > > You will be returned a proxy to the component, implementing the Service > interface(s), so you won't have direct access to the implementation class, > i.e. can't call life cycle methods and such. > > (I now see that you can tie the two getModel() method calls together into a > single kernel.locate( path ) instead. Should be the same thing. ok, this works. it was the missing part. thank you again ;-)) /eike --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]