Hi,
Sorry, I've been a bit slow getting to your questions.
[EMAIL PROTECTED] wrote:
We were looking into using implementation.spring, but had a couple
of questions. We have a spring context with elements common across
all of our services (aspects, host connection beans, caching, etc.)
so we've been using the singleton version of the application context
in our system.
How are you using that singleton version of the application context?
Can you describe its configuration and use in some more detail, please.
Is there actually any way with implementation.spring to configure
which application context Tuscany will use?
Not with the current implementation - an application context is created
from the file identified in the <implementation.spring.../> element.
Will Tuscany share Spring contexts if they are based on the same file?
Not currently. But in SCA terms, this is not the way I would look at
the requirement. If I understand things properly, it sounds as if you
want to have a Spring component shared by a bunch of other components -
and that you want a single copy of the shared component. In SCA terms
this smacks of being a composite-scoped component (ie there is a single
copy of the component instance used for all invocations of services of
the component).
Or maybe some way to configure the scope?
Not at the moment - the current Spring implementation does not handle
Scope - but I'll be happy to work on it with you. Scope has been
implemented for SCA Java POJOs and I'm sure that it would not be too big
a deal to extend that to Spring components.
Also, we haven't fully investigated yet, but it seems like only one
bean is being properly exposed as a service in a single Spring
component. Is this by design?
OK, the code is designed to expose as Services as follows:
a) If there are explicit <sca:service.../> elements in the application
context file, those and only those are exposed as services (one for one)
b) If there are NO explicit <sca:service.../> elements in the
application context file, then each bean in the application context is
made into a service.
If you're only getting one service then this may well be a bug. Are you
able to share your application context with me - or provide a simple
testcase that shows the failure, please?
Any answers would be much appreciated.
Glad to work with you - nice to have some real users ;-)
Yours, Mike.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]