Spring, embedded jetty, and hibernate

2007-11-07 Thread Sumit Lohia
I'm using Spring, Hibernate, and Restlets and getting a bunch of LazyInitializationExceptions. I've even implemented a OpenSessionInView filter and that doesn't help either. Does anyone have a workaround for this? I am using the Restlet framework (v1.0.1) with the embedded Jetty server as the

Re: Easy Spring Integration with Restlet

2007-11-01 Thread Sumit Lohia
Adam Taft adam at adamtaft.com writes: Finder thankfully happens to be a stateless bean, and therefore can be easily added into your Spring configuration. So the trick is two-fold: a) Create an interface which has methods similar to Resource, except make the interface stateless by

Re: New 1.0 snapshot available

2007-10-23 Thread Sumit Lohia
are properly formatted. Reported by Sumit Lohia. - Added some extra checks to prevent multiple starts/stops of Applications, Components, Clients, Servers. Reported by Amol Daterao, Joan Picanyol i Puig and Christopher Sun. Hi Jerome, Thanks for this snapshot of 1.0.6. I confirmed that the null realm

Re: HEAD not well supported?

2007-10-18 Thread Sumit Lohia
Sean Landis sean.landis at gmail.com writes: Jerome Louvel contact at noelios.com writes: Hi all, Thanks for the quality of the feed-back. I feel like I'm now grasping all aspects of the problem and can propose a solution: 1) Split the Resource class into an abstract Handler class

Null Realm in custom Guard

2007-09-28 Thread Sumit Lohia
I'm trying to write a custom Guard that does HTTP SPNEGO authentication (http://tools.ietf.org/html/rfc4559). For SPNEGO to work, the response on a 401 challenge needs to look like WWW-Authenticate: Negotiate However, Guards currently need a realm and even instantiating a Guard with a null

Re: ConverterService

2007-09-24 Thread Sumit Lohia
Jerome Louvel contact at noelios.com writes: It seems indeed like this service would help you to centralize your conversion logic. But nothing is done automatically, you still need to manually call getEntityAsObject() or setEntity(Object) methods in order to trigger the converter service.

Re: ConverterService

2007-09-24 Thread Sumit Lohia
Jerome Louvel contact at noelios.com writes: Thanks for sharing your experience. I think I prefer your approach which is more flexible. I'm close to conclude that the ConverterService should be deprecated in 1.1. Anyone has strong opinion about such a move? I agree with deprecating the

Handling favicon.ico

2007-09-14 Thread Sumit Lohia
I have a Component and a single Application in my environment. Within the component, I'd like to attach the route '/favicon.ico' to be served from a static file and everything else to be routed to the Application. How can I achieve this within the component? Is there a FileResource (just like

Re: handling multiple representations of a resource

2006-12-29 Thread Sumit Lohia
Jerome Louvel contact at noelios.com writes: So, here are the changes that I made: - split Representation class into a new Variant class (containing all metadata properties) and into a lighter Representation class. Variant is a subclass of Resource and Representation a subclass of Variant.

handling multiple representations of a resource

2006-12-28 Thread Sumit Lohia
How can I provide multiple representations for a resource in an optimal way? I have a database-backed application that stores an address book. I wish the data to be exposed as both a JsonRepresentation and a DomRepresentation. Currently, I am creating both representations as part of the

Client connectors and Applications

2006-11-13 Thread Sumit Lohia
I'm looking at tutorial #6 (http://www.restlet.org/tutorial#part06), and I'm not sure I understand how applications and containers should be organized. If the Application is something that can be distributed opaquely and moved around from Container to Container, why can't the Application open a

monitoring an application

2006-11-10 Thread Sumit Lohia
Hi all, I have a question about how other are using the Application.isStopped() method. If a given application is unhealthy (for example, broken client connectors), is it appropriate for the Application to mark itself stopped? I am writing a restlet that monitors the state of all applications

Re: New snapshot of beta 20

2006-11-03 Thread Sumit Lohia
Jerome Louvel contact at noelios.com writes: Hi all, An intermediary snapshot is available: http://www.restlet.org/downloads/current.zip Best regards, Jerome Louvel --- [API breaking changes] - Moved Atom, FreeMarker and FileUpload extensions to

using log4j

2006-10-31 Thread Sumit Lohia
Is it possible to use log4j for access logging with restlets? I'm using restlet version 1.0b19 with an embedded Jetty webserver. Thanks. Sumit