I second Charles' request. I've been trying to do this with Geronimo
Blueprint and have been unsuccessful.

Is it possible to do this inside the blueprint XML file?

<reference id="something" interface="org.springframework.ApplicationContext"
/>

<!-- how to pass our bean ID here? -->
<bean factory-bean="something" factory-method="getBean" />

Ideally, it should be possible to use Spring beans directly from Blueprint
XML...


On Tue, Jun 23, 2009 at 1:37 PM, Charles Moulliard <[email protected]>wrote:

> 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.OsgiBundleXmlApplicationContext
> > > 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]
> >
> >
>



-- 
Best regards,
Hendy Irawan
+62 81-2210-66622 :: +62 22-91853265
http://www.hendyirawan.com/ :: [email protected]

Reply via email to