RE: Re: Spring Intergation. Spring managed resources

2009-09-14 Thread Rahul Juneja
Did this work either way, I tried following the example provided by Irfan 
Jamadar with Restlet 2 m04. but for some reason  it is not working.

Can you give a little bit more guideline of how to integrate both.

> Hi there,
> 
> Another option is to inject those services into your parent Restlet
> application and then to retrieve them from your resources via the
> getApplication() method plus a cast.
> 
> Best regards,
> Jerome Louvel
> --
> Restlet ~ Founder and Lead developer ~ http://www.restlet.org
> Noelios Technologies ~ Co-founder ~ http://www.noelios.com
> 
> 
> 
> -Message d'origine-
> De : webp...@tigris.org [mailto:webp...@tigris.org] 
> Envoyé : vendredi 7 août 2009 12:41
> À : discuss@restlet.tigris.org; Rhett Sutphin
> Objet : RE: Re: Spring Intergation. Spring managed resources
> 
> Hello,
> 
> Yes, I know "Spring**" objects in the restlet API but I don't now how to use
> them with my current configuration (as she as described into the restlet
> wiki [http://wiki.restlet.org/community/164-restlet.html # Integration with
> Spring 2.0 and Apache Tomcat 5.5 by Irfan Jamadar]):
> 
> -- 8< [ servicesContext.xml ] --
> 
>   
>  
>value="web.services.rest.impl.restlet.resources.FormsResource" />
>value="web.services.rest.impl.restlet.resources.FormResource" />
>
>   
>   
> 
> -- 8 < [ web.xml ] -
> 
>   org.restlet.application
>   
> web.services.rest.impl.restlet.RestApplication
>   
>   
>   RestServlet
>   
> org.restlet.ext.servlet.ServerServlet
>   
>   
>   RestServlet
>   /services/*
>   
> 
> --
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=23812
> 46

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2394365


RE: Re: Spring Intergation. Spring managed resources

2009-08-17 Thread Jerome Louvel
Hi there,

Another option is to inject those services into your parent Restlet
application and then to retrieve them from your resources via the
getApplication() method plus a cast.

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com



-Message d'origine-
De : webp...@tigris.org [mailto:webp...@tigris.org] 
Envoyé : vendredi 7 août 2009 12:41
À : discuss@restlet.tigris.org; Rhett Sutphin
Objet : RE: Re: Spring Intergation. Spring managed resources

Hello,

Yes, I know "Spring**" objects in the restlet API but I don't now how to use
them with my current configuration (as she as described into the restlet
wiki [http://wiki.restlet.org/community/164-restlet.html # Integration with
Spring 2.0 and Apache Tomcat 5.5 by Irfan Jamadar]):

-- 8< [ servicesContext.xml ] --


   


 



-- 8 < [ web.xml ] -

org.restlet.application

web.services.rest.impl.restlet.RestApplication


RestServlet

org.restlet.ext.servlet.ServerServlet


RestServlet
/services/*


--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=23812
46

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2384447


RE: Re: Spring Intergation. Spring managed resources

2009-08-07 Thread webpost
Hello,

Yes, I know "Spring**" objects in the restlet API but I don't now how to use 
them with my current configuration (as she as described into the restlet wiki 
[http://wiki.restlet.org/community/164-restlet.html # Integration with Spring 
2.0 and Apache Tomcat 5.5 by Irfan Jamadar]):

-- 8< [ servicesContext.xml ] --


   


 



-- 8 < [ web.xml ] -

org.restlet.application

web.services.rest.impl.restlet.RestApplication


RestServlet

org.restlet.ext.servlet.ServerServlet


RestServlet
/services/*


--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2381246


Re: Spring Intergation. Spring managed resources

2009-08-06 Thread Rhett Sutphin
Hi,

On Aug 4, 2009, at 7:19 AM, webp...@tigris.org wrote:

> I'm using Spring and Restlet 1.2m2. Actually I have tow stupid  
> ServerResources who never interact with the rest of the app. But now  
> I have to write a ServerResource who want a "Service" and, of  
> course, I want to inject it with Spring but I'm unable to found any  
> integration samples for using "Spring managed resources".
>
> Actually I have the following Spring config :
> -- 8< ---
> 
>   
>   
>  
>value="web.services.rest.impl.restlet.resources.FormsResource 
> " />
>value="web.services.rest.impl.restlet.resources.FormResource 
> " />
>   
>value="web.services.rest.impl.restlet.resources.SearchResource 
> " />
>   
>   
>   
>
>  class="domain.services.search.SearchServiceImpl" />
> -- 8< ---
>
> And I want to pass "searchService" trought the constructor of "/ 
> search/{object}" resource.

There are several ways to do this.  Look through the Javadoc for the  
spring extension and find the one that suits you best:

http://www.restlet.org/documentation/2.0/jse/ext/org/restlet/ext/spring/package-summary.html

In particular, you'll probably want to take a look at SpringBeanRouter  
and SpringRouter.

Rhett

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2380994


Spring Intergation. Spring managed resources

2009-08-06 Thread webpost
Hi all,

I'm using Spring and Restlet 1.2m2. Actually I have tow stupid ServerResources 
who never interact with the rest of the app. But now I have to write a 
ServerResource who want a "Service" and, of course, I want to inject it with 
Spring but I'm unable to found any integration samples for using "Spring 
managed resources".

Actually I have the following Spring config :
-- 8< ---



   









-- 8< ---

And I want to pass "searchService" trought the constructor of 
"/search/{object}" resource.

Thank you very much.

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2379972