You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Dominique Pfister (JIRA)" <ji...@apache.org> on 2008/03/05 16:43:40 UTC
[jira] Commented: (JCR-1441) Support workspace event listeners that
will be created/registered on initialization time
[ https://issues.apache.org/jira/browse/JCR-1441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575384#action_12575384 ]
Dominique Pfister commented on JCR-1441:
----------------------------------------
> Couldn't we achieve this with something like an ObservationServlet (in jackrabbit-jcr-servlet) that is
> started (in web.xml of jackrabbit-webapp) right after the repository and that uses it's own configuration
> for setting up observers.
Yes, we could. I simply consider the <workspace> section to be the most natural location.
* If we need explicit workspace opened/closed events to avoid starting the observation sessions before
> someone actually accesses the workspace (or the workspace is created!), then it would IMHO
> be better to add and use a Jackrabbit-specific RepositoryListener interface with event methods
> like workspaceOpened() and workspaceClosed().
I didn't think about that. The event listeners are created/registered after the repository itself and the search manager are registered as EventListeners (in RepositoryImpl.initWorkspace), so there shouldn't be more overhead.
* The audit logger could be a normal JCR observation listener (in jackrabbit-jcr-commons).
Yes, it could. On the other hand, I was afraid that registration via JCR methods might hide some events (because of access control problems or the like).
> Support workspace event listeners that will be created/registered on initialization time
> ----------------------------------------------------------------------------------------
>
> Key: JCR-1441
> URL: https://issues.apache.org/jira/browse/JCR-1441
> Project: Jackrabbit
> Issue Type: New Feature
> Components: jackrabbit-core
> Affects Versions: core 1.4.1
> Reporter: Dominique Pfister
> Assignee: Dominique Pfister
>
> Add an <EventListener> section in workspace.xml (or the <Workspace> section of repository.xml), containing custom javax.jcr.observation.EventListener implementations that will be created and registered when the workspace is initialized.
> The DTD for this section might look as follows:
> <!ELEMENT EventListener (param*)>
> <!ATTLIST EventListener class CDATA #REQUIRED
> eventTypes CDATA #IMPLIED
> absPath CDATA #IMPLIED
> isDeep CDATA #IMPLIED
> uuid CDATA #IMPLIED
> nodeTypeName CDATA #IMPLIED
> noLocal CDATA #IMPLIED>
> This would allow creating an audit logger that will log all write operations on a workspace.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.