-
Mar 1st, 2010, 06:43 PM
#1
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
-
Mar 3rd, 2010, 01:02 PM
#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.
-
Mar 3rd, 2010, 04:38 PM
#3
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
-
Forum Rules