Hi Rhett 

thanks for replying. I'll take a look at the links you sent later
today. 

In the meantime I've switched back to using the NRE ServerServlet with
a custom Application that wires in a manager obj to create a Router
whose config is fed from the applicationContext.xml. The spring config
uses the SpringFinfer to overload createResource. It all works but I'd
still like to understand what was wrong with my first approach. If
anyone has any insights please send them along.

cheers,

-s
>  Hi Stephen,

>  On Mar 20, 2008, at 10:27 AM, Stephen Mc Namara wrote:
>>   I'm trying without much success to bootstrap a new project using
>> both Spring (2.5) and restlet(1.1-M2). The plan goes something like
>>  this;

>>   *  Restlet resources on the front end which interact with a service
>> layer. The service layer contains some business logic but mostly
>> passes off
>>   calls to a bunch of back end legacy systems. The goal is to expose
>>  those back
>>   end systems as a uniform set of RESTful web services.

>>   *  I want to use Spring primarily for IoC, Aspects and JMX ease of
>> use. Plus being able to fairly easily add thread pools to my back
>> end adapters is appealing; all the usual Spring container arguments.

>>   *  I can't use the Restlet HTTP server and in all likelihood the
>> corporate powers will make us deploy on WebSphere for production but
>>   for now I'm
>>   trying to deploy Spting+Restlet as a WAR inside Tomcat.

>>   I've read all I can find on the restlet site, the faq, the wiki
>> and   this list
>>   about the various integration options but none are working. It
>> seems   there were
>>   some previous integration strategies and some newer options.
>> Various   googling
>>   has produced a confusing list of alternate approaches and I have
>> to   say the
>>   restlet docs need a major boost.

>  This is at least partially my fault.  I promised documentation for
> how  to use RestletFrameworkServlet and SpringBeanRouter/Finder, but
> have  not delivered them yet.
>>   I'd like to use Spring to inject the service layer into my
>> Resources; and in general to use its IoC injection across all the
>> beans. Having restlet config (router config, URL mapping etc)
>> exposed (and   manageable) by
>>   Spring is nice.

>  This is how I use it today.
>>   I'd really appreciate if anyone has a complete end-to-end working
>> example of spring+restlet in tomcat with either approach, or if you
>> can
>>   spot a problem with the config shown above.

>  If you'd like an end-to-end working application of moderate
> complexity, you can look at Patient Study Calendar (PSC):

>  https://svn.bioinformatics.northwestern.edu/studycalendar/trunk/

>  It is the open source clinical research app I developed the
> aforementioned adapter classes for.  It is primarily a Spring-MVC
> webapp, with Spring IoC connecting all the layers.  The RESTful API
> was added after most of the application functionality was in place,
> so  it is somewhat similar to your situation.

>  In particular, I think you'll want to look at


> https://svn.bioinformatics.northwestern.edu/studycalendar/trunk/src/ma
>  in/webapp/WEB-INF/restful-api-servlet.xml

>  which is the spring configuration file for the
> RestletFrameworkServlet  (using SpringBeanRouter) and


> https://svn.bioinformatics.northwestern.edu/studycalendar/trunk/src/ma
>  in/java/edu/northwestern/bioinformatics/studycalendar/restlets/

>  which contains all the Resource implementations.  PSC's not as clean
> as an example written specifically for demonstration, but hopefully
> it  can get the point across for now.

>  Rhett



-- 

I'm trying a new usenet client for Mac, Nemo OS X.
You can download it at http://www.malcom-mac.com/nemo


Reply via email to