How are you loading the spring config?
On Feb 5, 2008 2:21 PM, dev dev <[EMAIL PROTECTED]> wrote:
> We have spent a bit of time on this and we cannot seem to find ways to get
> this to work for such a simple configuration. We are using version 1.1-M2.
>
> Simple method to start the server.
>
> public static void start() throws Exception {
> // Start the Restlet component
> Component component = (Component) SpringContextLoader.getBean
> ("component");
> Server server = (Server) SpringContextLoader.getBean("server");
>
> logger.debug("value1:: " + server.getContext
> ().getParameters().getFirstValue("key1"));
> logger.debug("value2:: " + server.getContext
> ().getParameters().getFirstValue("key2"));
> component.start();
> }
>
> Spring XML configuration.
>
> <bean id="component"
> class="org.restlet.ext.spring.SpringComponent">
> <property name="server" ref="server" />
> <property name="defaultTarget" ref="application" />
> <!--<property name="hosts">
> <list>
> <ref bean="virtualHost" />
> </list>
> </property> -->
> </bean>
>
> <bean id="server" class="org.restlet.ext.spring.SpringServer">
> <constructor-arg value="http" />
> <constructor-arg value="8182" />
> <property name="parameters">
> <props>
> <prop key="key1">value1</prop>
> <prop key="key2">value2</prop>
> </props>
> </property>
> </bean>
>
> <!--<bean id="virtualHost" class="org.restlet.ext.spring.SpringHost">
> <property name="hostDomain"
> value="mydomain.com|www.mydomain.com" />
> <property name="attachments">
> <map>
> <entry key="/">
> <ref bean="application" />
> </entry>
> </map>
> </property>
> </bean> -->
>
> Here are the output.
>
> value1:: null
> value2::null
>
> Anyone have seen this problem or this parameters are not very useful
> anyway so don't use it since it doesn't work anyway. We are using
> SimpleFramework as the connector and are there any properties associated
> with this connector like (number of connections per server pool etc..) and
> we can define in the Spring application context file.
>
> Thanks
> dev
>