[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[virgo-dev] A question about "prototype" scope beans


My question is really be related to Gemini blueprint but I am hoping that it is acceptable for this list as well. Few days back, I have posted the following to Gemini dev list and am copying it here in the hope that some one in Virgo community might have some idea about it. Here it goes:

I would like to ask couple of questions regarding the bug:

which talks about supporting "prototype" scope for beans exported as OSGi services. In my tests, such beans behaved similar to beans with "bundle" scope. 

Upon reading "ServiceFactory" facility in OSGi, it seems to me that it is not possible to implement "prototype" scope with the current OSGI specification as the framework calls ServiceFactory.getService() only once for each calling bundle. Is this correct?

Also, as stated above, "prototype" beans get silently converted to "bundle" scoped beans (possibly inadvertently). Isn't it better to fail loading contexts containing such beans?

Any insight into this issue is greatly appreciated.