Hi all,
    The spring provides ApplicationContextAware Interface to get 
ApplicationContext .Does Tuscany have similar mechanism to get SCADomain 
instance?
   
   As the question I asked last time,maybe,I can develop a filter that 
implement javax.servlet.Filter interface. The filter get the SCADomain instance 
from the ServletContext in its init method  and save it to a static field. Then 
other class can get the scadomain anywhere. Any better suggestion?
2011-07-13 



fzhong 



发件人: fzhong 
发送时间: 2011-07-11  13:22:39 
收件人: user 
抄送: 
主题: How can I get the SCADomain refererce in a polciy module? 
 
Hi all:
  I'm trying to develop a policy module that need to visit database and rmi 
services, the database configuration and the rmi service has been initialized 
by the TuscanyContextListener .

 I know that the developers can get a reference to the SCADomain in their JSP 
or HttpServlet just like the following code snippet:
    SCADomain domain = (SCADomain) 
application.getAttribute("org.apache.tuscany.sca.SCADomain");

My question is  how can I get the ServletContext in the policy?  The method of 
interceptor ' Message invoke(Message msg) ' has no information about that.

Thanks.
2011-07-11 



fzhong 

Reply via email to