In Spring, there is the ApplicationContextAware-Interface. Won't that do what you need? Just out of curiosity: Why can't you inject the bean?
Regards, Franz Charles Moulliard schrieb am Dienstag, 23. Juni 2009: > I will provide an example : > > Bundle A > > In this bundle, I instantiate a bean with parameters like this : > > <bean id="emxHeader" > class="com.xpectis.x3s.model.backoffice.emx.common.Header"> > <property name="beginString" value="FIX.4.1"/> > <property name="bodyLength" value="58"/> > <property name="msgSeqNum" value="32"/> > <property name="msgType" value="0"/> > <property name="sendCompId" value="CLIENT"/> > <property name="clientCompId" value="20090619-08:46:35"/> > <property name="targetCompId" value="SERVER"/> > </bean> > > In the same bundle, I would like from a Java class to retrieve the bean and > use it to do a transformation (using DataFormat of Camel : POJO to FIX > message) locally. The result of this transformation will be next made > available to another bundle B though a service (getFIXMessage). > > Regards, > > Charles Moulliard > Senior Enterprise Architect > Apache Camel Committer > > ***************************** > blog : http://cmoulliard.blogspot.com > > On Tue, Jun 23, 2009 at 1:19 AM, Guillaume Nodet <[email protected]> wrote: > > Not sure what you mean. If you create your own spring-dm powered > > bundle, the application context will be exported as an OSGi service > > (unless you configure your bundle to not do so). > > You can access this object through the OSGi registry and manipulate it > > as any other application context. > > > > On Mon, Jun 22, 2009 at 12:16, Charles Moulliard<[email protected]> > > > > wrote: > > > Hi, > > > > > > I would like to know How I can retrieve the > > > org.springframework.osgi.context.support.OsgiBundleXmlApplicationContex > > >t published in an OSGI bundle (using Apache Karaf) ? Is there any helper > > > > class > > > > > in karaf that I use to have access to beans created by Spring ? > > > > > > Regards, > > > > > > Charles Moulliard > > > Senior Enterprise Architect > > > Apache Camel Committer > > > > > > ***************************** > > > blog : http://cmoulliard.blogspot.com > > > > -- > > Cheers, > > Guillaume Nodet > > ------------------------ > > Blog: http://gnodet.blogspot.com/ > > ------------------------ > > Open Source SOA > > http://fusesource.com > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] -- Franz Seidl Bremerstraße 1, App. 131 67663 Kaiserslautern Telefon +49 (0) 631 6251291 Mobil +49 (0) 173 6777026 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

