public class SpringProxyServlet extends ProxyServlet
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"/>
| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.context.ApplicationContext |
applicationContext |
INIT_PARAM_AUTHENTICATION_PROVIDER, INIT_PARAM_AUTHORIZATION_PROVIDER, INIT_PARAM_MODIFICATION_MANAGER, INIT_PARAM_SERVICE, serviceWrapper, servletConfig| Constructor and Description |
|---|
SpringProxyServlet() |
| Modifier and Type | Method and Description |
|---|---|
void |
createServiceWrapper() |
destroy, getAuthenticationProvider, getAuthorizationProvider, getModificationManager, getService, getServletConfig, getServletInfo, getStreamBufferSize, init, postMethodInvocation, preMethodInvocation, serviceprotected org.springframework.context.ApplicationContext applicationContext
public void createServiceWrapper()
createServiceWrapper in class ProxyServletCopyright © 2009-2013 SYSE AS. All Rights Reserved.