Results 1 to 3 of 3

Thread: How to obtain a reference to a bean in a different bundle

  1. #1

    Default How to obtain a reference to a bean in a different bundle

    Hi,

    I am new to Spring/OSGI and the question I have is:

    Is there a programmatic way to obtain the reference of a bean declared in another bundle, given I know the bean name or the class name?

    I know the way to invoke a service by using BundleContext and ServiceReference when the BundleContext is obtained via BundleContextAware Interface. I don’t know how to do a similar thing when the bean is not a service.

    Regards,
    Sudeepto

  2. #2
    Join Date
    Feb 2010
    Location
    Dublin, Ireland
    Posts
    10

    Default

    http://static.springsource.org/osgi/...tx-publication

    By default spring application context was published as service, so your code could get a reference to the applicationContext and get whatever you want.

  3. #3

    Default

    Hmmmmm....

    Don't know why this didn't occur to me. Thank for your response I would try this out.

    Regards,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •