Ahh, if events run asynchronously, I think I will need something else. The 
user will need this content created for the very next request, if it's not 
there they will receive some ugly stack traces. It's a personal "dashboard" 
view.

Does something new (e.g., a list of registered "user management observers") 
have to be implemented to do this?
 
Thanks,
------------------------------------------
Branden Visser
LMS Application Programmer - Information Systems Services
Information Technology Services
University of Windsor
 
-----Bertrand Delacretaz <[email protected]> wrote: -----

To: [email protected]
From: Bertrand Delacretaz <[email protected]>
Date: 09/26/2009 03:49AM
Subject: Re: Performing operations when user is created

Hi Branden,

On Sat, Sep 26, 2009 at 2:09 AM, Branden Visser <[email protected]> wrote:
> I need to create some content and modify some permissions when a new user is 
> created with the
> jackrabbit.usermanagement bundle. Would events be the right way to go here, 
> or should I extend
> the 'Create User' servlet?

I don't know the usermanagement code well, but if your operations can
be asynchronous, the simplest thing would be to register a listener
for parts of the repository that the usermanagement modifies, and act
according to events received.

> Can anyone provide some online references for doing this kind of thing?

The thumbnail generator of the espblog sample [1] works like that.

-Bertrand

[1] 
http://svn.apache.org/repos/asf/sling/trunk/samples/espblog/src/main/java/org/apache/sling/samples/espblog/internal/ThumbnailGeneratorServiceImpl.java

Reply via email to