[jira] [Commented] (SLING-3983) Make Session UserData available in OSGI Event

2014-10-08 Thread Tommaso Teofili (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-3983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14163283#comment-14163283
 ] 

Tommaso Teofili commented on SLING-3983:


here's the thread mentioned by Carsten: 
http://markmail.org/message/i2qy6ck22muwe4oc
What I get from there is that 'userData' is always there for local events and 
is never there for remote events; in the mentioned edge case local events can 
be reported as remote ones and thus without 'userData'.

bq. While I agree that this would be really helpful to add the information, we 
must just be perfectly aware of this functional implementation dependency and 
make a conscious decision on whether we want to do this.

right, as far as I understand 'userData' is a JCR specific kind of metadata so 
in first place should probably add it to both _JcrResourceListener_ and 
_OakResourceListener_, if we want it.

Generally speaking I don't see a problem in reporting all the information hold 
by JCR events also in the Sling event as event properties (and that would be 
the same also for other backends, of course), relying on such properties / 
metadata I would say it's an application concern; for example for the 
replication use case (SLING-3993) it may be acceptable to live with the 
mentioned Oak limitation (which still should be an edge case) as it's only 
concerned on local events but of course this doesn't apply generally.


 Make Session UserData available in OSGI Event
 -

 Key: SLING-3983
 URL: https://issues.apache.org/jira/browse/SLING-3983
 Project: Sling
  Issue Type: New Feature
  Components: JCR
Affects Versions: JCR Resource 2.3.8
Reporter: Dominique Pfister
Priority: Minor
 Attachments: patch.txt


 In my Sling/Oak server application I'm handling PUT requests from a client 
 and create appropriate JCR resources. These PUT requests carry a request ID 
 that I'd like to associate with the respective OSGI event I'll be receiving 
 some time later. Now I noticed that using the JCR API:
 Session.getWorkspace().getObservationManager().setUserData(String)
 I could store this request ID. This user data gets passed along in Oak's 
 CommitInfo (in its Info Map), which  Sling's OakResourceListener (in 
 org.apache.sling.jcr.resource.internal) receives it in its added(), deleted() 
 and changed() methods, but it currently does not package it into the OSGI 
 event it sends.
 It would be great if Sling could pass this along with the event, so I do not 
 have to create a NodeObserver/JcrEventListener of my own to catch this 
 information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-3983) Make Session UserData available in OSGI Event

2014-10-08 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-3983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14163634#comment-14163634
 ] 

Carsten Ziegeler commented on SLING-3983:
-

While I think that the Oak behaviour is wrong to mark events external under 
heavy load, I'm fine with adding this as an optional property for local events. 
But but it should be done for both JCR and Oak

 Make Session UserData available in OSGI Event
 -

 Key: SLING-3983
 URL: https://issues.apache.org/jira/browse/SLING-3983
 Project: Sling
  Issue Type: New Feature
  Components: JCR
Affects Versions: JCR Resource 2.3.8
Reporter: Dominique Pfister
Priority: Minor
 Attachments: patch.txt


 In my Sling/Oak server application I'm handling PUT requests from a client 
 and create appropriate JCR resources. These PUT requests carry a request ID 
 that I'd like to associate with the respective OSGI event I'll be receiving 
 some time later. Now I noticed that using the JCR API:
 Session.getWorkspace().getObservationManager().setUserData(String)
 I could store this request ID. This user data gets passed along in Oak's 
 CommitInfo (in its Info Map), which  Sling's OakResourceListener (in 
 org.apache.sling.jcr.resource.internal) receives it in its added(), deleted() 
 and changed() methods, but it currently does not package it into the OSGI 
 event it sends.
 It would be great if Sling could pass this along with the event, so I do not 
 have to create a NodeObserver/JcrEventListener of my own to catch this 
 information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-3983) Make Session UserData available in OSGI Event

2014-10-07 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-3983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14163061#comment-14163061
 ] 

Carsten Ziegeler commented on SLING-3983:
-

Quoting Michael from a recent thread in Oak:  under some circumstances local 
events get aggregated such that the user data becomes unavailable (i.e. the 
commit boundaries get lost). This happens when the commit rate is too hight for 
event processing to keep up with
This basically means you can't rely on user data which means this - simply put 
- this is useless. A feature that usually works but does under heavy load is 
dangerous. So unless this gets fixed in Oak we shouldn't add it.

 Make Session UserData available in OSGI Event
 -

 Key: SLING-3983
 URL: https://issues.apache.org/jira/browse/SLING-3983
 Project: Sling
  Issue Type: New Feature
  Components: JCR
Affects Versions: JCR Resource 2.3.8
Reporter: Dominique Pfister
Priority: Minor
 Attachments: patch.txt


 In my Sling/Oak server application I'm handling PUT requests from a client 
 and create appropriate JCR resources. These PUT requests carry a request ID 
 that I'd like to associate with the respective OSGI event I'll be receiving 
 some time later. Now I noticed that using the JCR API:
 Session.getWorkspace().getObservationManager().setUserData(String)
 I could store this request ID. This user data gets passed along in Oak's 
 CommitInfo (in its Info Map), which  Sling's OakResourceListener (in 
 org.apache.sling.jcr.resource.internal) receives it in its added(), deleted() 
 and changed() methods, but it currently does not package it into the OSGI 
 event it sends.
 It would be great if Sling could pass this along with the event, so I do not 
 have to create a NodeObserver/JcrEventListener of my own to catch this 
 information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-3983) Make Session UserData available in OSGI Event

2014-10-03 Thread Tommaso Teofili (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-3983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14158042#comment-14158042
 ] 

Tommaso Teofili commented on SLING-3983:


I agree with the proposed approach (I found myself too in a situation where 
this info would be actually useful).
Regarding Oak support for this information I don't know the whole story but 
it'd be good to have a consistent behavior in Oak so that it works in all 
scenarios where resources are backed by JCR.

 Make Session UserData available in OSGI Event
 -

 Key: SLING-3983
 URL: https://issues.apache.org/jira/browse/SLING-3983
 Project: Sling
  Issue Type: New Feature
  Components: JCR
Affects Versions: JCR Resource 2.3.8
Reporter: Dominique Pfister
Priority: Minor
 Attachments: patch.txt


 In my Sling/Oak server application I'm handling PUT requests from a client 
 and create appropriate JCR resources. These PUT requests carry a request ID 
 that I'd like to associate with the respective OSGI event I'll be receiving 
 some time later. Now I noticed that using the JCR API:
 Session.getWorkspace().getObservationManager().setUserData(String)
 I could store this request ID. This user data gets passed along in Oak's 
 CommitInfo (in its Info Map), which  Sling's OakResourceListener (in 
 org.apache.sling.jcr.resource.internal) receives it in its added(), deleted() 
 and changed() methods, but it currently does not package it into the OSGI 
 event it sends.
 It would be great if Sling could pass this along with the event, so I do not 
 have to create a NodeObserver/JcrEventListener of my own to catch this 
 information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-3983) Make Session UserData available in OSGI Event

2014-10-03 Thread Felix Meschberger (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-3983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14158050#comment-14158050
 ] 

Felix Meschberger commented on SLING-3983:
--

Please be aware that this would create another level of implementation 
dependency here !

The OakResourceListener has been done for performance reasons and not to get 
more functionality out of it.

While I agree that this would be really helpful to add the information, we must 
just be perfectly aware of this functional implementation dependency and make a 
conscious decision on whether we want to do this.

 Make Session UserData available in OSGI Event
 -

 Key: SLING-3983
 URL: https://issues.apache.org/jira/browse/SLING-3983
 Project: Sling
  Issue Type: New Feature
  Components: JCR
Affects Versions: JCR Resource 2.3.8
Reporter: Dominique Pfister
Priority: Minor
 Attachments: patch.txt


 In my Sling/Oak server application I'm handling PUT requests from a client 
 and create appropriate JCR resources. These PUT requests carry a request ID 
 that I'd like to associate with the respective OSGI event I'll be receiving 
 some time later. Now I noticed that using the JCR API:
 Session.getWorkspace().getObservationManager().setUserData(String)
 I could store this request ID. This user data gets passed along in Oak's 
 CommitInfo (in its Info Map), which  Sling's OakResourceListener (in 
 org.apache.sling.jcr.resource.internal) receives it in its added(), deleted() 
 and changed() methods, but it currently does not package it into the OSGI 
 event it sends.
 It would be great if Sling could pass this along with the event, so I do not 
 have to create a NodeObserver/JcrEventListener of my own to catch this 
 information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-3983) Make Session UserData available in OSGI Event

2014-10-01 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-3983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14154646#comment-14154646
 ] 

Carsten Ziegeler commented on SLING-3983:
-

I'm not sure if we should add them as afaik Oak is not keeping them when events 
are send across a cluster (same with user id). So this only works for local JCR 
based changes.

 Make Session UserData available in OSGI Event
 -

 Key: SLING-3983
 URL: https://issues.apache.org/jira/browse/SLING-3983
 Project: Sling
  Issue Type: New Feature
  Components: JCR
Affects Versions: JCR Resource 2.3.8
Reporter: Dominique Pfister
Priority: Minor

 In my Sling/Oak server application I'm handling PUT requests from a client 
 and create appropriate JCR resources. These PUT requests carry a request ID 
 that I'd like to associate with the respective OSGI event I'll be receiving 
 some time later. Now I noticed that using the JCR API:
 Session.getWorkspace().getObservationManager().setUserData(String)
 I could store this request ID. This user data gets passed along in Oak's 
 CommitInfo (in its Info Map), which  Sling's OakResourceListener (in 
 org.apache.sling.jcr.resource.internal) receives it in its added(), deleted() 
 and changed() methods, but it currently does not package it into the OSGI 
 event it sends.
 It would be great if Sling could pass this along with the event, so I do not 
 have to create a NodeObserver/JcrEventListener of my own to catch this 
 information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-3983) Make Session UserData available in OSGI Event

2014-10-01 Thread Dominique Pfister (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-3983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14154649#comment-14154649
 ] 

Dominique Pfister commented on SLING-3983:
--

[~cziegeler], local JCR based changes would be fine for me! In 
OakResourceListener's addCommitInfo() method, I see that a user id is added 
only, if the CommitInfo carries one; couldn't the user data be added on the 
same condition?

 Make Session UserData available in OSGI Event
 -

 Key: SLING-3983
 URL: https://issues.apache.org/jira/browse/SLING-3983
 Project: Sling
  Issue Type: New Feature
  Components: JCR
Affects Versions: JCR Resource 2.3.8
Reporter: Dominique Pfister
Priority: Minor

 In my Sling/Oak server application I'm handling PUT requests from a client 
 and create appropriate JCR resources. These PUT requests carry a request ID 
 that I'd like to associate with the respective OSGI event I'll be receiving 
 some time later. Now I noticed that using the JCR API:
 Session.getWorkspace().getObservationManager().setUserData(String)
 I could store this request ID. This user data gets passed along in Oak's 
 CommitInfo (in its Info Map), which  Sling's OakResourceListener (in 
 org.apache.sling.jcr.resource.internal) receives it in its added(), deleted() 
 and changed() methods, but it currently does not package it into the OSGI 
 event it sends.
 It would be great if Sling could pass this along with the event, so I do not 
 have to create a NodeObserver/JcrEventListener of my own to catch this 
 information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-3983) Make Session UserData available in OSGI Event

2014-10-01 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-3983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14154662#comment-14154662
 ] 

Carsten Ziegeler commented on SLING-3983:
-

Yepp, this can be done - we just have to make sure to specify that this is a) 
optional, b) only for resources backed by JCR and c) is not guaranteed to work. 
So I think we shouldn't add a constant to Sling's API for this.

 Make Session UserData available in OSGI Event
 -

 Key: SLING-3983
 URL: https://issues.apache.org/jira/browse/SLING-3983
 Project: Sling
  Issue Type: New Feature
  Components: JCR
Affects Versions: JCR Resource 2.3.8
Reporter: Dominique Pfister
Priority: Minor

 In my Sling/Oak server application I'm handling PUT requests from a client 
 and create appropriate JCR resources. These PUT requests carry a request ID 
 that I'd like to associate with the respective OSGI event I'll be receiving 
 some time later. Now I noticed that using the JCR API:
 Session.getWorkspace().getObservationManager().setUserData(String)
 I could store this request ID. This user data gets passed along in Oak's 
 CommitInfo (in its Info Map), which  Sling's OakResourceListener (in 
 org.apache.sling.jcr.resource.internal) receives it in its added(), deleted() 
 and changed() methods, but it currently does not package it into the OSGI 
 event it sends.
 It would be great if Sling could pass this along with the event, so I do not 
 have to create a NodeObserver/JcrEventListener of my own to catch this 
 information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)