[
https://issues.apache.org/jira/browse/JCR-1441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dominique Pfister reopened JCR-1441:
------------------------------------
Hi Jukka,
I'm still convinced that this feature is worth adding, not only for an audit
logger, so I reopen this bug. Please find my revised answers to your comments
below:
> 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.
A repository can also be started without exposing a web interface. An
observation listener should also be available in this setup.
* 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().
The observation listeners would be created and registered in
RepositoryImpl.initWorkspace() (line 567). Please correct me, if I'm wrong, but
as these listeners operate on the system session, they will NOT prevent the
workspace from becoming disposed if idle.
* The audit logger could be a normal JCR observation listener (in
jackrabbit-jcr-commons).
Agreed. I'd still favor enabling the audit logger in the jackrabbit-webapp
distribution, as this information can be very valuable IMHO.
What do you think?
Kind regards
Dominique
> 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.