Re: SlingPostServlet saves operations that throw an error in the log but return 200 responses

2010-03-31 Thread Alexander Klimetschek
On Wed, Mar 31, 2010 at 03:06, Michael Yin yincr...@gmail.com wrote:
 I would argue that errors should be given an appropriate response. Most of
 the other actions that I've seen return appropriate error responses, such as
 doing xpath searches with improper syntax returns a 500 or when a resource
 isn't found, returning a 404. You can still output HTML with a non-200
 response. Otherwise it just seems inconsistent.

By default, http error codes should be set. This behavior can be
controlled via the :status parameter.

http://sling.apache.org/site/manipulating-content-the-slingpostservlet-servletspost.html#ManipulatingContent-TheSlingPostServlet%2528servlets.post%2529-%257B%257B%253Astatus%257D%257D

The reason for having 200's in some cases is when using ajax/iframe
requests from browsers, where non-200 responses might get lost.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetsc...@day.com


Observation manager stops suddenly

2010-03-31 Thread Daniel, de la Cuesta Navarrete
Hi,

We are using Sling 5 with Glassfish, we have a lot of post processor
operations controled by the Jackrabbit Observation Manager.

Something like that:

public class MyServiceImpl implements MyService, EventListener {

/*
 * @see javax.jcr.observation.EventListener
 */
public void onEvent(EventIterator eventIterator) {
while (eventIterator.hasNext()) {
my_post_process();
}
  }
}

Many times the Observation Manager stops suddenly and our EventListeners
doesn't work. We look at the Felix Console admin interface and all the
bundles and components are activated, the error.log doesn't show any
exception or error and we have to restart the domain to get sling working
again.

Any idea? What can this problem be caused? Any way to avoid this problem?

Thank you