Hi Peter,

Thanks for reporting this bug. It is now fixed in SVN trunk.

If you can't use the trunk, just invoke the constructor with a context taken
from your component.

        public TestRestApplication(Component comp) {
                super(comp.getContext());
        }

Best regards,
Jerome  

> -----Message d'origine-----
> De : news [mailto:[EMAIL PROTECTED] De la part de Peter Neubauer
> Envoyé : mardi 4 mars 2008 15:11
> À : discuss@restlet.tigris.org
> Objet : Usage of the latest spring snapshot SpringApplication
> 
> Hi there,
> I have been using the SpringApplication and extended it to look like 
> 
> public class TestRestApplication extends SpringApplication {
> 
>       public static GeneralDao dao;
> 
>       public TestRestApplication(Component comp) {
>               super(comp);
>       }
> 
>       public void setGeneralDao(GeneralDao dao) {
>               this.dao = dao;
>       }
> }
> 
> And registered that in the Spring context.xml using 
> <bean id="restApplication" scope="singleton"
>               class="test.TestApplication">
>               <constructor-arg ref="restComponent" />
>               <property name="root">
>                       <bean 
> class="org.restlet.ext.spring.SpringRouter">
>                               <constructor-arg 
> ref="restApplication" />
>                               <property name="attachments">
>                                       <map>
>                                    <entry 
> key="/v1/issue/new/" value="test.NewIssueResource"/>
>                                       </map>
>                               </property>
>                       </bean>
>               </property>
>               <property name="generalDao" ref="generalDao"/>
>       </bean>
> 
> but now the super constructor seems to be private. How is 
> this class now
> supposed to be used?
> 
> Thanks for any hints
> 
> /peter
> 

Reply via email to