Re: FW: [PROPOSAL] Context-specific configuration for Apache Sling, Multitenancy

2014-10-15 Thread Carsten Ziegeler
In general, using typed objects is the preferred way to go, so I think a
configuration object should be a type object and return configuration
values in the correct type. Let's not fall back into the 80s and fiddle
around with string conversions all over the place.
Having a type for a configuration removes also the need for those ugly
name constants and we could hopefully also get away with having ugly
constants for default values.

So what about using the approach we use in the new Declarative Service
specification and you define a configuration as an annotation:

public @interface MyConfiguration {

   int port() default 465;

   String host() default localhost;

   String userId;
}

This leaves us with a single place to define a type configuration object
in combination with default values. We then define simple mapping rules
from names to resource names.

And we should also support *all* java types not just those JCR supports.
Internally all numbers can be stored as long but the configuration
object gives you an integer, char whatever.

This is how I would like to deal with configurations in code.

Carsten

-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


RE: FW: [PROPOSAL] Context-specific configuration for Apache Sling, Multitenancy

2014-10-15 Thread Stefan Seifert
hello justin.

i understand you concerns and see what you are pointing at. i hit the problem 
as well at the same time wanting to have single valuemap with all parameters 
and application separation or parameter names. i'm open to removing the 
parameter stuff from the main API, it can always added as a layer on-top.

but carsten introduced a new idea, lets discuss this first.

stefan


-Original Message-
From: justinedel...@gmail.com [mailto:justinedel...@gmail.com] On Behalf Of
Justin Edelson
Sent: Wednesday, October 15, 2014 2:50 AM
To: dev@sling.apache.org
Subject: Re: FW: [PROPOSAL] Context-specific configuration for Apache Sling,
Multitenancy

Hi Stefan,
To me, this sounds a bit schizophrenic - you're saying that the
preferred way is to use a Parameter object, but that we need to
support String-based lookup. And I'm not actually sure what which
type belongs to which string constant actually means.

Above all, this seems to create a confusing API. Since the expectation
is that String-based lookups will work consistently, there's
effectively no way to use the extra data within the Parameter object
inside the lookup mechanism. For example, you mentioned the idea of
using the application ID from the Parameter object as a way of
expressing scope. But of course, this can't actually happen because
there would be no way to do this with just Strings.

I also personally find the setting of the default at the Parameter
level a bit confusing. IME, defaults are *very* context-sensitive,
whereas (if I understand) the Parameter objects are meant to be used
across-contexts.

All of which is to say that I would rather see the API have a clean
separation between configuration lookup (which can be done purely with
Strings) and Parameter definition. Or, to put in AEM terms, separate
the functionality common to author  publish (configuration lookup)
from the author-side functionality (parameter defintion which leads to
editing).

At this point, Configuration just becomes MapString, ValueMap. The
keys are are the application IDs and the resulting maps are the actual
configurations for that application (which frankly I'd rather see
called 'component' but that's neither here nor there). The only
deviation I'd suggest from normal Map behavior is that
config.get(non-existing-application-id) should return an empty
ValueMap. This would allow you to do null-safe chaining, e.g.
config.get(foo).get(bar) could return null, but never throw an NPE
(unless config itself is null)

If developers choose to adopt the Parameter objects, that's fine.
Perhaps we even should have a utility method
ConfigurationUtils.get(config, param) which calls
config.get(param.getApplicationId()).get(param.getName(),
param.getType()) But this is an optional step and the use of Parameter
objects isn't implied by the Configuration API.

Regards,
Justin

On Tue, Oct 14, 2014 at 6:58 PM, Stefan Seifert sseif...@pro-vision.de
wrote:
 hello justin.

 yes, this is my expectation for the java code. if you only provide a string-
based access to configuration parameter every developer will start to create a
NameConstants class to define the much-used property names (or you will
provide such a class as part of your applications API). then the developer has
to remember which type belongs to which string constant. then you have to find
a way where you define the default values of a parameter, and describe its
edit mode capabilities. all this is covered by building a structured parameter
definition. but yes, it started as a simple helper class with constants to
easy access all existing parameters of an application.

 as a bonus there is an abstract implementation of the ParameterProvider
interface which just reads the static fields of such a class and provides the
defined parameters as OSGi service to the config infrastructure.

 you still need the string-based (or map-based) access for usecases like
sightly templates where it is not so easy or uncommon to use constants for
accessing map values. but in our experience the parameters are used in most
cases in the java business logic behind the presentation layer, not in the
presentation layer (scripts) itself. and of course the lazy developers can use
this access at well in java code...

 stefan


-Original Message-
From: justinedel...@gmail.com [mailto:justinedel...@gmail.com] On Behalf Of
Justin Edelson
Sent: Tuesday, October 14, 2014 11:32 PM
To: dev@sling.apache.org
Subject: Re: FW: [PROPOSAL] Context-specific configuration for Apache Sling,
Multitenancy

Hi Stefan,
Thanks for clarifying. So is it accurate to say that your expectation
that the *vast* majority of clients to use a strongly-typed Parameter
object rather than doing a simple String lookup?

To me, this seems very heavyweight, but maybe I am being short sighted
(or lazy).

But on the other hand, if you expect clients to use Paramter objects,
why support String lookup at all?

Justin


RE: FW: [PROPOSAL] Context-specific configuration for Apache Sling, Multitenancy

2014-10-15 Thread Stefan Seifert
hello carsten.

like it! so each application defines one (or multiple) of such configuration 
annotation classes. the first get on an configuration object would expect an 
annotation class, and the second would be nice typed access to a configuration 
value. providing additional metadata per configuration parameter (e.g. for a 
configuration editor) would still be possible by adding annotations to the 
annotation methods.

of course we somewhat misuse the annotation concept here because it's never 
used as annotation at all - but it works quite well and is very comfortable. 
the only drawback i see that such annotations will be presented as well to 
users in their IDEs when typing @... to see what annotations are available to 
annotate their classes.

do you have a link where such a concept is defined in context of the new DS 
specification? using the same concept as a (new) DS version would be plus.

wouldn't it be an option to use a plain interface with default values as 
annotations? this comes close to what sling models supports today.

my statement about support only types from JCR was not precise - i meant 
support all primitive types including string array plus map, but no custom or 
more advanced objects, because this would make things really complicated. 
currently a subset of primitive types is supported [1].

stefan

[1] http://wcm.io/config/api/usage-spi.html#Providing_parameter_definitions




-Original Message-
From: Carsten Ziegeler [mailto:cziege...@apache.org]
Sent: Wednesday, October 15, 2014 8:24 AM
To: dev@sling.apache.org
Subject: Re: FW: [PROPOSAL] Context-specific configuration for Apache Sling,
Multitenancy

In general, using typed objects is the preferred way to go, so I think a
configuration object should be a type object and return configuration
values in the correct type. Let's not fall back into the 80s and fiddle
around with string conversions all over the place.
Having a type for a configuration removes also the need for those ugly
name constants and we could hopefully also get away with having ugly
constants for default values.

So what about using the approach we use in the new Declarative Service
specification and you define a configuration as an annotation:

public @interface MyConfiguration {

   int port() default 465;

   String host() default localhost;

   String userId;
}

This leaves us with a single place to define a type configuration object
in combination with default values. We then define simple mapping rules
from names to resource names.

And we should also support *all* java types not just those JCR supports.
Internally all numbers can be stored as long but the configuration
object gives you an integer, char whatever.

This is how I would like to deal with configurations in code.

Carsten

--
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


[jira] [Updated] (SLING-3899) Access content for replication on behalf of the user that triggered the replication

2014-10-15 Thread Marius Petria (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-3899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marius Petria updated SLING-3899:
-
Attachment: SLING-3899.1.diff

I just realized that packages were build with the calling user session. The 
user session should be used only to check privileges, but the actual content 
buliding should be done with the agent session.

 Access content for replication on behalf of the user that triggered the 
 replication
 ---

 Key: SLING-3899
 URL: https://issues.apache.org/jira/browse/SLING-3899
 Project: Sling
  Issue Type: Improvement
  Components: Replication
Reporter: Marius Petria
Assignee: Tommaso Teofili
 Attachments: SLING-3899.1.diff, SLING-3899.diff


 Currently the content is accessed via an administrative session. We need to 
 pass a ResourceResolver via all APIs to ensure that the content is accessed 
 only be users that have the right.
 For rule triggered requests the actions should be done on the behalf of a 
 replication-service-user.



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


[jira] [Commented] (SLING-4049) Errorhandling: Allow Configuration of Displaying Stacktraces/Request Progress

2014-10-15 Thread JIRA

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

Dominique Jäggi commented on SLING-4049:


{quote}The error handling system is configurable and I would think that for a 
production setup custom errorhandler scripts should be created which don't 
expose stacktraces, request progress trackers, and system version.{quote}

i don't think a production customer would understand the need to deploy custom 
code simply to turn off insecure stack traces / request progress. this sounds 
like wanting to evade the (rather minimal) effort of making this configurable.

 Errorhandling: Allow Configuration of Displaying Stacktraces/Request Progress
 -

 Key: SLING-4049
 URL: https://issues.apache.org/jira/browse/SLING-4049
 Project: Sling
  Issue Type: Improvement
  Components: Servlets
Reporter: Dominique Jäggi

 it should be configurable whether during error display (40x, 50x, etc) 
 stacktraces or the request progress is displayed or not. 
 for production systems it is undesirable to exhibit information that may 
 allow an attacker to determine internal information such as used scripts, 
 paths, classes, line numbers, etc.
 ideally this could be centrally configured, affecting both e.g. the JSP 
 handlers (404.jsp) as well as any other facility outputting error conditions.



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


[jira] [Reopened] (SLING-3899) Access content for replication on behalf of the user that triggered the replication

2014-10-15 Thread Tommaso Teofili (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-3899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tommaso Teofili reopened SLING-3899:


 Access content for replication on behalf of the user that triggered the 
 replication
 ---

 Key: SLING-3899
 URL: https://issues.apache.org/jira/browse/SLING-3899
 Project: Sling
  Issue Type: Improvement
  Components: Replication
Reporter: Marius Petria
Assignee: Tommaso Teofili
 Attachments: SLING-3899.1.diff, SLING-3899.diff


 Currently the content is accessed via an administrative session. We need to 
 pass a ResourceResolver via all APIs to ensure that the content is accessed 
 only be users that have the right.
 For rule triggered requests the actions should be done on the behalf of a 
 replication-service-user.



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


[jira] [Updated] (SLING-4051) Warning about unset VLT package version when using Sling replication

2014-10-15 Thread Tommaso Teofili (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tommaso Teofili updated SLING-4051:
---
Summary: Warning about unset VLT package version when using Sling 
replication  (was: Warning about unset version when using replication.next)

 Warning about unset VLT package version when using Sling replication
 

 Key: SLING-4051
 URL: https://issues.apache.org/jira/browse/SLING-4051
 Project: Sling
  Issue Type: Bug
  Components: Replication
Reporter: Laurie byrum

 I use the following code to replicate:
 @Reference(target = (name=blah-reverse), policy = 
 ReferencePolicy.DYNAMIC,
 cardinality = ReferenceCardinality.OPTIONAL_UNARY)
 ReplicationAgent replicationAgent;
 private void reverseReplicate(String path) throws 
 AgentReplicationException {
 if (replicationAgent != null) {
 ReplicationRequest replicationRequest = new ReplicationRequest(0, 
 ReplicationActionType.ADD, path);
 replicationAgent.execute(replicationRequest);
 }
 }
 I get the following warning in my log when that happens: 
 14.10.2014 14:13:54.544 *WARN* [0:0:0:0:0:0:0:1 [1413321186378] POST blah 
 HTTP/1.1] org.apache.jackrabbit.vault.packaging.impl.PackagePropertiesImpl 
 Package does not specify a version. setting to ''



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


[jira] [Assigned] (SLING-4051) Warning about unset VLT package version when using Sling replication

2014-10-15 Thread Tommaso Teofili (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tommaso Teofili reassigned SLING-4051:
--

Assignee: Tommaso Teofili

 Warning about unset VLT package version when using Sling replication
 

 Key: SLING-4051
 URL: https://issues.apache.org/jira/browse/SLING-4051
 Project: Sling
  Issue Type: Bug
  Components: Replication
Reporter: Laurie byrum
Assignee: Tommaso Teofili

 I use the following code to replicate:
 @Reference(target = (name=blah-reverse), policy = 
 ReferencePolicy.DYNAMIC,
 cardinality = ReferenceCardinality.OPTIONAL_UNARY)
 ReplicationAgent replicationAgent;
 private void reverseReplicate(String path) throws 
 AgentReplicationException {
 if (replicationAgent != null) {
 ReplicationRequest replicationRequest = new ReplicationRequest(0, 
 ReplicationActionType.ADD, path);
 replicationAgent.execute(replicationRequest);
 }
 }
 I get the following warning in my log when that happens: 
 14.10.2014 14:13:54.544 *WARN* [0:0:0:0:0:0:0:1 [1413321186378] POST blah 
 HTTP/1.1] org.apache.jackrabbit.vault.packaging.impl.PackagePropertiesImpl 
 Package does not specify a version. setting to ''



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


[jira] [Commented] (SLING-4051) Warning about unset VLT package version when using Sling replication

2014-10-15 Thread Tommaso Teofili (JIRA)

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

Tommaso Teofili commented on SLING-4051:


thanks Laurie for reporting this!

 Warning about unset VLT package version when using Sling replication
 

 Key: SLING-4051
 URL: https://issues.apache.org/jira/browse/SLING-4051
 Project: Sling
  Issue Type: Bug
  Components: Replication
Reporter: Laurie byrum

 I use the following code to replicate:
 @Reference(target = (name=blah-reverse), policy = 
 ReferencePolicy.DYNAMIC,
 cardinality = ReferenceCardinality.OPTIONAL_UNARY)
 ReplicationAgent replicationAgent;
 private void reverseReplicate(String path) throws 
 AgentReplicationException {
 if (replicationAgent != null) {
 ReplicationRequest replicationRequest = new ReplicationRequest(0, 
 ReplicationActionType.ADD, path);
 replicationAgent.execute(replicationRequest);
 }
 }
 I get the following warning in my log when that happens: 
 14.10.2014 14:13:54.544 *WARN* [0:0:0:0:0:0:0:1 [1413321186378] POST blah 
 HTTP/1.1] org.apache.jackrabbit.vault.packaging.impl.PackagePropertiesImpl 
 Package does not specify a version. setting to ''



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


[jira] [Updated] (SLING-3899) Access content for replication on behalf of the user that triggered the replication

2014-10-15 Thread Marius Petria (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-3899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marius Petria updated SLING-3899:
-
Attachment: SLING-3899.2.diff

 Access content for replication on behalf of the user that triggered the 
 replication
 ---

 Key: SLING-3899
 URL: https://issues.apache.org/jira/browse/SLING-3899
 Project: Sling
  Issue Type: Improvement
  Components: Replication
Reporter: Marius Petria
Assignee: Tommaso Teofili
 Attachments: SLING-3899.1.diff, SLING-3899.2.diff, SLING-3899.diff


 Currently the content is accessed via an administrative session. We need to 
 pass a ResourceResolver via all APIs to ensure that the content is accessed 
 only be users that have the right.
 For rule triggered requests the actions should be done on the behalf of a 
 replication-service-user.



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


[jira] [Updated] (SLING-3899) Access content for replication on behalf of the user that triggered the replication

2014-10-15 Thread Marius Petria (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-3899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marius Petria updated SLING-3899:
-
Attachment: SLING-3899.3.diff

 Access content for replication on behalf of the user that triggered the 
 replication
 ---

 Key: SLING-3899
 URL: https://issues.apache.org/jira/browse/SLING-3899
 Project: Sling
  Issue Type: Improvement
  Components: Replication
Reporter: Marius Petria
Assignee: Tommaso Teofili
 Attachments: SLING-3899.1.diff, SLING-3899.2.diff, SLING-3899.3.diff, 
 SLING-3899.diff


 Currently the content is accessed via an administrative session. We need to 
 pass a ResourceResolver via all APIs to ensure that the content is accessed 
 only be users that have the right.
 For rule triggered requests the actions should be done on the behalf of a 
 replication-service-user.



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


[jira] [Resolved] (SLING-3899) Access content for replication on behalf of the user that triggered the replication

2014-10-15 Thread Tommaso Teofili (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-3899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tommaso Teofili resolved SLING-3899.

Resolution: Fixed

thanks again Marius, I've applied your latest patch in r1631965

 Access content for replication on behalf of the user that triggered the 
 replication
 ---

 Key: SLING-3899
 URL: https://issues.apache.org/jira/browse/SLING-3899
 Project: Sling
  Issue Type: Improvement
  Components: Replication
Reporter: Marius Petria
Assignee: Tommaso Teofili
 Attachments: SLING-3899.1.diff, SLING-3899.2.diff, SLING-3899.3.diff, 
 SLING-3899.diff


 Currently the content is accessed via an administrative session. We need to 
 pass a ResourceResolver via all APIs to ensure that the content is accessed 
 only be users that have the right.
 For rule triggered requests the actions should be done on the behalf of a 
 replication-service-user.



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


Re: FW: [PROPOSAL] Context-specific configuration for Apache Sling, Multitenancy

2014-10-15 Thread Carsten Ziegeler
Am 15.10.14 um 09:01 schrieb Stefan Seifert:
 hello carsten.
 
 like it! so each application defines one (or multiple) of such
 configuration annotation classes. the first get on an configuration
 object would expect an annotation class, and the second would be nice
 typed access to a configuration value. providing additional metadata
 per configuration parameter (e.g. for a configuration editor) would
 still be possible by adding annotations to the annotation methods.
 
 of course we somewhat misuse the annotation concept here because it's
 never used as annotation at all - but it works quite well and is very
 comfortable. the only drawback i see that such annotations will be
 presented as well to users in their IDEs when typing @... to see what
 annotations are available to annotate their classes.
Right, but given that you already see hundreds of annotations there...

 
 do you have a link where such a concept is defined in context of the
 new DS specification? using the same concept as a (new) DS version
 would be plus.
Sure, the spec can be found here
https://github.com/osgi/design/blob/master/rfcs/rfc0190/rfc-0190-Declarative_Services_Enhancements.pdf

 
 wouldn't it be an option to use a plain interface with default values
 as annotations? this comes close to what sling models supports
 today.
Yeah, sure - but I kind of like the more compact notation of an
annotation compared to having to annotate each field in the interface.
And an interface can define arbitrary methods, with arguments, complex
objects as return types etc. On the other hand annotations provide
exactly what you need for a configuration, the basic types and arrays
of those (ok, there is also Class allowed as a type).

I would be fine with going with interfaces as well - as long as we
have typed configurations objects which are a) easy to describe and
b) easy to use.

 
 my statement about support only types from JCR was not precise - i
 meant support all primitive types including string array plus map,
 but no custom or more advanced objects, because this would make
 things really complicated. currently a subset of primitive types is
 supported [1].

Ok.

Regards
Carsten

 
 stefan
 
 [1]
 http://wcm.io/config/api/usage-spi.html#Providing_parameter_definitions

 
 
 
 
 -Original Message- From: Carsten Ziegeler
 [mailto:cziege...@apache.org] Sent: Wednesday, October 15, 2014
 8:24 AM To: dev@sling.apache.org Subject: Re: FW: [PROPOSAL]
 Context-specific configuration for Apache Sling, Multitenancy
 
 In general, using typed objects is the preferred way to go, so I
 think a configuration object should be a type object and return
 configuration values in the correct type. Let's not fall back into
 the 80s and fiddle around with string conversions all over the
 place. Having a type for a configuration removes also the need for
 those ugly name constants and we could hopefully also get away with
 having ugly constants for default values.
 
 So what about using the approach we use in the new Declarative
 Service specification and you define a configuration as an
 annotation:
 
 public @interface MyConfiguration {
 
 int port() default 465;
 
 String host() default localhost;
 
 String userId; }
 
 This leaves us with a single place to define a type configuration
 object in combination with default values. We then define simple
 mapping rules from names to resource names.
 
 And we should also support *all* java types not just those JCR
 supports. Internally all numbers can be stored as long but the
 configuration object gives you an integer, char whatever.
 
 This is how I would like to deal with configurations in code.
 
 Carsten
 
 -- Carsten Ziegeler Adobe Research Switzerland 
 cziege...@apache.org


-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


Jenkins build is still unstable: sling-oak-it-1.6 #193

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-oak-it-1.6/193/



Jenkins build is still unstable: sling-oak-it-1.6 » Apache Sling Launchpad Testing #193

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-oak-it-1.6/org.apache.sling$org.apache.sling.launchpad.testing/193/



Jenkins build is back to normal : sling-contrib-1.6 » Apache Sling Replication Core #1294

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-contrib-1.6/org.apache.sling$org.apache.sling.replication.core/1294/



Jenkins build became unstable: sling-trunk-1.8 #299

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-trunk-1.8/299/changes



Jenkins build became unstable: sling-trunk-1.8 » Apache Sling Event Support #299

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-trunk-1.8/org.apache.sling$org.apache.sling.event/299/changes



Jenkins build is back to stable : sling-trunk-1.7 #1013

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-trunk-1.7/1013/changes



Jenkins build is back to stable : sling-trunk-1.7 » Apache Sling Resource-Based Discovery Service #1013

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-trunk-1.7/org.apache.sling$org.apache.sling.discovery.impl/1013/



RE: FW: [PROPOSAL] Context-specific configuration for Apache Sling, Multitenancy

2014-10-15 Thread Stefan Seifert

 do you have a link where such a concept is defined in context of the
 new DS specification? using the same concept as a (new) DS version
 would be plus.
Sure, the spec can be found here
https://github.com/osgi/design/blob/master/rfcs/rfc0190/rfc-0190-
Declarative_Services_Enhancements.pdf

cool. chapter 5.6 precisely describes the supported types and coercion rules, 
we should implement it exactly the same way.
in my view this decides whether to use a plain interface or an annotation type 
- do it the same way as DS (will be) doing it: with annotation types.

stefan


Jenkins build is still unstable: sling-oak-it-1.6 » Apache Sling Launchpad Testing #194

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-oak-it-1.6/org.apache.sling$org.apache.sling.launchpad.testing/194/



Jenkins build is still unstable: sling-oak-it-1.6 #194

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-oak-it-1.6/194/



Re: FW: [PROPOSAL] Context-specific configuration for Apache Sling, Multitenancy

2014-10-15 Thread Carsten Ziegeler
Am 15.10.14 um 10:56 schrieb Stefan Seifert:
 
 do you have a link where such a concept is defined in context of the
 new DS specification? using the same concept as a (new) DS version
 would be plus.
 Sure, the spec can be found here
 https://github.com/osgi/design/blob/master/rfcs/rfc0190/rfc-0190-
 Declarative_Services_Enhancements.pdf
 
 cool. chapter 5.6 precisely describes the supported types and coercion rules, 
 we should implement it exactly the same way.
 in my view this decides whether to use a plain interface or an annotation 
 type - do it the same way as DS (will be) doing it: with annotation types.

I would suggest so :)

However, one downside would be that you don't have hierarchical
configurations or maps - just scalar types and arrays of it.

Carsten

 
 stefan
 


-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


RE: FW: [PROPOSAL] Context-specific configuration for Apache Sling, Multitenancy

2014-10-15 Thread Stefan Seifert

However, one downside would be that you don't have hierarchical
configurations or maps - just scalar types and arrays of it.

support for maps we can add using a helper method - internally its stored as 
string array anyway.

hierarchical configurations could be modeled using annotation properties 
referencing other annotations - but the DS spec forbids this so i would vote to 
not support it. but an application could provide multiple configuration 
annotation types, e.g. one per aspect, so you do not have to define one single 
mega annotation with dozens of unrelated configuration properties.

stefan


Jenkins build is still unstable: sling-trunk-1.8 » Apache Sling Event Support #300

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-trunk-1.8/org.apache.sling$org.apache.sling.event/changes



Jenkins build is still unstable: sling-trunk-1.8 #300

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-trunk-1.8/changes



[jira] [Commented] (SLING-4016) Allow to override sling.max.calls per request

2014-10-15 Thread Bertrand Delacretaz (JIRA)

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

Bertrand Delacretaz commented on SLING-4016:


Added a test case in http://svn.apache.org/r1631988

 Allow to override sling.max.calls per request
 -

 Key: SLING-4016
 URL: https://issues.apache.org/jira/browse/SLING-4016
 Project: Sling
  Issue Type: Improvement
  Components: Engine
Affects Versions: Engine 2.3.6
Reporter: Alexandre Capt
Assignee: Felix Meschberger
 Fix For: Engine 2.3.8

 Attachments: 
 SLING-4016_-_Allow_to_override_sling_max_calls_per_request.patch


 sling.max.calls limits the number of scripts that can be included. In some 
 cases and especially for large trees, this number must be increased. But 
 increasing for all the request is a risk.
 It would be really useful and needed in some cases to allow a override for 
 certain under control requests. An easy way would be via a request 
 attribute.



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


org.apache.sling.engine release, should I wait for something?

2014-10-15 Thread Bertrand Delacretaz
Hi,

I'd like to release that bundle for
https://issues.apache.org/jira/browse/SLING-4016 - is someone planning
to make other changes to that bundle in the next few days?
If yes I can wait a bit.

-Bertrand


Jenkins build is still unstable: sling-trunk-1.8 #301

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-trunk-1.8/changes



Jenkins build is still unstable: sling-trunk-1.8 » Apache Sling Event Support #301

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-trunk-1.8/org.apache.sling$org.apache.sling.event/301/



[jira] [Created] (SLING-4052) Do not create Jcr packages when filevault is used

2014-10-15 Thread Marius Petria (JIRA)
Marius Petria created SLING-4052:


 Summary: Do not create Jcr packages when filevault is used
 Key: SLING-4052
 URL: https://issues.apache.org/jira/browse/SLING-4052
 Project: Sling
  Issue Type: Bug
  Components: Replication
Reporter: Marius Petria


Currently FileVaultReplicationPackage is based on temporary files, we should 
not also create jcr packages as they are not cleaned up properly. We should 
instead provide a JcrReplicationPackage implementation.



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


Jenkins build is still unstable: sling-trunk-1.8 » Apache Sling Event Support #302

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-trunk-1.8/org.apache.sling$org.apache.sling.event/changes



Jenkins build is still unstable: sling-trunk-1.8 #302

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-trunk-1.8/changes



[jira] [Updated] (SLING-4052) Do not create Jcr packages when filevault is used

2014-10-15 Thread Marius Petria (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marius Petria updated SLING-4052:
-
Attachment: SLING-4052.diff

I also removed the need to have a shared package builder service, it can be 
create on the fly for each agent.

 Do not create Jcr packages when filevault is used
 -

 Key: SLING-4052
 URL: https://issues.apache.org/jira/browse/SLING-4052
 Project: Sling
  Issue Type: Bug
  Components: Replication
Reporter: Marius Petria
 Attachments: SLING-4052.diff


 Currently FileVaultReplicationPackage is based on temporary files, we should 
 not also create jcr packages as they are not cleaned up properly. We should 
 instead provide a JcrReplicationPackage implementation.



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


[jira] [Updated] (SLING-4052) Do not create Jcr packages when filevault is used

2014-10-15 Thread Marius Petria (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marius Petria updated SLING-4052:
-
Attachment: SLING-4052.1.diff

 Do not create Jcr packages when filevault is used
 -

 Key: SLING-4052
 URL: https://issues.apache.org/jira/browse/SLING-4052
 Project: Sling
  Issue Type: Bug
  Components: Replication
Reporter: Marius Petria
 Attachments: SLING-4052.1.diff


 Currently FileVaultReplicationPackage is based on temporary files, we should 
 not also create jcr packages as they are not cleaned up properly. We should 
 instead provide a JcrReplicationPackage implementation.



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


[jira] [Updated] (SLING-4052) Do not create Jcr packages when filevault is used

2014-10-15 Thread Marius Petria (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marius Petria updated SLING-4052:
-
Attachment: (was: SLING-4052.diff)

 Do not create Jcr packages when filevault is used
 -

 Key: SLING-4052
 URL: https://issues.apache.org/jira/browse/SLING-4052
 Project: Sling
  Issue Type: Bug
  Components: Replication
Reporter: Marius Petria
 Attachments: SLING-4052.1.diff


 Currently FileVaultReplicationPackage is based on temporary files, we should 
 not also create jcr packages as they are not cleaned up properly. We should 
 instead provide a JcrReplicationPackage implementation.



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


[jira] [Created] (SLING-4053) Deprecate queue types IGNORE and DROP

2014-10-15 Thread Carsten Ziegeler (JIRA)
Carsten Ziegeler created SLING-4053:
---

 Summary: Deprecate queue types IGNORE and DROP
 Key: SLING-4053
 URL: https://issues.apache.org/jira/browse/SLING-4053
 Project: Sling
  Issue Type: Task
  Components: Extensions
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
 Fix For: Event 3.3.16


The queue types DROP and IGNORE have no real use case and both can be emulated 
with special job consumers. On the other hand as these complicate the job 
handling, we should deprecate and not support them anymore.



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


[jira] [Assigned] (SLING-3836) Allow deep vs shallow replication options

2014-10-15 Thread Tommaso Teofili (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tommaso Teofili reassigned SLING-3836:
--

Assignee: Tommaso Teofili

 Allow deep vs shallow replication options
 -

 Key: SLING-3836
 URL: https://issues.apache.org/jira/browse/SLING-3836
 Project: Sling
  Issue Type: Improvement
  Components: Replication
Reporter: Marius Petria
Assignee: Tommaso Teofili
  Labels: replication

 Users of replication should have a way to choose whether to replicate a node
 - deep: including all its subtree
 - shallow: including just he node properties
 Typically an user editing content visually will trigger a replication of only 
 the edited content (shallow).
 However an user importing a lot of content will trigger a deep replication 
 after all content is imported.
 Shallow replication is more targeted and produces the least changes in the 
 system and it is probably best fitted to be the default replication option.



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


[jira] [Created] (SLING-4054) Have a package builder based on JcrPackages

2014-10-15 Thread Marius Petria (JIRA)
Marius Petria created SLING-4054:


 Summary: Have a package builder based on JcrPackages
 Key: SLING-4054
 URL: https://issues.apache.org/jira/browse/SLING-4054
 Project: Sling
  Issue Type: Bug
  Components: Replication
Reporter: Marius Petria


Currently we have a FileVaultPackage implementation based on files but we need 
a package implementation based on JcrPackage



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


[jira] [Created] (SLING-4055) Sling Models Model annotation should be @Documented

2014-10-15 Thread Stefan Seifert (JIRA)
Stefan Seifert created SLING-4055:
-

 Summary: Sling Models Model annotation should be @Documented
 Key: SLING-4055
 URL: https://issues.apache.org/jira/browse/SLING-4055
 Project: Sling
  Issue Type: Improvement
  Components: Extensions
Affects Versions: Sling Models API 1.1.0
Reporter: Stefan Seifert
Assignee: Stefan Seifert
Priority: Trivial
 Fix For: Sling Models API 1.2.0


currently none of the sling models API annotations have the @Documented 
annotations - they show not up in javadocs. for most annotations this is 
correct (implementation dateils).

but the @Model annotation should show up in documentation - holding important 
information for the user of the class (eg. from which class can it be adapted)



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


[jira] [Resolved] (SLING-4055) Sling Models Model annotation should be @Documented

2014-10-15 Thread Stefan Seifert (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Seifert resolved SLING-4055.
---
Resolution: Fixed

Completed: At revision: 1632005  


 Sling Models Model annotation should be @Documented
 -

 Key: SLING-4055
 URL: https://issues.apache.org/jira/browse/SLING-4055
 Project: Sling
  Issue Type: Improvement
  Components: Extensions
Affects Versions: Sling Models API 1.1.0
Reporter: Stefan Seifert
Assignee: Stefan Seifert
Priority: Trivial
  Labels: models
 Fix For: Sling Models API 1.2.0


 currently none of the sling models API annotations have the @Documented 
 annotations - they show not up in javadocs. for most annotations this is 
 correct (implementation dateils).
 but the @Model annotation should show up in documentation - holding important 
 information for the user of the class (eg. from which class can it be adapted)



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


[jira] [Updated] (SLING-4056) ModelFactory.canCreateFromAdaptable reports false errors when using adapters on models

2014-10-15 Thread Stefan Seifert (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Seifert updated SLING-4056:
--
Attachment: ImplementsExtendsTest.patch

 ModelFactory.canCreateFromAdaptable reports false errors when using 
 adapters on models
 

 Key: SLING-4056
 URL: https://issues.apache.org/jira/browse/SLING-4056
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Affects Versions: Sling Models Impl 1.2.0
Reporter: Stefan Seifert
Priority: Critical
 Fix For: Sling Models Impl 1.2.0

 Attachments: ImplementsExtendsTest.patch


 SLING-3709 introduced a new ModelFactory with methods for checking if 
 adaption is possible and adapt to a model with enhanced exception support.
 the current implementation does not support the adapters variant of models, 
 where the model is adapted to an alternate adapter class (see 
 [documentation|http://sling.apache.org/documentation/bundles/models.html#specifying-an-alternate-adapter-class-since-sling-models-110]).
 adaption of such models via adaptTo still works, but false errors are reported
 {noformat}
 ERROR org.apache.sling.models.impl.ModelAdapterFactory - Provided Adapter 
 class does not have a Model annotation
 {noformat}
 if using the factory method ModelFactory.canCreateFromAdaptable an exception 
 is thrown - this is wrong.
 attached is a patch that extends the unit test to include calls to 
 canCreateFromAdaptable - all fail [^ImplementsExtendsTest.patch]
 [~kwin]: can you have a look?



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


Jenkins build became unstable: sling-trunk-1.6 » Apache Sling Resource-Based Discovery Service #2647

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-trunk-1.6/org.apache.sling$org.apache.sling.discovery.impl/2647/



Jenkins build became unstable: sling-trunk-1.6 #2647

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-trunk-1.6/2647/changes



[jira] [Created] (SLING-4057) ModelFactory: Ordering of method arguments inconsistent

2014-10-15 Thread Stefan Seifert (JIRA)
Stefan Seifert created SLING-4057:
-

 Summary: ModelFactory: Ordering of method arguments inconsistent
 Key: SLING-4057
 URL: https://issues.apache.org/jira/browse/SLING-4057
 Project: Sling
  Issue Type: Improvement
  Components: Extensions
Affects Versions: Sling Models Impl 1.2.0
Reporter: Stefan Seifert
Assignee: Stefan Seifert
Priority: Trivial
 Fix For: Sling Models Impl 1.2.0


the ordering of the methods arguments is inconstant:

{code:java}
public ModelType ModelType createModel(Object adaptable, ClassModelType 
type);

public boolean canCreateFromAdaptable(Class? modelClass, Object adaptable)
{code}

class is last argument for the one method, first argument for the other.



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


Re: FW: [PROPOSAL] Context-specific configuration for Apache Sling, Multitenancy

2014-10-15 Thread Justin Edelson
Hi Carsten,
I have two concerns with this model:
1) Creating an annotation class can be a bit heavyweight. If I want to
just store a common value used across multiple scripts, doing so would
require creating this class, compiling it, deploying the bundle, etc.
vs. just adding a node property and referencing the property name from
my scripts (the constant is a nice-to-have, but not strictly
necessary). This is a non-issue for DS because the configuration
annotation is tightly coupled with the configured component. But to my
mind, one of the key targets for this new configuration structure is
scripts.
2) I'm assuming that the lookup key for these configuration objects is
the class name. IMHO, we need some kind of differentiator, see for
example my OAuth example earlier in this thread.

I'm also a bit concerned about the use of annotations in this way
because they can't be extended (at least I think this is true). I'm
not sure if this is a solved issue for DS configurations. I'll have to
read more of the spec to see how/if this problem is being solved
there.

Regards,
Justin

On Wed, Oct 15, 2014 at 2:24 AM, Carsten Ziegeler cziege...@apache.org wrote:
 In general, using typed objects is the preferred way to go, so I think a
 configuration object should be a type object and return configuration
 values in the correct type. Let's not fall back into the 80s and fiddle
 around with string conversions all over the place.
 Having a type for a configuration removes also the need for those ugly
 name constants and we could hopefully also get away with having ugly
 constants for default values.

 So what about using the approach we use in the new Declarative Service
 specification and you define a configuration as an annotation:

 public @interface MyConfiguration {

int port() default 465;

String host() default localhost;

String userId;
 }

 This leaves us with a single place to define a type configuration object
 in combination with default values. We then define simple mapping rules
 from names to resource names.

 And we should also support *all* java types not just those JCR supports.
 Internally all numbers can be stored as long but the configuration
 object gives you an integer, char whatever.

 This is how I would like to deal with configurations in code.

 Carsten

 --
 Carsten Ziegeler
 Adobe Research Switzerland
 cziege...@apache.org


[jira] [Updated] (SLING-4056) ModelFactory.canCreateFromAdaptable reports false errors when using adapters on models

2014-10-15 Thread Stefan Seifert (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Seifert updated SLING-4056:
--
Labels: models  (was: )

 ModelFactory.canCreateFromAdaptable reports false errors when using 
 adapters on models
 

 Key: SLING-4056
 URL: https://issues.apache.org/jira/browse/SLING-4056
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Affects Versions: Sling Models Impl 1.2.0
Reporter: Stefan Seifert
Priority: Critical
  Labels: models
 Fix For: Sling Models Impl 1.2.0

 Attachments: ImplementsExtendsTest.patch


 SLING-3709 introduced a new ModelFactory with methods for checking if 
 adaption is possible and adapt to a model with enhanced exception support.
 the current implementation does not support the adapters variant of models, 
 where the model is adapted to an alternate adapter class (see 
 [documentation|http://sling.apache.org/documentation/bundles/models.html#specifying-an-alternate-adapter-class-since-sling-models-110]).
 adaption of such models via adaptTo still works, but false errors are reported
 {noformat}
 ERROR org.apache.sling.models.impl.ModelAdapterFactory - Provided Adapter 
 class does not have a Model annotation
 {noformat}
 if using the factory method ModelFactory.canCreateFromAdaptable an exception 
 is thrown - this is wrong.
 attached is a patch that extends the unit test to include calls to 
 canCreateFromAdaptable - all fail [^ImplementsExtendsTest.patch]
 [~kwin]: can you have a look?



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


[jira] [Resolved] (SLING-4057) ModelFactory: Ordering of method arguments inconsistent

2014-10-15 Thread Stefan Seifert (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Seifert resolved SLING-4057.
---
Resolution: Fixed

Completed: At revision: 1632023  

i changed the argument order of the latter method (before the new API is 
released)

 ModelFactory: Ordering of method arguments inconsistent
 ---

 Key: SLING-4057
 URL: https://issues.apache.org/jira/browse/SLING-4057
 Project: Sling
  Issue Type: Improvement
  Components: Extensions
Affects Versions: Sling Models Impl 1.2.0
Reporter: Stefan Seifert
Assignee: Stefan Seifert
Priority: Trivial
  Labels: models
 Fix For: Sling Models Impl 1.2.0


 the ordering of the methods arguments is inconstant:
 {code:java}
 public ModelType ModelType createModel(Object adaptable, ClassModelType 
 type);
 public boolean canCreateFromAdaptable(Class? modelClass, Object adaptable)
 {code}
 class is last argument for the one method, first argument for the other.



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


[jira] [Updated] (SLING-4056) ModelFactory.canCreateFromAdaptable reports false errors when using adapters on models

2014-10-15 Thread Stefan Seifert (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Seifert updated SLING-4056:
--
Attachment: ImplementsExtendsTest.patch

updated patch [^ImplementsExtendsTest.patch] due to SLING-4057

unfortunately it seems there is currently no unit test at all for the new 
ModelFactory

 ModelFactory.canCreateFromAdaptable reports false errors when using 
 adapters on models
 

 Key: SLING-4056
 URL: https://issues.apache.org/jira/browse/SLING-4056
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Affects Versions: Sling Models Impl 1.2.0
Reporter: Stefan Seifert
Priority: Critical
  Labels: models
 Fix For: Sling Models Impl 1.2.0

 Attachments: ImplementsExtendsTest.patch


 SLING-3709 introduced a new ModelFactory with methods for checking if 
 adaption is possible and adapt to a model with enhanced exception support.
 the current implementation does not support the adapters variant of models, 
 where the model is adapted to an alternate adapter class (see 
 [documentation|http://sling.apache.org/documentation/bundles/models.html#specifying-an-alternate-adapter-class-since-sling-models-110]).
 adaption of such models via adaptTo still works, but false errors are reported
 {noformat}
 ERROR org.apache.sling.models.impl.ModelAdapterFactory - Provided Adapter 
 class does not have a Model annotation
 {noformat}
 if using the factory method ModelFactory.canCreateFromAdaptable an exception 
 is thrown - this is wrong.
 attached is a patch that extends the unit test to include calls to 
 canCreateFromAdaptable - all fail [^ImplementsExtendsTest.patch]
 [~kwin]: can you have a look?



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


RE: FW: [PROPOSAL] Context-specific configuration for Apache Sling, Multitenancy

2014-10-15 Thread Stefan Seifert

[...] But to my
mind, one of the key targets for this new configuration structure is
scripts.

this does not match the experience of our projects. we need those parameters 
only in rare occasions directly in the scripts (e.g. sightly), and in most time 
in the java code (models the scripts, different layers of business logic). but 
of course your experience may be different.

stefan


Re: FW: [PROPOSAL] Context-specific configuration for Apache Sling, Multitenancy

2014-10-15 Thread Bertrand Delacretaz
On Wed, Oct 15, 2014 at 3:48 PM, Stefan Seifert sseif...@pro-vision.de wrote:
 ...this does not match the experience of our projects. we need those 
 parameters only in rare occasions directly
 in the scripts (e.g. sightly)...

As usual, IMO having a shared list of use cases (wiki?) would help a
lot in getting consensus on what's needed and how to get there. ATM it
looks like there are quite different visions of this stuff.

-Bertrand


[jira] [Created] (SLING-4058) ResourceResolverProxyTest fails when running on Oak

2014-10-15 Thread Bertrand Delacretaz (JIRA)
Bertrand Delacretaz created SLING-4058:
--

 Summary: ResourceResolverProxyTest fails when running on Oak
 Key: SLING-4058
 URL: https://issues.apache.org/jira/browse/SLING-4058
 Project: Sling
  Issue Type: Bug
  Components: Oak
Reporter: Bertrand Delacretaz
Assignee: Bertrand Delacretaz


As seen at https://builds.apache.org/view/S-Z/view/Sling/job/sling-oak-it-1.6 
and on my box, tests fail with

bq. Timeout waiting for 
org/apache/sling/api/resource/ResourceResolverMapping/CHANGED event, after 
1 msec, 

and as a result the test takes age to run.





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


Re: FW: [PROPOSAL] Context-specific configuration for Apache Sling, Multitenancy

2014-10-15 Thread Carsten Ziegeler
Am 15.10.14 um 15:40 schrieb Justin Edelson:
 Hi Carsten,
 I have two concerns with this model:
 1) Creating an annotation class can be a bit heavyweight. If I want to
 just store a common value used across multiple scripts, doing so would
 require creating this class, compiling it, deploying the bundle, etc.
 vs. just adding a node property and referencing the property name from
 my scripts (the constant is a nice-to-have, but not strictly
 necessary). This is a non-issue for DS because the configuration
 annotation is tightly coupled with the configured component. But to my
 mind, one of the key targets for this new configuration structure is
 scripts.

The use cases I know and have heard of are not script related, the
configurations are evaluated on java code, so I have a bundle already
and creating the annotation then is easy. But I see your point and I see
no reason why we shouldn't support the direct access of properties but
recommend to use properly typed objects.

 2) I'm assuming that the lookup key for these configuration objects is
 the class name. IMHO, we need some kind of differentiator, see for
 example my OAuth example earlier in this thread.

I haven't thought of this part yet, I've just stated my strong wish
for strongly typed configuration objects :)

 I'm also a bit concerned about the use of annotations in this way
 because they can't be extended (at least I think this is true). I'm
 not sure if this is a solved issue for DS configurations. I'll have to
 read more of the spec to see how/if this problem is being solved
 there.
 
In DS its simple, there is no extension - annotations don't support
inheritance. But you can use as many annotations, so instead of doing
annotation B extends annotation A and then use B, you use A and B.

Carsten


 Regards,
 Justin
 
 On Wed, Oct 15, 2014 at 2:24 AM, Carsten Ziegeler cziege...@apache.org 
 wrote:
 In general, using typed objects is the preferred way to go, so I think a
 configuration object should be a type object and return configuration
 values in the correct type. Let's not fall back into the 80s and fiddle
 around with string conversions all over the place.
 Having a type for a configuration removes also the need for those ugly
 name constants and we could hopefully also get away with having ugly
 constants for default values.

 So what about using the approach we use in the new Declarative Service
 specification and you define a configuration as an annotation:

 public @interface MyConfiguration {

int port() default 465;

String host() default localhost;

String userId;
 }

 This leaves us with a single place to define a type configuration object
 in combination with default values. We then define simple mapping rules
 from names to resource names.

 And we should also support *all* java types not just those JCR supports.
 Internally all numbers can be stored as long but the configuration
 object gives you an integer, char whatever.

 This is how I would like to deal with configurations in code.

 Carsten

 --
 Carsten Ziegeler
 Adobe Research Switzerland
 cziege...@apache.org
 


-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


Jenkins build is still unstable: sling-trunk-1.8 #303

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-trunk-1.8/changes



Jenkins build is still unstable: sling-trunk-1.8 » Apache Sling Event Support #303

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-trunk-1.8/org.apache.sling$org.apache.sling.event/changes



[jira] [Updated] (SLING-4059) Sling Models: ResourceResolverInjector is obsolete

2014-10-15 Thread Stefan Seifert (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Seifert updated SLING-4059:
--
Attachment: remove-resourceresolver-injector.patch

 Sling Models: ResourceResolverInjector is obsolete
 --

 Key: SLING-4059
 URL: https://issues.apache.org/jira/browse/SLING-4059
 Project: Sling
  Issue Type: Improvement
  Components: Extensions
Affects Versions: Sling Models Implementation 1.1.0
Reporter: Stefan Seifert
Priority: Minor
 Fix For: Sling Models Impl 1.2.0

 Attachments: remove-resourceresolver-injector.patch


 the ResourceResolverInjector can be considered as obsolete since Sling 
 Models 1.1 because it is superseded by the SlingObjectInjector
 attached is a patch that removes it and redirects the unit test to 
 SlingObjectInjector: [^remove-resourceresolver-injector.patch]
 there should be no problem witch backward compatibility - save one (rather 
 hypothetical) issue: the ResourceResolverInjector checks only for the field 
 name resourceResolver, and not for the class. so if a user has defined a 
 field of type Object named resourceResolver it worked with 
 ResourceResolverInjector, but will not work with SlingObjectInjector. but i 
 suppose this would be a very uncommon usage.
 [~justinedelson] please decide if we can remove the ResourceResolverInjector  
 or should leave it.



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


Jenkins build is back to stable : sling-trunk-1.6 » Apache Sling Resource-Based Discovery Service #2648

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-trunk-1.6/org.apache.sling$org.apache.sling.discovery.impl/2648/



[jira] [Created] (SLING-4060) Create specific factories for pubsync agents and queuing agents

2014-10-15 Thread Marius Petria (JIRA)
Marius Petria created SLING-4060:


 Summary: Create specific factories for pubsync agents and queuing 
agents
 Key: SLING-4060
 URL: https://issues.apache.org/jira/browse/SLING-4060
 Project: Sling
  Issue Type: Bug
  Components: Replication
Reporter: Marius Petria


Create specific factories for pubsync agents and queuing agents.

{code}
{
jcr:primaryType: sling:OsgiConfig,
name: pubsync,

serviceName : replicationService,

packageBuilder.type : vlt,

endpoints : [ 
http://localhost:4503/libs/sling/replication/services/exporters/reverse-pubsync;,

http://localhost:4504/libs/sling/replication/services/exporters/reverse-pubsync;,

http://localhost:4505/libs/sling/replication/services/exporters/reverse-pubsync;],
endpoints.strategy : All,

queueProvider.target : (name=sjh),

queueDistributionStrategy.target: (name=error),

transportAuthenticationProvider.target : (name=publishAdmin)
}
{code}

{code}
{
jcr:primaryType: sling:OsgiConfig,
name: reverse,

serviceName : replicationService,

packageBuilder.type : vlt,

queueProvider.target : (name=sjh),

queueDistributionStrategy: (name=error),

trigger0: [
type=jcrEvent,
path=/content/usergenerated,
servicename=replicationService
]
}
{code}



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


[jira] [Resolved] (SLING-4052) Do not create Jcr packages when filevault is used

2014-10-15 Thread Tommaso Teofili (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tommaso Teofili resolved SLING-4052.

Resolution: Fixed
  Assignee: Tommaso Teofili

fixed in r1632062

 Do not create Jcr packages when filevault is used
 -

 Key: SLING-4052
 URL: https://issues.apache.org/jira/browse/SLING-4052
 Project: Sling
  Issue Type: Bug
  Components: Replication
Reporter: Marius Petria
Assignee: Tommaso Teofili
 Attachments: SLING-4052.1.diff


 Currently FileVaultReplicationPackage is based on temporary files, we should 
 not also create jcr packages as they are not cleaned up properly. We should 
 instead provide a JcrReplicationPackage implementation.



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


[jira] [Created] (SLING-4061) Deadlock involving discovery services at startup with Oak

2014-10-15 Thread Bertrand Delacretaz (JIRA)
Bertrand Delacretaz created SLING-4061:
--

 Summary: Deadlock involving discovery services at startup with Oak
 Key: SLING-4061
 URL: https://issues.apache.org/jira/browse/SLING-4061
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Reporter: Bertrand Delacretaz


I just got a deadlock at startup when starting the launchpad integration tests 
instance on sling trunk revision 1632058 (so starting with Oak):

{code}
export DBG=-Xmx1G  -XX:MaxPermSize=256m 
-agentlib:jdwp=transport=dt_socket,address=30303,server=y,suspend=n
export MAVEN_OPTS=-Xmx1G  -XX:MaxPermSize=256m $DBG -Dsling.run.modes=oak
cd launchpad/testing
mvn launchpad:run
{code}

I'll attach the stack trace. The discovery HeartbeatHandler, and 
DiscoveryServiceImpl classes are involved.



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


[jira] [Commented] (SLING-4061) Deadlock involving discovery services at startup with Oak

2014-10-15 Thread Robert Munteanu (JIRA)

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

Robert Munteanu commented on SLING-4061:


There is an issue is in the {{DiscoveryServiceImpl}} activate method, but I'm 
not sure it's the root cause. The class leaks a reference to itself before the 
{{activate()}} method completes:

{code:java}
// make sure the first heartbeat is issued as soon as possible - which
// is right after this service starts. since the two (discoveryservice
// and heartbeatHandler need to know each other, the discoveryservice
// is passed on to the heartbeatHandler in this initialize call).
heartbeatHandler.initialize(this,
clusterViewService.getIsolatedClusterViewId());

final TopologyEventListener[] registeredServices;
synchronized (lock) {
registeredServices = this.eventListeners;
doUpdateProperties();

TopologyViewImpl newView = (TopologyViewImpl) getTopology();
TopologyEvent event = new TopologyEvent(Type.TOPOLOGY_INIT, null,
newView);
for (final TopologyEventListener da : registeredServices) {
sendTopologyEvent(da, event);
}
activated = true;
oldView = newView;
}
{code}

The deadlock itself is a lock ordering issue

- in thread pool-5-thread-1 the HeartbeatHandler wants to issue an update and 
thread and holds the DiscoveryServiceImpl.lock lock but can't lock the 
SegmentNodeStoreService lock
- in thread CM Event Dispatcher... the SegmentNodeStoreService holds its own 
lock and the call stack ends up trying to invoke 
DiscoveryServiceImpl.bindTopologyEventListener, which needs the 
DiscoveryServiceImpl.lock

I wonder whether we need more fine-grained locking in the DiscoveryServiceImpl 
- a single lock object seems to coarse-grained, especially since a lot seems to 
happen during calls like updateProperties(), including invocation of foreign 
code ( notifying event listeners ) which is a bit worrisome - invoking foreign 
code with locks held is prone to deadlocks.

Another alternative is to make make use of concurrent collections for e.g. 
event listeners, but I'm not sure we don't get bitten by the fact that they are 
weakly consistent.


 Deadlock involving discovery services at startup with Oak
 -

 Key: SLING-4061
 URL: https://issues.apache.org/jira/browse/SLING-4061
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Reporter: Bertrand Delacretaz
 Attachments: discovery-deadlock.txt


 I just got a deadlock at startup when starting the launchpad integration 
 tests instance on sling trunk revision 1632058 (so starting with Oak):
 {code}
 export DBG=-Xmx1G  -XX:MaxPermSize=256m 
 -agentlib:jdwp=transport=dt_socket,address=30303,server=y,suspend=n
 export MAVEN_OPTS=-Xmx1G  -XX:MaxPermSize=256m $DBG -Dsling.run.modes=oak
 cd launchpad/testing
 mvn launchpad:run
 {code}
 I'll attach the stack trace. The discovery HeartbeatHandler, and 
 DiscoveryServiceImpl classes are involved.
 The deadlock happens often on my box (macosx 10.9.5, java version 
 1.7.0_45), with the same deadlock pattern AFAICS.



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


Build failed in Jenkins: sling-trunk-1.6 » Apache Sling Models API #2649

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-trunk-1.6/org.apache.sling$org.apache.sling.models.api/2649/

--
[...truncated 123 lines...]
[INFO]  + return java.lang.String
[INFO]  + class org.apache.sling.models.factory.InvalidModelException
[INFO]  + access final
[INFO]  + extends java.lang.Exception
[INFO]  + extends java.lang.RuntimeException
[INFO]  + extends java.lang.Throwable
[INFO]  + implements java.io.Serializable
[INFO]  + method init(java.lang.String)
[INFO]  + method clone()
[INFO]  + access protected
[INFO]  + method equals(java.lang.Object)
[INFO]  + return boolean
[INFO]  + method fillInStackTrace()
[INFO]  + return java.lang.Throwable
[INFO]  + method finalize()
[INFO]  + access protected
[INFO]  + method getCause()
[INFO]  + return java.lang.Throwable
[INFO]  + method getLocalizedMessage()
[INFO]  + return java.lang.String
[INFO]  + method getMessage()
[INFO]  + return java.lang.String
[INFO]  + method getStackTrace()
[INFO]  + return java.lang.StackTraceElement[]
[INFO]  + method hashCode()
[INFO]  + return int
[INFO]  + method initCause(java.lang.Throwable)
[INFO]  + return java.lang.Throwable
[INFO]  + method printStackTrace()
[INFO]  + method printStackTrace(java.io.PrintStream)
[INFO]  + method printStackTrace(java.io.PrintWriter)
[INFO]  + method setStackTrace(java.lang.StackTraceElement[])
[INFO]  + method toString()
[INFO]  + return java.lang.String
[INFO]  + class org.apache.sling.models.factory.MissingElementsException
[INFO]  + access final
[INFO]  + extends java.lang.Exception
[INFO]  + extends java.lang.RuntimeException
[INFO]  + extends java.lang.Throwable
[INFO]  + implements java.io.Serializable
[INFO]  + method 
init(Ljava/lang/String;Ljava/util/Collection+Ljava/lang/reflect/AnnotatedElement;;Ljava/lang/Class*;)
[INFO]  + method clone()
[INFO]  + access protected
[INFO]  + method equals(java.lang.Object)
[INFO]  + return boolean
[INFO]  + method fillInStackTrace()
[INFO]  + return java.lang.Throwable
[INFO]  + method finalize()
[INFO]  + access protected
[INFO]  + method getCause()
[INFO]  + return java.lang.Throwable
[INFO]  + method getLocalizedMessage()
[INFO]  + return java.lang.String
[INFO]  + method getMessage()
[INFO]  + return java.lang.String
[INFO]  + method getMissingElements()
[INFO]  + return 
java.util.Collection+Ljava.lang.reflect.AnnotatedElement;
[INFO]  + method getStackTrace()
[INFO]  + return java.lang.StackTraceElement[]
[INFO]  + method getType()
[INFO]  + return java.lang.Class*
[INFO]  + method hashCode()
[INFO]  + return int
[INFO]  + method initCause(java.lang.Throwable)
[INFO]  + return java.lang.Throwable
[INFO]  + method printStackTrace()
[INFO]  + method printStackTrace(java.io.PrintStream)
[INFO]  + method printStackTrace(java.io.PrintWriter)
[INFO]  + method setStackTrace(java.lang.StackTraceElement[])
[INFO]  + method toString()
[INFO]  + return java.lang.String
[INFO]  + interface org.apache.sling.models.factory.ModelFactory
[INFO]  + access abstract
[INFO]  + method 
canCreateFromAdaptable(Ljava/lang/Object;Ljava/lang/Class*;)
[INFO]  + access abstract
[INFO]  + return boolean
[INFO]  + method 
createModel(Ljava/lang/Object;Ljava/lang/ClassTModelType;;)
[INFO]  + access abstract
[INFO]  + method isModelClass(Ljava/lang/Class*;)
[INFO]  + access abstract
[INFO]  + return boolean
[INFO]  + version 1.0.0
[INFO] 
---
[INFO]   org.apache.sling.models.spiunchanged  1.0.2
  1.0.2  1.0.2  - 
[INFO] 
---
[INFO]   org.apache.sling.models.spi.injectorspecific   unchanged  1.0.0
  1.0.0  1.0.0  - 
[INFO] 
---
[INFO] Baseline analysis complete, 0 error(s), 0 warning(s)
[INFO] 
[INFO] --- maven-install-plugin:2.5.1:install (default-install) @ 
org.apache.sling.models.api ---
[INFO] Installing 

[jira] [Updated] (SLING-3899) Access content for replication on behalf of the user that triggered the replication

2014-10-15 Thread Marius Petria (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-3899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marius Petria updated SLING-3899:
-
Attachment: SLING-3899.4.diff

Changed the code to rely on a authorization strategy rather than on a exporter 
strategy as authorization should be be a separate facet.

 Access content for replication on behalf of the user that triggered the 
 replication
 ---

 Key: SLING-3899
 URL: https://issues.apache.org/jira/browse/SLING-3899
 Project: Sling
  Issue Type: Improvement
  Components: Replication
Reporter: Marius Petria
Assignee: Tommaso Teofili
 Attachments: SLING-3899.1.diff, SLING-3899.2.diff, SLING-3899.3.diff, 
 SLING-3899.4.diff, SLING-3899.diff


 Currently the content is accessed via an administrative session. We need to 
 pass a ResourceResolver via all APIs to ensure that the content is accessed 
 only be users that have the right.
 For rule triggered requests the actions should be done on the behalf of a 
 replication-service-user.



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


Jenkins build is still unstable: sling-trunk-1.8 » Apache Sling Event Support #304

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-trunk-1.8/org.apache.sling$org.apache.sling.event/304/



Jenkins build is still unstable: sling-trunk-1.8 #304

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-trunk-1.8/changes



OSGi events delayed with Oak?

2014-10-15 Thread Bertrand Delacretaz
Hi,

I'm investigating SLING-4058 and it looks like
org/apache/sling/api/resource/ResourceResolverMapping/CHANGED are
sometimes delayed when running that test on Oak.

I can dig deeper, but if someone has clues they are welcome!

Here's the scenario:

1) ResourceResolverTest [1] creates mapping nodes under /etc/map and
calls session.save()

2) An OSGi EventHandler listens for ResourceResolverMapping/CHANGED
events and increments a counter

3) The test polls that counter to know when it's safe to continue testing

This works fine with Jackrabbit, but on Oak (TarMK) sometimes the
ResourceResolverMapping/CHANGED events are sent to the EventHandler
more than 10 seconds after the session.save() call. Other times they
are sent immediately.

-Bertrand

[1] 
https://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/serversidetests/ResourceResolverTest.java

[2] 
https://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/events/EventsCounterImpl.java


Jenkins build is back to normal : sling-trunk-1.6 » Apache Sling Models API #2650

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-trunk-1.6/org.apache.sling$org.apache.sling.models.api/2650/



Jenkins build is back to normal : sling-trunk-1.6 #2650

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-trunk-1.6/2650/changes



Jenkins build is unstable: sling-oak-it-1.6 » Apache Sling Launchpad Testing #197

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-oak-it-1.6/org.apache.sling$org.apache.sling.launchpad.testing/197/



Jenkins build is unstable: sling-oak-it-1.6 #197

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-oak-it-1.6/197/



Jenkins build is still unstable: sling-trunk-1.8 » Apache Sling Event Support #305

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-trunk-1.8/org.apache.sling$org.apache.sling.event/305/



Jenkins build is still unstable: sling-trunk-1.8 #305

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-trunk-1.8/changes



Jenkins build is back to normal : sling-healthcheck-1.6 #514

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-healthcheck-1.6/514/



Jenkins build is back to stable : sling-trunk-1.8 » Apache Sling Event Support #306

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-trunk-1.8/org.apache.sling$org.apache.sling.event/306/changes



Jenkins build is back to stable : sling-trunk-1.8 #306

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-trunk-1.8/306/changes



Build failed in Jenkins: sling-oak-it-1.6 » Apache Sling Launchpad Testing #198

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-oak-it-1.6/org.apache.sling$org.apache.sling.launchpad.testing/198/

--
[...truncated 155 lines...]
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.scripting.core/2.0.28/org.apache.sling.scripting.core-2.0.28.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/org.apache.sling$org.apache.sling.launchpad.testing/ws/target/classes/resources/bundles/0/org.apache.sling.scripting.core-2.0.28.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.scripting.javascript/2.0.14/org.apache.sling.scripting.javascript-2.0.14.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/org.apache.sling$org.apache.sling.launchpad.testing/ws/target/classes/resources/bundles/0/org.apache.sling.scripting.javascript-2.0.14.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.scripting.jsp/2.1.4/org.apache.sling.scripting.jsp-2.1.4.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/org.apache.sling$org.apache.sling.launchpad.testing/ws/target/classes/resources/bundles/0/org.apache.sling.scripting.jsp-2.1.4.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.scripting.jsp.taglib/2.2.4/org.apache.sling.scripting.jsp.taglib-2.2.4.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/org.apache.sling$org.apache.sling.launchpad.testing/ws/target/classes/resources/bundles/0/org.apache.sling.scripting.jsp.taglib-2.2.4.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/geronimo/bundles/jstl/1.2_1/jstl-1.2_1.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/org.apache.sling$org.apache.sling.launchpad.testing/ws/target/classes/resources/bundles/0/jstl-1.2_1.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.models.api/1.1.0/org.apache.sling.models.api-1.1.0.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/org.apache.sling$org.apache.sling.launchpad.testing/ws/target/classes/resources/bundles/0/org.apache.sling.models.api-1.1.0.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.models.impl/1.1.0/org.apache.sling.models.impl-1.1.0.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/org.apache.sling$org.apache.sling.launchpad.testing/ws/target/classes/resources/bundles/0/org.apache.sling.models.impl-1.1.0.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/felix/org.apache.felix.http.whiteboard/2.2.0/org.apache.felix.http.whiteboard-2.2.0.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/org.apache.sling$org.apache.sling.launchpad.testing/ws/target/classes/resources/bundles/0/org.apache.felix.http.whiteboard-2.2.0.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.installer.console/1.0.0/org.apache.sling.installer.console-1.0.0.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/org.apache.sling$org.apache.sling.launchpad.testing/ws/target/classes/resources/bundles/0/org.apache.sling.installer.console-1.0.0.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.installer.factory.configuration/1.0.14/org.apache.sling.installer.factory.configuration-1.0.14.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/org.apache.sling$org.apache.sling.launchpad.testing/ws/target/classes/resources/bundles/0/org.apache.sling.installer.factory.configuration-1.0.14.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.installer.provider.jcr/3.1.8/org.apache.sling.installer.provider.jcr-3.1.8.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/org.apache.sling$org.apache.sling.launchpad.testing/ws/target/classes/resources/bundles/0/org.apache.sling.installer.provider.jcr-3.1.8.jar
Downloading: 
http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.junit.core/1.0.9-SNAPSHOT/maven-metadata.xml
Downloaded: 
http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.junit.core/1.0.9-SNAPSHOT/maven-metadata.xml
 (1011 B at 5.3 KB/sec)
Downloading: 
http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.junit.core/1.0.9-SNAPSHOT/org.apache.sling.junit.core-1.0.9-20141015.182036-43.jar
Downloaded: 
http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.junit.core/1.0.9-SNAPSHOT/org.apache.sling.junit.core-1.0.9-20141015.182036-43.jar
 (317 KB at 2168.1 KB/sec)
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.junit.core/1.0.9-SNAPSHOT/org.apache.sling.junit.core-1.0.9-SNAPSHOT.jar
 to 

Build failed in Jenkins: sling-oak-it-1.6 #198

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-oak-it-1.6/198/

--
[...truncated 172 lines...]
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/geronimo/bundles/jstl/1.2_1/jstl-1.2_1.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/ws/launchpad-testing-oak/target/classes/resources/bundles/0/jstl-1.2_1.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.models.api/1.1.0/org.apache.sling.models.api-1.1.0.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/ws/launchpad-testing-oak/target/classes/resources/bundles/0/org.apache.sling.models.api-1.1.0.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.models.impl/1.1.0/org.apache.sling.models.impl-1.1.0.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/ws/launchpad-testing-oak/target/classes/resources/bundles/0/org.apache.sling.models.impl-1.1.0.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/felix/org.apache.felix.http.whiteboard/2.2.0/org.apache.felix.http.whiteboard-2.2.0.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/ws/launchpad-testing-oak/target/classes/resources/bundles/0/org.apache.felix.http.whiteboard-2.2.0.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.installer.console/1.0.0/org.apache.sling.installer.console-1.0.0.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/ws/launchpad-testing-oak/target/classes/resources/bundles/0/org.apache.sling.installer.console-1.0.0.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.installer.factory.configuration/1.0.14/org.apache.sling.installer.factory.configuration-1.0.14.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/ws/launchpad-testing-oak/target/classes/resources/bundles/0/org.apache.sling.installer.factory.configuration-1.0.14.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.installer.provider.jcr/3.1.8/org.apache.sling.installer.provider.jcr-3.1.8.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/ws/launchpad-testing-oak/target/classes/resources/bundles/0/org.apache.sling.installer.provider.jcr-3.1.8.jar
Downloading: 
http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.junit.core/1.0.9-SNAPSHOT/maven-metadata.xml
Downloaded: 
http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.junit.core/1.0.9-SNAPSHOT/maven-metadata.xml
 (1011 B at 5.3 KB/sec)
Downloading: 
http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.junit.core/1.0.9-SNAPSHOT/org.apache.sling.junit.core-1.0.9-20141015.182036-43.jar
Downloaded: 
http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.junit.core/1.0.9-SNAPSHOT/org.apache.sling.junit.core-1.0.9-20141015.182036-43.jar
 (317 KB at 2168.1 KB/sec)
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.junit.core/1.0.9-SNAPSHOT/org.apache.sling.junit.core-1.0.9-SNAPSHOT.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/ws/launchpad-testing-oak/target/classes/resources/bundles/0/org.apache.sling.junit.core-1.0.9-SNAPSHOT.jar
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.junit.remote/1.0.9-SNAPSHOT/org.apache.sling.junit.remote-1.0.9-SNAPSHOT.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/ws/launchpad-testing-oak/target/classes/resources/bundles/0/org.apache.sling.junit.remote-1.0.9-SNAPSHOT.jar
Downloading: 
http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.junit.scriptable/1.0.9-SNAPSHOT/maven-metadata.xml
Downloaded: 
http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.junit.scriptable/1.0.9-SNAPSHOT/maven-metadata.xml
 (1017 B at 10.6 KB/sec)
Downloading: 
http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.junit.scriptable/1.0.9-SNAPSHOT/org.apache.sling.junit.scriptable-1.0.9-20141015.182041-43.jar
Downloaded: 
http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.junit.scriptable/1.0.9-SNAPSHOT/org.apache.sling.junit.scriptable-1.0.9-20141015.182041-43.jar
 (25 KB at 525.6 KB/sec)
[INFO] Copying bundle from 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/sling/org.apache.sling.junit.scriptable/1.0.9-SNAPSHOT/org.apache.sling.junit.scriptable-1.0.9-SNAPSHOT.jar
 to 
https://builds.apache.org/job/sling-oak-it-1.6/ws/launchpad-testing-oak/target/classes/resources/bundles/0/org.apache.sling.junit.scriptable-1.0.9-SNAPSHOT.jar
Downloading: 
http://repository.apache.org/snapshots/org/apache/sling/org.apache.sling.launchpad.test-services/2.0.9-SNAPSHOT/maven-metadata.xml
Downloaded: 

[jira] [Created] (SLING-4062) Sling replication deleting ACLs nodes

2014-10-15 Thread Laurie byrum (JIRA)
Laurie byrum created SLING-4062:
---

 Summary: Sling replication deleting ACLs nodes
 Key: SLING-4062
 URL: https://issues.apache.org/jira/browse/SLING-4062
 Project: Sling
  Issue Type: Bug
  Components: Replication
Reporter: Laurie byrum


I use
@Reference(target = (name=blah-reverse), policy = ReferencePolicy.DYNAMIC,
cardinality = ReferenceCardinality.OPTIONAL_UNARY)
ReplicationAgent replicationAgent;

public createUser() {
final UserManager userManager = AccessControlUtil.getUserManager(session);
User user = (User)userManager.getAuthorizable(userId);
if (user == null) {
user = userManager.createUser(userId, password, new Principal() 
{
@Override
public String getName() {
return userId;
}
}, userPath);
   session.save();
 }
}
...

private void reverseReplicate(String path) throws AgentReplicationException 
{
if (replicationAgent != null) {
ReplicationRequest replicationRequest = new ReplicationRequest(0, 
ReplicationActionType.ADD, path);
replicationAgent.execute(replicationRequest);
}
}


If you look at the user node before replication happens, there is a rep:policy 
node under it with jcr:all access for the user. After the reverse replication 
poll interval happens and replication completes, the rep:policy node is missing!



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


Jenkins build became unstable: sling-trunk-1.8 #307

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-trunk-1.8/307/changes



Jenkins build became unstable: sling-trunk-1.8 » Apache Sling Resource-Based Discovery Service #307

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-trunk-1.8/org.apache.sling$org.apache.sling.discovery.impl/307/



Jenkins build became unstable: sling-trunk-1.6 » Apache Sling Installer Integration Tests #2652

2014-10-15 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/sling-trunk-1.6/org.apache.sling$org.apache.sling.installer.it/2652/



Jenkins build became unstable: sling-trunk-1.6 #2652

2014-10-15 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-trunk-1.6/2652/changes