hi Ramkumar...i have a bean defined as follows:<bean
id="OrganizationServiceBean"
class="org.springframework.aop.framework.ProxyFactoryBean"><property
name="target"><bean
class="org.soa.services.OrganizationServiceImpl"></bean></property><property
name="proxyInterfaces"><value>org.soa.services.OrganizationService</value></property><property
name="interceptorNames"><list><value>hibernateInterceptor</value></list></property>That
bean needs to set the dataSource values (userName/password) before making a
call to another service (another bean). so, I want to grab the application
context. i've been using spring for awhile and i've always
done:org.springframework.context.ApplicationContext applicationContext =
(org.springframework.context.ApplicationContext)
org.springframework.context.access.ContextSingletonBeanFactoryLocator.getInstance("beanRefFactory.xml").useBeanFactory("beanRefFactory").getFactory();
then I can get the dataSource by doing:
applicationContext.getBean("dataSource");
when I do within tuscany, i get an exception since the namespace
http://www.springframework.org/schema/sca is not valid.
so, if there's some way i can get the applicationContext, or the dataSource
bean, within my organization service that would be great.
thx abe
----- Original Message ----
From: Ramkumar R <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, August 25, 2008 10:26:04 AM
Subject: Re: sca namespace in spring
Hi Abraham,
Sorry for the late response. If you don't mind, can you please share your
usecase/scenario with Spring and SCA?
I believe, that would give us with a better understanding to help you on the
same.
On Fri, Aug 22, 2008 at 6:10 AM, Abraham Washington <[EMAIL PROTECTED]> wrote:
hi ramkumar...how do i get spring's applicationContext? I don't see that in
the example.
thx abe
----- Original Message ----
From: Ramkumar R <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, August 18, 2008 1:30:23 AM
Subject: Re: sca namespace in spring
>
> here's my call to get the applicationContext:
>
>
> org.springframework.context.ApplicationContext applicationContext =
>
> (org.springframework.context.ApplicationContext)
> org.springframework.context.access.ContextSingletonBeanFactoryLocator./getInstance/("beanRefFactory.xml").useBeanFactory("beanRefFactory").getFactory();
>
Hi Abraham,
I could see the issue that your are facing while using the code you shown above
to create the application context. By creating a application context in this
manner, does not use the implementation provided by Tuscany to support
<sca:service>. Tuscany supports
xmlns:sca="http://www.springframework.org/schema/sca" using
SCANamespaceHandlerResolver by extending the DefaultNamespaceHandlerResolver.
Tuscany creates a application context for you, when you want to use spring
implementation with your composite.
I could not understand exactly, what you are trying to achieve?
Just FYI.... To get an understanding on how Tuscany supports spring
implementation please refer to sample
http://svn.apache.org/repos/asf/tuscany/java/sca/samples/simple-bigbank-spring
--
Thanks & Regards,
Ramkumar Ramalingam
--
Thanks & Regards,
Ramkumar Ramalingam
</bean>