Jerome Louvel | 1 Apr 2008 09:42

Re: Evaluating Restlet


Hi all,

Tim Peierls wrote:
> I hate to sound like a broken record, but the Restlet Request 
> and Response classes are not thread-safe, so Restlet cannot 
> yet take *full* advantage of NIO to break out of the 
> thread-per-request paradigm. (There is movement on this 
> front, however, as Rob Heittman pointed out earlier in this thread.)

I would like to mention that I've completed the work to make Request, 
Response, Representation and all related classes in API, NRE and 
extensions thread safe.

It was mostly a matter of adding the right modifier, either 'volatile' 
or 'final' as there is rarely a need for strong synchronization in those 
classes. Most of the time they are accessed by one thread at a time.

However, I wouldn't mind having expert eyes looking at the result and 
making sure everything is ready to support advanced handling, IO and 
threading scenarios!

Best regards,
Jerome

Jerome Louvel | 1 Apr 2008 16:22

Restlet 1.0.9 released


Hi all,

A new maintenance release of Restlet 1.0 is available. It mainly fixes a few

bugs (Server.stop(), DomRepresentation, forms parsing) and updates
Jetty to version 6.1.8.

Thanks for the issue reports and contributions!

Changes log:
http://www.restlet.org/documentation/1.0/changes 

Download links:
http://www.restlet.org/downloads/1.0/restlet-1.0.9.zip 
http://www.restlet.org/downloads/1.0/restlet-1.0.9.exe

Maven repositories:
http://maven.restlet.org is updated on the 1st and 15th of each month
http://maven.noelios.com is updated daily with new artifacts

Best regards,
Jerome Louvel
Thierry Boileau

Jerome Louvel | 1 Apr 2008 16:24

Restlet 1.1 M3 released


Hi again!

It's just over a month since 1.1 M2 and we have again made tremendous
progress towards our final release.

Main changes:
    * Licensing scheme changed to CDDL 1.0 or LGPL 2.1 or LGPL 3.0
    * New JAX-RS extension implementing the draft JSR-311
    * New OAuth extension as a pluggable authentication scheme
    * New XDB extension providing integration with Oracle embedded JVM

    * SSL support much improved with access to new attributes
    * XmlRepresentation refactored to support SAX and DOM sources
    * Major TransformRepresentation refactoring (config, reuse, SAX)
    * Reference class now enforces the usage of valid URI characters
    * Grizzly HTTP server now support chunked encoding of responses

Updated dependencies:
    * Spring to version 2.5.2
    * db4o to version 7.2 (adds transparent update)
    * JavaMail to version 1.4.1
    * JAF to version 1.1.1

Direct contributors:
    * Adam Rosien (OAuth)
    * Avi Flax
    * Bruno Harbulot
    * Chuck Mortimore
    * Dan Diephouse
(Continue reading)

Stephan Koops | 1 Apr 2008 16:51
Picon

Re: Restlet 1.1 M3 released

Hi Jerome,

FYI: I've updated the wiki JAX-RS page to download Restlet including the 
JAX-RS extension direct from www.restlet.org.

best regards
   Stephan

Jerome Louvel schrieb:
> Hi again!
>
> It's just over a month since 1.1 M2 and we have again made tremendous
> progress towards our final release.

Jerome Louvel | 1 Apr 2008 16:56

RE: Restlet 1.1 M3 released


Hi Stephan,

Thanks for the note and all the hard work on JAX-RS extension! Here is the
link for those interested in JAX-RS (JSR-311):
http://wiki.restlet.org/docs_1.1/g1/13-restlet/28-restlet/57-restlet.html

I wish we had such a documentation for all our extensions... If anyone is
interested in contributing to the wiki, let us know. This is a great way to
learn Restlet inside out and to contribute back.

Best regards,
Jerome  

> -----Message d'origine-----
> De : Stephan.Koops <at> web.de [mailto:Stephan.Koops <at> web.de] 
> Envoyé : mardi 1 avril 2008 16:51
> À : discuss <at> restlet.tigris.org
> Objet : Re: Restlet 1.1 M3 released
> 
> Hi Jerome,
> 
> FYI: I've updated the wiki JAX-RS page to download Restlet 
> including the 
> JAX-RS extension direct from www.restlet.org.
> 
> best regards
>    Stephan
> 
> Jerome Louvel schrieb:
(Continue reading)

Ian Clarke | 1 Apr 2008 18:04
Picon
Gravatar

Newbie question: Override Resource.post() or Resource.handlePost() ?

When creating a subclass of Resource, is it preferable to override
post() or handlePost() (ditto for put/handlePut - etc)?  What is the
difference?

(Note: I'm using restlet v 1.0.8)

Thanks,

Ian.

--

-- 
Email: ian <at> uprizer.com
Cell: +1 512 422 3588
Skype: sanity

Michael Böckling | 1 Apr 2008 17:50
Picon
Favicon

integrating restlet with the spring DispatcherServlet

Hi!

This is my first project where I use restlet.

I have trouble to figure out how to integrate it with the
org.springframework.web.servlet.DispatcherServlet. I use that for some 
SOAP web services (using the xfire exporter), but now I want to attach a 
restlet using json.
I was not able to find a example on how to do that! 

I want to use the DispatcherServlet, so the SpringServer is not an 
option. Using the ext.servlet.ServerServlet won't work as well, since 
that would bypass the DispatcherServlet too (and I can't get to the
WebApplicationContext from there).

Is it possible to do what I want? Thanks for any help!

Regards,
Michael

Ian Clarke | 1 Apr 2008 18:21
Picon
Gravatar

another question: adding attributes to a context

I want to pass two objects, cf and rs, in to several resources.  Here
is a code snippet that doesn't work:

--snip--
	apiListenerComponent = new Component();
		
	apiListenerComponent.getServers().add(Protocol.HTTP, listenPort);

	apiListenerComponent.getContext().getAttributes().put("cf", cf);
	apiListenerComponent.getContext().getAttributes().put("rs", rs);

	// Attach the sample application.
	apiListenerComponent.getDefaultHost().attach(
			new Application(apiListenerComponent.getContext()) {

				 <at> Override
				public Restlet createRoot() {
					// Create a root router
					Router router = new Router(getContext());
					router.attach("/users/{id}", UserResource.class);
--snip--

However, I find that if I add the attributes directly to the "router"
object when I create it inside createRoot(), that works fine.

Why isn't the router inheriting the attributes from the Component?

Thanks,

Ian.
(Continue reading)

Rhett Sutphin | 1 Apr 2008 18:23
Gravatar

Re: integrating restlet with the spring DispatcherServlet

Hi Michael,

On Apr 1, 2008, at 10:50 AM, Michael Böckling wrote:
> I have trouble to figure out how to integrate it with the
> org.springframework.web.servlet.DispatcherServlet. I use that for some
> SOAP web services (using the xfire exporter), but now I want to  
> attach a
> restlet using json.
> I was not able to find a example on how to do that!
>
> I want to use the DispatcherServlet, so the SpringServer is not an
> option. Using the ext.servlet.ServerServlet won't work as well, since
> that would bypass the DispatcherServlet too (and I can't get to the
> WebApplicationContext from there).

Since 1.1-M2, there's RestletFrameworkServlet in the  
com.noelios.restlet.ext.spring extension:

http://www.restlet.org/documentation/1.1/ext/com/noelios/restlet/ext/spring/RestletFrameworkServlet.html

As it's name indicates, it extends spring's FrameworkServlet, just  
like DispatcherServlet.  It gives access to the WebApplicationContext  
in the same way.

Rhett
Michael Böckling | 1 Apr 2008 19:06
Picon
Favicon

Re: integrating restlet with the spring DispatcherServlet

Thanks for your help!
Looks like thats exactly what I needed!
I still have an error that I can't solve, when I try to call the URL, 
it says:

01.04.2008 18:56:33 org.restlet.Filter doHandle
WARNUNG: A filter was executed without a next Restlet attached to it.

Can you see where the error is?

My web.xml:

<servlet>
<servlet-name>restlet</servlet-name>
<servlet-class>com.noelios.restlet.ext.spring.RestletFrameworkServlet
</servlet-class>
	<init-param>
		<param-name>targetRestletBeanName</param-name>
		<param-value>root</param-value>
	</init-param>
	<load-on-startup>2</load-on-startup>
</servlet>

<servlet-mapping>
	<servlet-name>restlet</servlet-name>
	<url-pattern>/rest/*</url-pattern>
</servlet-mapping>

My restlet-servlet.xml:

(Continue reading)


Gmane