no.tornado.brap.spring
Class SpringProxyServlet
java.lang.Object
no.tornado.brap.servlet.ProxyServlet
no.tornado.brap.spring.SpringProxyServlet
- All Implemented Interfaces:
- javax.servlet.Servlet
public class SpringProxyServlet
- extends ProxyServlet
This SpringProxyServlet is configured from web.xml for each service you wish
to expose as a remoting service.
You must refer to a bean in your applicationContext that provides the complete
ServiceWrapper.
web.xml example of exposing a remoting service:
<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>no.tornado.brap.servlet.ProxyServlet</servlet-class>
<init-param>
<param-name>beanName</param-name>
<param-value>helloRemoteService</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>hello</servlet-name>
<url-pattern>/remoting/hello</url-pattern>
</servlet-mapping>
applicationContext.xml example:
<bean id="helloRemoteService" class="no.tornado.brap.servlet.ServiceWrapper">
<property name="service" ref="helloService"/>
<property name="authenticationProvider" ref="authenticationProvider"/>
<property name="authorizationProvider" ref="authorizationProvider"/>
</bean>
<bean id="authenticationProvider" class="no.tornado.brap.auth.SingleUsernamePasswordAuthenticator">
<property name="username" value="john"/>
<property name="password" value="secret"/>
</bean>
<bean id="authorizationProvider" class="no.tornado.brap.auth.AllowAllAuthorizer"/>
<bean id="helloService" class="no.tornado.brap.test.service.HelloService"/>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpringProxyServlet
public SpringProxyServlet()
createServiceWrapper
public void createServiceWrapper()
- Overrides:
createServiceWrapper in class ProxyServlet
Copyright © 2009 Syse Data AS. All Rights Reserved.