Hi all,

Using Wink 1.2.0-incubating in conjunction with
wink-spring-support-1.2.0-incubating.jar.

I note in wink-core-context.xml that it is possible to re-target certain
properties of Wink's DeploymentConfiguration to use Spring beans by setting
certain property values to my Spring bean names. As per the code snippit
below:

    <bean id="winkInternalDeploymentConfiguration"
class="org.apache.wink.server.internal.DeploymentConfiguration"
        init-method="init">

        <property name="properties">
            <ref bean="winkInternalPropertiesFactory" />
        </property>
        <property name="requestHandlersChain">
            <ref bean="${winkRequestHandlersChain}" />
        </property>
    <property name="responseHandlersChain">
      <ref bean="${winkResponseHandlersChain}" />
    </property>
        <property name="errorHandlersChain">
            <ref bean="${winkErrorHandlersChain}" />
        </property>
        <property name="ofFactoryRegistry">
            <ref bean="${winkInternalLifecycleManagersRegistry}" />
        </property>
        <property name="mediaTypeMapper">
            <ref bean="${winkMediaTypeMapper}" />
        </property>
        <property name="alternateShortcutMap">
            <ref bean="${winkAlternateShortcutsMap}" />
        </property>
    </bean>

In my particular case I want to re-point both the requestUserHandlersChain
and responseUserHandlersChain but I want to leave the requestHandlersChain
and responseHandlersChain unmodified as it seems that Wink sets up certain
handlers here which are required for normal operation of Wink.

Given the bean definition above I can't see how I could re-point only the
'user' handlers chains. Does anyone know how I could acheive this? I did
look in to writing a class which extends DeploymentConfiguration which
would be a Spring bean and could autowire my desired handlers, however I
then noticed that RestServlet always tries to instantiate a new instance of
the designated DeploymentConfiguration class which would mean Wink used a
non-Spring managed instance of my class.

Any help much appreciated.

Cheers,

Edd

-- 
Web: http://www.eddgrant.com
Email: [email protected]
Mobile: +44 (0) 7861 394 543

Reply via email to