buildbot failure in ASF Buildbot on sling-trunk
The Buildbot has detected a new failure on builder sling-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/sling-trunk/builds/182 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: osiris_ubuntu Build Reason: scheduler Build Source Stamp: [branch sling/trunk] 1561962 Blamelist: cziegeler BUILD FAILED: failed compile sincerely, -The Buildbot
buildbot success in ASF Buildbot on sling-trunk
The Buildbot has detected a restored build on builder sling-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/sling-trunk/builds/183 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: osiris_ubuntu Build Reason: scheduler Build Source Stamp: [branch sling/trunk] 1561965 Blamelist: cziegeler Build succeeded! sincerely, -The Buildbot
[jira] [Commented] (SLING-3148) Implement support for Feature Flags/Toggles in Sling
[ https://issues.apache.org/jira/browse/SLING-3148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13883914#comment-13883914 ] Felix Meschberger commented on SLING-3148: -- In Rev. 1561994 merged whiteboard/fmeschbe/featureflags/feature-flags into contrib/extensions/feature-flags - Removed ResourceHiding and ResourceTypeHiding - Added ResourceDecorator support - Added WebConsole plugin - Added Feature factory configuration support - Added JavaDoc - Support non-Sling ExecutionContext - Porperly register ClientContext filter as Sling filter In Rev. 1562007 merged whiteboard/fmeschbe/featureflags/resourceresolver into bundles/resourceresolver - Implement feature hiding by support a new sling:features property Implement support for Feature Flags/Toggles in Sling Key: SLING-3148 URL: https://issues.apache.org/jira/browse/SLING-3148 Project: Sling Issue Type: New Feature Components: General Reporter: Henry Saginor Assignee: Carsten Ziegeler Priority: Minor It would be nice if sling provide support for feature flags (also called toggles) pattern [1]. I am thinking the implementation could provide the following. 1) Integrate an existing framework such as togglz [2] or implement something similar with UI/Configuration to toggle features. 2) Create a jcr property (sling:Feature) which can be added to resource type nodes. Then some conditional logic in sling:include, and get and post servlets determines if the resource should be rendered if its resource type contains such property. [1] http://en.wikipedia.org/wiki/Feature_toggle [2] http://www.togglz.org/ -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (SLING-3341) [logback] Race condition in configuring Logback
[ https://issues.apache.org/jira/browse/SLING-3341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13883913#comment-13883913 ] Chetan Mehrotra commented on SLING-3341: Fixed another race condition in http://svn.apache.org/r1562003 In this case there was a race condition when logbackManager is initialized. It can happen that OSGi config events are received while the started flag is set to false and config has been invoked [logback] Race condition in configuring Logback --- Key: SLING-3341 URL: https://issues.apache.org/jira/browse/SLING-3341 Project: Sling Issue Type: Bug Components: Commons Affects Versions: Commons Log 4.0.0 Reporter: Chetan Mehrotra Assignee: Chetan Mehrotra Current way to configure Logback works like as below 1. Any change in config finally leads a call to org.apache.sling.commons.log.logback.internal.LogbackManager#configChanged 2. The config change is not done in concurrent way. A thread must acquire the {{resetLock}} to trigger Logback reset. If this lock cannot be acquired then it just sets a flag {{configChanged}} to true. The Logback reset job upon completion checks {{configChanged}} . if found to be true then it reschedules the job to load Logback again In current impl there is a small race condition where its possible that Logback reset job does not see the {{configChanged}} flag and hence Logback does not get reinitialized and is configured with stale config -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (SLING-3148) Implement support for Feature Flags/Toggles in Sling
[ https://issues.apache.org/jira/browse/SLING-3148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13883925#comment-13883925 ] Felix Meschberger commented on SLING-3148: -- In Rev. 1562011 added support to have the sling:features property stored in a jcr:content child node which is good practice in JCR based applications where document data is stored in a jcr:content subtree below the actual document node. See also how nt:file is defined to have the actual file data stored in a jcr:content child node. Implement support for Feature Flags/Toggles in Sling Key: SLING-3148 URL: https://issues.apache.org/jira/browse/SLING-3148 Project: Sling Issue Type: New Feature Components: General Reporter: Henry Saginor Assignee: Carsten Ziegeler Priority: Minor It would be nice if sling provide support for feature flags (also called toggles) pattern [1]. I am thinking the implementation could provide the following. 1) Integrate an existing framework such as togglz [2] or implement something similar with UI/Configuration to toggle features. 2) Create a jcr property (sling:Feature) which can be added to resource type nodes. Then some conditional logic in sling:include, and get and post servlets determines if the resource should be rendered if its resource type contains such property. [1] http://en.wikipedia.org/wiki/Feature_toggle [2] http://www.togglz.org/ -- This message was sent by Atlassian JIRA (v6.1.5#6160)
buildbot failure in ASF Buildbot on sling-trunk
The Buildbot has detected a new failure on builder sling-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/sling-trunk/builds/185 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: osiris_ubuntu Build Reason: scheduler Build Source Stamp: [branch sling/trunk] 1562007 Blamelist: chetanm,fmeschbe BUILD FAILED: failed compile sincerely, -The Buildbot
[jira] [Commented] (SLING-3148) Implement support for Feature Flags/Toggles in Sling
[ https://issues.apache.org/jira/browse/SLING-3148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13883978#comment-13883978 ] Felix Meschberger commented on SLING-3148: -- In Rev. 1562025 fixed handling of missing Features service if the API is not actually available (i.e. when the bundle is not installed). Implement support for Feature Flags/Toggles in Sling Key: SLING-3148 URL: https://issues.apache.org/jira/browse/SLING-3148 Project: Sling Issue Type: New Feature Components: General Reporter: Henry Saginor Assignee: Carsten Ziegeler Priority: Minor It would be nice if sling provide support for feature flags (also called toggles) pattern [1]. I am thinking the implementation could provide the following. 1) Integrate an existing framework such as togglz [2] or implement something similar with UI/Configuration to toggle features. 2) Create a jcr property (sling:Feature) which can be added to resource type nodes. Then some conditional logic in sling:include, and get and post servlets determines if the resource should be rendered if its resource type contains such property. [1] http://en.wikipedia.org/wiki/Feature_toggle [2] http://www.togglz.org/ -- This message was sent by Atlassian JIRA (v6.1.5#6160)
Re: FeatureFlags without ResourceAccessGate
Ok, so I finally merged back my whiteboard into trunk and also fixed a few glitches after the merge. Now, the ResourceResolver implementation may support feature flags if the Features service is available. Yet the bundle does only have a dynamic and optional dependency on the API. So in setups where the Feature Flags bundle is not installed the ResourceResolver implementation can still be deployed and happily works without feature flag support. I tracked all those changes in SLING-3148 [1] I would think we can now resolve this issue. WDYT ? Regards Felix [1] https://issues.apache.org/jira/browse/SLING-3148 Am 27.01.2014 um 15:24 schrieb Carsten Ziegeler cziege...@apache.org: The global one basically just provides access to the raw request while the Sling-embedded one also provides access to the SlingHttpServletRequest as well as the request's ResourceResolver. Ah right, because you don't have the resolver in the global filter...but this means that all flags are tested twice if they're active on every request. Being able to use feature flags outside of Sling looks nice, but ... to quote someone :) yagni for now If want to have this two step setup, we should switch to lazy evaluation of the flags on first access. Carsten -- Carsten Ziegeler cziege...@apache.org
Re: FeatureFlags without ResourceAccessGate
Hi, On Tue, Jan 28, 2014 at 11:36 AM, Felix Meschberger fmesc...@adobe.com wrote: ...I tracked all those changes in SLING-3148 [1] I would think we can now resolve this issue... Doc nitpick: I see that you have staged some docs at content/documentation/the-sling-engine/featureflags.mdtext, shouldn't that rather go under http://sling.apache.org/documentation/bundles.html ? As you indicate, this an optional feature so IMO better belongs there. -Bertrand
buildbot success in ASF Buildbot on sling-trunk
The Buildbot has detected a restored build on builder sling-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/sling-trunk/builds/187 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: osiris_ubuntu Build Reason: scheduler Build Source Stamp: [branch sling/trunk] 1562025 Blamelist: fmeschbe Build succeeded! sincerely, -The Buildbot
[jira] [Created] (SLING-3342) Do not use SlingBindings in Java code
Bertrand Delacretaz created SLING-3342: -- Summary: Do not use SlingBindings in Java code Key: SLING-3342 URL: https://issues.apache.org/jira/browse/SLING-3342 Project: Sling Issue Type: Task Components: Best practices Reporter: Bertrand Delacretaz Assignee: Bertrand Delacretaz Priority: Minor **DRAFT** - to be reviewed, and we need to update the SlingBindings javadocs as well. SlingBindings is meant to be used in Sling scripts. It might be available as a Request attribute in some cases, as Sling sets that before running scripts, but one cannot rely on that in java code. There’s usually no reason to use it in Java code anyway, all the services that it provides are available directly, for example via an @Reference annotation. Here’s a typical counter-example which should use an @Reference to the FooBar service instead: // Do NOT do that! SlingBindings bindings (SlingBindings)request.getAttribute(SlingBindings.class.getName()); SlingScriptHelper scriptHelper = bindings.getSling(); FooBar fb = scriptHelper.getService(FoorBar.class); -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Updated] (SLING-3342) Do not use SlingBindings in Java code
[ https://issues.apache.org/jira/browse/SLING-3342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bertrand Delacretaz updated SLING-3342: --- Description: **DRAFT** - to be reviewed, and we need to update the SlingBindings javadocs as well. SlingBindings is meant to be used in Sling scripts. It might be available as a Request attribute in some cases, as Sling sets that before running scripts, but one cannot rely on that in java code. There’s usually no reason to use it in Java code anyway, all the services that it provides are available directly, for example via an @Reference annotation. Here’s a typical counter-example which should use an @Reference to the FooBar service instead: // Do NOT do that! SlingBindings bindings = (SlingBindings)request.getAttribute(SlingBindings.class.getName()); SlingScriptHelper scriptHelper = bindings.getSling(); FooBar fb = scriptHelper.getService(FoorBar.class); was: **DRAFT** - to be reviewed, and we need to update the SlingBindings javadocs as well. SlingBindings is meant to be used in Sling scripts. It might be available as a Request attribute in some cases, as Sling sets that before running scripts, but one cannot rely on that in java code. There’s usually no reason to use it in Java code anyway, all the services that it provides are available directly, for example via an @Reference annotation. Here’s a typical counter-example which should use an @Reference to the FooBar service instead: // Do NOT do that! SlingBindings bindings (SlingBindings)request.getAttribute(SlingBindings.class.getName()); SlingScriptHelper scriptHelper = bindings.getSling(); FooBar fb = scriptHelper.getService(FoorBar.class); Do not use SlingBindings in Java code - Key: SLING-3342 URL: https://issues.apache.org/jira/browse/SLING-3342 Project: Sling Issue Type: Task Components: Best practices Reporter: Bertrand Delacretaz Assignee: Bertrand Delacretaz Priority: Minor **DRAFT** - to be reviewed, and we need to update the SlingBindings javadocs as well. SlingBindings is meant to be used in Sling scripts. It might be available as a Request attribute in some cases, as Sling sets that before running scripts, but one cannot rely on that in java code. There’s usually no reason to use it in Java code anyway, all the services that it provides are available directly, for example via an @Reference annotation. Here’s a typical counter-example which should use an @Reference to the FooBar service instead: // Do NOT do that! SlingBindings bindings = (SlingBindings)request.getAttribute(SlingBindings.class.getName()); SlingScriptHelper scriptHelper = bindings.getSling(); FooBar fb = scriptHelper.getService(FoorBar.class); -- This message was sent by Atlassian JIRA (v6.1.5#6160)
Re: FeatureFlags without ResourceAccessGate
Hi Am 28.01.2014 um 11:44 schrieb Bertrand Delacretaz bdelacre...@apache.org: Hi, On Tue, Jan 28, 2014 at 11:36 AM, Felix Meschberger fmesc...@adobe.com wrote: ...I tracked all those changes in SLING-3148 [1] I would think we can now resolve this issue... Doc nitpick: I see that you have staged some docs at content/documentation/the-sling-engine/featureflags.mdtext, shouldn't that rather go under http://sling.apache.org/documentation/bundles.html ? As you indicate, this an optional feature so IMO better belongs there. Well, I think the bundles stuff is limited particularly when it comes to Feature Flags which involves at least two bundles: the Feature Flags bundle itself and the Resource Resolver bundle (support feature properties on resources) Regards Felix -Bertrand
[jira] [Created] (SLING-3343) Sling-Junit-Core Method Name in Test selctor is not honoured
Sufyan Haroon created SLING-3343: Summary: Sling-Junit-Core Method Name in Test selctor is not honoured Key: SLING-3343 URL: https://issues.apache.org/jira/browse/SLING-3343 Project: Sling Issue Type: Bug Components: Testing Affects Versions: org.apache.sling.testing.tools 1.0.6 Reporter: Sufyan Haroon Fix For: org.apache.sling.testing.tools 1.0.8 When using method name in test selection in browser, method name is not honoured. For Example, When hitting url like, server:port/system/sling/junit/com.demo.test.demoTest/methodName.html and executing the test, all the tests in the class demoTest are execute instead of just executing the test methodName. -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (SLING-3342) Do not use SlingBindings in Java code
[ https://issues.apache.org/jira/browse/SLING-3342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13884036#comment-13884036 ] Felix Meschberger commented on SLING-3342: -- The class JavaDoc of SlingBindings states: {code:java} /** * The codeSlingBindings/code class is used to prepare global variables * for script execution. The constants in this class define names of variables * which emMUST/em or emMAY/em be provided for the script execution. * Other variables may be define as callers see fit. */ public class SlingBindings extends HashMapString, Object { {code} I think mostly clear. Do not use SlingBindings in Java code - Key: SLING-3342 URL: https://issues.apache.org/jira/browse/SLING-3342 Project: Sling Issue Type: Task Components: Best practices Reporter: Bertrand Delacretaz Assignee: Bertrand Delacretaz Priority: Minor **DRAFT** - to be reviewed, and we need to update the SlingBindings javadocs as well. SlingBindings is meant to be used in Sling scripts. It might be available as a Request attribute in some cases, as Sling sets that before running scripts, but one cannot rely on that in java code. There’s usually no reason to use it in Java code anyway, all the services that it provides are available directly, for example via an @Reference annotation. Here’s a typical counter-example which should use an @Reference to the FooBar service instead: // Do NOT do that! SlingBindings bindings = (SlingBindings)request.getAttribute(SlingBindings.class.getName()); SlingScriptHelper scriptHelper = bindings.getSling(); FooBar fb = scriptHelper.getService(FoorBar.class); -- This message was sent by Atlassian JIRA (v6.1.5#6160)
Re: FeatureFlags without ResourceAccessGate
+1 for closing the issue 2014-01-28 Felix Meschberger fmesc...@adobe.com Hi Am 28.01.2014 um 11:44 schrieb Bertrand Delacretaz bdelacre...@apache.org : Hi, On Tue, Jan 28, 2014 at 11:36 AM, Felix Meschberger fmesc...@adobe.com wrote: ...I tracked all those changes in SLING-3148 [1] I would think we can now resolve this issue... Doc nitpick: I see that you have staged some docs at content/documentation/the-sling-engine/featureflags.mdtext, shouldn't that rather go under http://sling.apache.org/documentation/bundles.html ? As you indicate, this an optional feature so IMO better belongs there. Well, I think the bundles stuff is limited particularly when it comes to Feature Flags which involves at least two bundles: the Feature Flags bundle itself and the Resource Resolver bundle (support feature properties on resources) Regards Felix -Bertrand -- Carsten Ziegeler cziege...@apache.org
Re: [VOTE] Release Apache Sling HealthCheck Core 1.1.0 and Webconsole 1.1.0
+1 Georg Am 28.01.2014 09:50, schrieb Carsten Ziegeler: +1 Carsten 2014-01-27 Carsten Ziegeler cziege...@apache.org Hi, as discussed in the list, I think it's time for a new health check core and web console release (which uses the new core). The list of changes is: https://issues.apache.org/jira/browse/SLING/fixforversion/12325301 Staging repository: https://repository.apache.org/content/repositories/orgapachesling-1005 You can use this UNIX script to download the release and verify the signatures: http://svn.apache.org/repos/asf/sling/trunk/check_staged_release.sh Usage: sh check_staged_release.sh 1005 /tmp/sling-staging Please vote to approve this release: [ ] +1 Approve the release [ ] 0 Don't care [ ] -1 Don't release, because ... This vote will be open for 72 hours. Regards Carsten -- Carsten Ziegeler cziege...@apache.org
[jira] [Updated] (SLING-3343) Sling-Junit-Core Method Name in Test selector is not honoured
[ https://issues.apache.org/jira/browse/SLING-3343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sufyan Haroon updated SLING-3343: - Summary: Sling-Junit-Core Method Name in Test selector is not honoured (was: Sling-Junit-Core Method Name in Test selctor is not honoured) Sling-Junit-Core Method Name in Test selector is not honoured - Key: SLING-3343 URL: https://issues.apache.org/jira/browse/SLING-3343 Project: Sling Issue Type: Bug Components: Testing Affects Versions: org.apache.sling.testing.tools 1.0.6 Reporter: Sufyan Haroon Labels: bug Fix For: org.apache.sling.testing.tools 1.0.8 When using method name in test selection in browser, method name is not honoured. For Example, When hitting url like, server:port/system/sling/junit/com.demo.test.demoTest/methodName.html and executing the test, all the tests in the class demoTest are execute instead of just executing the test methodName. -- This message was sent by Atlassian JIRA (v6.1.5#6160)
Re: [VOTE] Release Apache Sling Pax Exam Utilities V1.0.2
On Fri, Jan 24, 2014 at 2:26 PM, Bertrand Delacretaz bdelacre...@apache.org wrote: ...Staging repository: https://repository.apache.org/content/repositories/orgapachesling-1004/ ... The vote passes with +1s from Justin, Carsten and myself. Thanks for voting, I'll take care of the remaining steps. -Bertrand
Re: DefaultLoginsHealthCheck says it tests disabled logins but doesn't...
Hi Justin, On Sat, Jan 25, 2014 at 8:08 PM, Justin Edelson jus...@justinedelson.com wrote: ... http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/support/src/main/java/org/apache/sling/hc/support/impl/DefaultLoginsHealthCheck.java all say that this tests that the referenced accounts are disabled in a production system. But AFAICT, this isn't actually the case. This test checks that a set of credentials doesn't work. The test could fail because the account is disabled OR because the password is incorrect - this check doesn't differentiate cause You are correct, of course, the DefaultLoginsHealthCheck only checks that a login fails with specific credentials. Said credentials shouldn't be precious as they are not encrypted in the config. I'm happy to correct this, but could someone let me know the true intention?... A typical use case is to verify that the admin:admin login fails on a production system. Feel free to rephrase the javadocs and metatype info to better express what this does, thanks! -Bertrand
[jira] [Resolved] (SLING-3337) Move sling-pax-util under testing and release it
[ https://issues.apache.org/jira/browse/SLING-3337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bertrand Delacretaz resolved SLING-3337. Resolution: Fixed Release vote has passed, deploying the artifacts to dist and Maven repo. Move sling-pax-util under testing and release it Key: SLING-3337 URL: https://issues.apache.org/jira/browse/SLING-3337 Project: Sling Issue Type: Task Components: Testing Reporter: Bertrand Delacretaz Assignee: Bertrand Delacretaz Priority: Minor Fix For: Sling Pax Exam Utilities 1.0.2 The contrib/extensions/sling-pax-util module rather belongs under /testing, and should be released so that modules that use it can be released. -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Closed] (SLING-3337) Move sling-pax-util under testing and release it
[ https://issues.apache.org/jira/browse/SLING-3337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bertrand Delacretaz closed SLING-3337. -- Move sling-pax-util under testing and release it Key: SLING-3337 URL: https://issues.apache.org/jira/browse/SLING-3337 Project: Sling Issue Type: Task Components: Testing Reporter: Bertrand Delacretaz Assignee: Bertrand Delacretaz Priority: Minor Fix For: Sling Pax Exam Utilities 1.0.2 The contrib/extensions/sling-pax-util module rather belongs under /testing, and should be released so that modules that use it can be released. -- This message was sent by Atlassian JIRA (v6.1.5#6160)
Re: [VOTE] Release Apache Sling Auth Core 1.1.6
Hi, On Tue, Jan 28, 2014 at 8:50 AM, Carsten Ziegeler cziege...@apache.org wrote: ...Staging repository: https://repository.apache.org/content/repositories/orgapachesling-1006... +1 for the release, checked signatures, build, and that the below archive matches the corresponding svn tag. MD5 (./org.apache.sling.auth.core/1.1.6/org.apache.sling.auth.core-1.1.6-source-release.zip) = 9c14bd784625c1e70413727b31966de1 -Bertrand
Re: [VOTE] Release Apache Sling HealthCheck Core 1.1.0 and Webconsole 1.1.0
Hi, On Mon, Jan 27, 2014 at 5:49 PM, Carsten Ziegeler cziege...@apache.org wrote: ...Staging repository: https://repository.apache.org/content/repositories/orgapachesling-1005 ... +1 for the release, checked signatures, build and that the following archives match the corresponding svn tags: MD5 (./org.apache.sling.hc.core/1.1.0/org.apache.sling.hc.core-1.1.0-source-release.zip) = 4de92074fe0db29858ab19e46450bd8f MD5 (./org.apache.sling.hc.webconsole/1.1.0/org.apache.sling.hc.webconsole-1.1.0-source-release.zip) = 8af4495f9c4d8271f81a9b66658ada21 -Bertrand
[jira] [Commented] (SLING-3342) Do not use SlingBindings in Java code
[ https://issues.apache.org/jira/browse/SLING-3342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13884167#comment-13884167 ] Justin Edelson commented on SLING-3342: --- Notable exceptions are JSP Tags and Functions which are essentially extensions of the script executions. It may be appropriate to use SlingBindings in Java scripts (i.e. scripts with a .java extension), but *not* for service access. Use @Inject for that. Do not use SlingBindings in Java code - Key: SLING-3342 URL: https://issues.apache.org/jira/browse/SLING-3342 Project: Sling Issue Type: Task Components: Best practices Reporter: Bertrand Delacretaz Assignee: Bertrand Delacretaz Priority: Minor **DRAFT** - to be reviewed, and we need to update the SlingBindings javadocs as well. SlingBindings is meant to be used in Sling scripts. It might be available as a Request attribute in some cases, as Sling sets that before running scripts, but one cannot rely on that in java code. There’s usually no reason to use it in Java code anyway, all the services that it provides are available directly, for example via an @Reference annotation. Here’s a typical counter-example which should use an @Reference to the FooBar service instead: // Do NOT do that! SlingBindings bindings = (SlingBindings)request.getAttribute(SlingBindings.class.getName()); SlingScriptHelper scriptHelper = bindings.getSling(); FooBar fb = scriptHelper.getService(FoorBar.class); -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (SLING-3342) Do not use SlingBindings in Java code
[ https://issues.apache.org/jira/browse/SLING-3342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13884187#comment-13884187 ] Justin Edelson commented on SLING-3342: --- For examples, take a look at the Sling JSP tags: http://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/. Many of these use SlingBindings. Another example is the OSGiServiceInjector in Sling Models: http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/injectors/OSGiServiceInjector.java which uses SlingBindings (or really SlingScriptHelper) if it is available. Do not use SlingBindings in Java code - Key: SLING-3342 URL: https://issues.apache.org/jira/browse/SLING-3342 Project: Sling Issue Type: Task Components: Best practices Reporter: Bertrand Delacretaz Assignee: Bertrand Delacretaz Priority: Minor **DRAFT** - to be reviewed, and we need to update the SlingBindings javadocs as well. SlingBindings is meant to be used in Sling scripts. It might be available as a Request attribute in some cases, as Sling sets that before running scripts, but one cannot rely on that in java code. There’s usually no reason to use it in Java code anyway, all the services that it provides are available directly, for example via an @Reference annotation. Here’s a typical counter-example which should use an @Reference to the FooBar service instead: // Do NOT do that! SlingBindings bindings = (SlingBindings)request.getAttribute(SlingBindings.class.getName()); SlingScriptHelper scriptHelper = bindings.getSling(); FooBar fb = scriptHelper.getService(FoorBar.class); -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (SLING-3342) Do not use SlingBindings in Java code
[ https://issues.apache.org/jira/browse/SLING-3342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13884195#comment-13884195 ] Bertrand Delacretaz commented on SLING-3342: Thanks for the examples - I guess the main thing is that if code really needs to use SlingBindings, it should handle the case where the request attribute is null. Do not use SlingBindings in Java code - Key: SLING-3342 URL: https://issues.apache.org/jira/browse/SLING-3342 Project: Sling Issue Type: Task Components: Best practices Reporter: Bertrand Delacretaz Assignee: Bertrand Delacretaz Priority: Minor **DRAFT** - to be reviewed, and we need to update the SlingBindings javadocs as well. SlingBindings is meant to be used in Sling scripts. It might be available as a Request attribute in some cases, as Sling sets that before running scripts, but one cannot rely on that in java code. There’s usually no reason to use it in Java code anyway, all the services that it provides are available directly, for example via an @Reference annotation. Here’s a typical counter-example which should use an @Reference to the FooBar service instead: // Do NOT do that! SlingBindings bindings = (SlingBindings)request.getAttribute(SlingBindings.class.getName()); SlingScriptHelper scriptHelper = bindings.getSling(); FooBar fb = scriptHelper.getService(FoorBar.class); -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (SLING-3342) Do not use SlingBindings in Java code
[ https://issues.apache.org/jira/browse/SLING-3342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13884198#comment-13884198 ] Konrad Windszus commented on SLING-3342: In my regard using the SlingBindings is the preferred way of getting a service if a) the service should only be used during the lifetime of the request (otherwise one has to remember releasing the service correctly) and b) the java object itself is not a OSGi component Do not use SlingBindings in Java code - Key: SLING-3342 URL: https://issues.apache.org/jira/browse/SLING-3342 Project: Sling Issue Type: Task Components: Best practices Reporter: Bertrand Delacretaz Assignee: Bertrand Delacretaz Priority: Minor **DRAFT** - to be reviewed, and we need to update the SlingBindings javadocs as well. SlingBindings is meant to be used in Sling scripts. It might be available as a Request attribute in some cases, as Sling sets that before running scripts, but one cannot rely on that in java code. There’s usually no reason to use it in Java code anyway, all the services that it provides are available directly, for example via an @Reference annotation. Here’s a typical counter-example which should use an @Reference to the FooBar service instead: // Do NOT do that! SlingBindings bindings = (SlingBindings)request.getAttribute(SlingBindings.class.getName()); SlingScriptHelper scriptHelper = bindings.getSling(); FooBar fb = scriptHelper.getService(FoorBar.class); -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (SLING-3342) Do not use SlingBindings in Java code
[ https://issues.apache.org/jira/browse/SLING-3342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13884211#comment-13884211 ] Bertrand Delacretaz commented on SLING-3342: bq. a) the service should only be used during the lifetime of the request... If this is a common use case we should provide a better way to do that than abusing SlingBindings. bq. b) the java object itself is not a OSGi component Which in itself is not a Sling best practice ;-) But I see you point. Do not use SlingBindings in Java code - Key: SLING-3342 URL: https://issues.apache.org/jira/browse/SLING-3342 Project: Sling Issue Type: Task Components: Best practices Reporter: Bertrand Delacretaz Assignee: Bertrand Delacretaz Priority: Minor **DRAFT** - to be reviewed, and we need to update the SlingBindings javadocs as well. SlingBindings is meant to be used in Sling scripts. It might be available as a Request attribute in some cases, as Sling sets that before running scripts, but one cannot rely on that in java code. There’s usually no reason to use it in Java code anyway, all the services that it provides are available directly, for example via an @Reference annotation. Here’s a typical counter-example which should use an @Reference to the FooBar service instead: // Do NOT do that! SlingBindings bindings = (SlingBindings)request.getAttribute(SlingBindings.class.getName()); SlingScriptHelper scriptHelper = bindings.getSling(); FooBar fb = scriptHelper.getService(FoorBar.class); -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (SLING-3342) Do not use SlingBindings in Java code
[ https://issues.apache.org/jira/browse/SLING-3342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13884233#comment-13884233 ] Bertrand Delacretaz commented on SLING-3342: Another case where it's fine to use SlingBindings in java code is if you're provided with a javax.script.Bindings or SlingBindings object and you need SlingBindings constants for the bindings keys. The red flag is when you're grabbing a SlingBindings from a request attribute in java code - you should at least be prepared for that to be null, and if you can avoid doing that that's usually better. Do not use SlingBindings in Java code - Key: SLING-3342 URL: https://issues.apache.org/jira/browse/SLING-3342 Project: Sling Issue Type: Task Components: Best practices Reporter: Bertrand Delacretaz Assignee: Bertrand Delacretaz Priority: Minor **DRAFT** - to be reviewed, and we need to update the SlingBindings javadocs as well. SlingBindings is meant to be used in Sling scripts. It might be available as a Request attribute in some cases, as Sling sets that before running scripts, but one cannot rely on that in java code. There’s usually no reason to use it in Java code anyway, all the services that it provides are available directly, for example via an @Reference annotation. Here’s a typical counter-example which should use an @Reference to the FooBar service instead: // Do NOT do that! SlingBindings bindings = (SlingBindings)request.getAttribute(SlingBindings.class.getName()); SlingScriptHelper scriptHelper = bindings.getSling(); FooBar fb = scriptHelper.getService(FoorBar.class); -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Created] (SLING-3344) log bundle is too conservative in exporting logback
Justin Edelson created SLING-3344: - Summary: log bundle is too conservative in exporting logback Key: SLING-3344 URL: https://issues.apache.org/jira/browse/SLING-3344 Project: Sling Issue Type: Bug Components: Commons Reporter: Justin Edelson Fix For: Commons Log 4.0.0 In trying to deploy a logback appender provided by a cloud logging provider, I found that there are several packages which are not exported by Commons Log, namely ch.qos.logback.classic.encoder and ch.qos.logback.classic.pattern*. These should be exported by Commons Log. -- This message was sent by Atlassian JIRA (v6.1.5#6160)
Re: [VOTE] Release Apache Sling Pax Exam Utilities V1.0.2
..https://repository.apache.org/content/repositories/orgapachesling-1004/ .. is this URL private ? It gives 404-ItemNotFoundException. Thanks, Dragos Dascalita Haut On Tue, Jan 28, 2014 at 3:32 PM, Bertrand Delacretaz bdelacre...@apache.org wrote: On Fri, Jan 24, 2014 at 2:26 PM, Bertrand Delacretaz bdelacre...@apache.org wrote: ...Staging repository: https://repository.apache.org/content/repositories/orgapachesling-1004/... The vote passes with +1s from Justin, Carsten and myself. Thanks for voting, I'll take care of the remaining steps. -Bertrand
Re: [VOTE] Release Apache Sling Pax Exam Utilities V1.0.2
Hi, On Tue, Jan 28, 2014 at 5:25 PM, Dascalita Dragos ddrag...@gmail.com wrote: ..https://repository.apache.org/content/repositories/orgapachesling-1004/ .. is this URL private ? It gives 404-ItemNotFoundException That staging repository is gone as I promoted the release 2 hours ago - it is released at https://repository.apache.org/ now, available at http://apache.org/dist/sling/ and should be on all download mirrors soon. -Bertrand
[jira] [Created] (SLING-3345) Regression of SLING-1414
Olaf Otto created SLING-3345: Summary: Regression of SLING-1414 Key: SLING-3345 URL: https://issues.apache.org/jira/browse/SLING-3345 Project: Sling Issue Type: Bug Components: JCR Affects Versions: JCR Resource 2.2.8 Environment: GNU/Linux 2.6.18-274.18.1.el5 java version 1.7.0 Java(TM) SE Runtime Environment (build 1.7.0-b147) Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode) Reporter: Olaf Otto The issue described in SLING-1414 arises only on JDK 1.7 on the previously described Linux platform. It can be assumed that there is a platform-specific deviation in compiler behavior, as the issue does not arise in MacOs or Windows environments: {code} Caused by: java.lang.IllegalAccessException: Class javax.el.BeanELResolver can not access a member of class org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResource with modifiers public at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95) at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:261) at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:253) at java.lang.reflect.Method.invoke(Method.java:594) at javax.el.BeanELResolver.getValue(BeanELResolver.java:62) {code} -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Updated] (SLING-3343) Sling-Junit-Core Method Name in Test selector is not honoured
[ https://issues.apache.org/jira/browse/SLING-3343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] rohit updated SLING-3343: - Attachment: SLING-3343.patch As a fix, added method name to post path in order to invoke only selected test method. Attaching patch. Sling-Junit-Core Method Name in Test selector is not honoured - Key: SLING-3343 URL: https://issues.apache.org/jira/browse/SLING-3343 Project: Sling Issue Type: Bug Components: Testing Affects Versions: org.apache.sling.testing.tools 1.0.6 Reporter: Sufyan Haroon Labels: bug Fix For: org.apache.sling.testing.tools 1.0.8 Attachments: SLING-3343.patch When using method name in test selection in browser, method name is not honoured. For Example, When hitting url like, server:port/system/sling/junit/com.demo.test.demoTest/methodName.html and executing the test, all the tests in the class demoTest are execute instead of just executing the test methodName. -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Resolved] (SLING-3344) log bundle is too conservative in exporting logback
[ https://issues.apache.org/jira/browse/SLING-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Justin Edelson resolved SLING-3344. --- Resolution: Fixed Assignee: Justin Edelson fixed in r1562346 log bundle is too conservative in exporting logback --- Key: SLING-3344 URL: https://issues.apache.org/jira/browse/SLING-3344 Project: Sling Issue Type: Bug Components: Commons Reporter: Justin Edelson Assignee: Justin Edelson Fix For: Commons Log 4.0.0 In trying to deploy a logback appender provided by a cloud logging provider, I found that there are several packages which are not exported by Commons Log, namely ch.qos.logback.classic.encoder and ch.qos.logback.classic.pattern*. These should be exported by Commons Log. -- This message was sent by Atlassian JIRA (v6.1.5#6160)
sling pull request: SlING-3343 Sling-Junit-Core Method Name in Test selctor...
GitHub user sufyanharoon opened a pull request: https://github.com/apache/sling/pull/10 SlING-3343 Sling-Junit-Core Method Name in Test selctor is not honoured Now method name is honoured while executing tests from browser. Method name is added as part of test execution path i n junit and slingjunit servlets which was not getting included. You can merge this pull request into a Git repository by running: $ git pull https://github.com/sufyanharoon/sling trunk Alternatively you can review and apply these changes as the patch at: https://github.com/apache/sling/pull/10.patch commit 9475f6171400a7107f0e80d006fb31213a1e2fe0 Author: sufyanharoon sufyan.har...@gmail.com Date: 2014-01-28T12:28:32Z SlING-3343 Sling-Junit-Core Method Name in Test selctor is not honoured Now method name is honoured while executing tests from browser. Method name is added as part of test execution path i n junit and slingjunit servlets which was not getting included.
[jira] [Commented] (SLING-3343) Sling-Junit-Core Method Name in Test selector is not honoured
[ https://issues.apache.org/jira/browse/SLING-3343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13885075#comment-13885075 ] Sufyan Haroon commented on SLING-3343: -- As a fix we need to add method name in test execution path in two places. Attaching the patch for the same. Sling-Junit-Core Method Name in Test selector is not honoured - Key: SLING-3343 URL: https://issues.apache.org/jira/browse/SLING-3343 Project: Sling Issue Type: Bug Components: Testing Affects Versions: org.apache.sling.testing.tools 1.0.6 Reporter: Sufyan Haroon Labels: bug Fix For: org.apache.sling.testing.tools 1.0.8 Attachments: SLING-3343.patch, SLING-3343.txt When using method name in test selection in browser, method name is not honoured. For Example, When hitting url like, server:port/system/sling/junit/com.demo.test.demoTest/methodName.html and executing the test, all the tests in the class demoTest are execute instead of just executing the test methodName. -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Updated] (SLING-3343) Sling-Junit-Core Method Name in Test selector is not honoured
[ https://issues.apache.org/jira/browse/SLING-3343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sufyan Haroon updated SLING-3343: - Attachment: SLING-3343.txt Patch for fixing it in both the servlets. Sling-Junit-Core Method Name in Test selector is not honoured - Key: SLING-3343 URL: https://issues.apache.org/jira/browse/SLING-3343 Project: Sling Issue Type: Bug Components: Testing Affects Versions: org.apache.sling.testing.tools 1.0.6 Reporter: Sufyan Haroon Labels: bug Fix For: org.apache.sling.testing.tools 1.0.8 Attachments: SLING-3343.patch, SLING-3343.txt When using method name in test selection in browser, method name is not honoured. For Example, When hitting url like, server:port/system/sling/junit/com.demo.test.demoTest/methodName.html and executing the test, all the tests in the class demoTest are execute instead of just executing the test methodName. -- This message was sent by Atlassian JIRA (v6.1.5#6160)