Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
How to obtain a reference to a bean in a different bundle Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      Hmmmmm....

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

      Regards,

      Comment

      Working...
      X