wink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edd Grant <...@eddgrant.com>
Subject How do I configure a custom HandlersFactory when configuring Wink through Spring?
Date Tue, 22 May 2012 12:20:33 GMT
Hi all,

I am using Wink (1.2.0-incubating) with Spring support (using Spring
3.1.1-RELEASE). I can't for the life of me figure out how to register a
custom HandlersFactory implementation. Currently I'm doing this in my
Spring/Wink application context file as per the instructions here:
http://incubator.apache.org/wink/1.0/html/5.5%20Spring%20Integration.html

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
		http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd">

  
  <bean class="org.apache.wink.spring.Registrar">
    <property name="instances">
      <set>
        
        <ref bean="healthChecker" />
      </set>
    </property>
  </bean>

  
  <bean id="customPropertiesFactory"
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
    <property name="locations">
      <list>
        <value>WEB-INF/wink.properties</value>
      </list>
    </property>
  </bean>

  <bean id="customConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="ignoreUnresolvablePlaceholders" value="true" />
    <property name="order" value="1" />
    <property name="propertiesArray">
      <list>
        <props>
         <prop key="wink.propertiesFactory">customPropertiesFactory</prop>
        </props>
      </list>
    </property>
  </bean>
</beans>

Spring is starting up and Wink is being initialised at start-up, I have
tested this through the fact that I can successfully call the
'healthChecker' Spring bean via an HTTP GET. However my HandlersFactory
class never gets registered or called. This used to work fine when using the
init-param servlet Style configuration but has stopped working when moving
over to Spring. I can't find anything in the docs to explain how to
configure this when using Spring. Please could someone advise?

Many thanks,

Edd


--
View this message in context: http://apache-wink-users.3471013.n2.nabble.com/How-do-I-configure-a-custom-HandlersFactory-when-configuring-Wink-through-Spring-tp7570933.html
Sent from the Apache Wink Users mailing list archive at Nabble.com.

Mime
View raw message