A question about class PooledSession

2009-01-03 Thread yanshaozhiGmail
HI:

   I think it will be more suitable if the class PooledSession can implement 
Interface JackrabbitSession,

and from the mailling list , it's like that has been done , however I haven't 
find any change from the 

latest version.
   
   Did it really work?

2009-01-04 



yanjie


[jira] Closed: (SLING-804) Add a null operation to the SlingPostServlet

2009-01-03 Thread Felix Meschberger (JIRA)

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

Felix Meschberger closed SLING-804.
---

Resolution: Fixed

Added an integration test in Rev. 731092.

This closes this enhancement.

> Add a null operation to the SlingPostServlet
> 
>
> Key: SLING-804
> URL: https://issues.apache.org/jira/browse/SLING-804
> Project: Sling
>  Issue Type: New Feature
>  Components: Servlets Post
>Affects Versions: Servlets Post 2.0.2
>Reporter: Felix Meschberger
>Assignee: Felix Meschberger
> Fix For: Servlets Post 2.0.4
>
>
> Sometimes it may be usefull to be able to explicitly prevent the 
> SlingPostServlet from doing anythin. This may be done by adding a "null" 
> operation comparable to the venerable 6502 CPU instruction "NOP", which just 
> burnt cycles.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-804) Add a null operation to the SlingPostServlet

2009-01-03 Thread Felix Meschberger (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12660505#action_12660505
 ] 

Felix Meschberger commented on SLING-804:
-

Added NopOperation in Rev. 731082.

> Add a null operation to the SlingPostServlet
> 
>
> Key: SLING-804
> URL: https://issues.apache.org/jira/browse/SLING-804
> Project: Sling
>  Issue Type: New Feature
>  Components: Servlets Post
>Affects Versions: Servlets Post 2.0.2
>Reporter: Felix Meschberger
>Assignee: Felix Meschberger
> Fix For: Servlets Post 2.0.4
>
>
> Sometimes it may be usefull to be able to explicitly prevent the 
> SlingPostServlet from doing anythin. This may be done by adding a "null" 
> operation comparable to the venerable 6502 CPU instruction "NOP", which just 
> burnt cycles.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (SLING-804) Add a null operation to the SlingPostServlet

2009-01-03 Thread Felix Meschberger (JIRA)
Add a null operation to the SlingPostServlet


 Key: SLING-804
 URL: https://issues.apache.org/jira/browse/SLING-804
 Project: Sling
  Issue Type: New Feature
  Components: Servlets Post
Affects Versions: Servlets Post 2.0.2
Reporter: Felix Meschberger
Assignee: Felix Meschberger
 Fix For: Servlets Post 2.0.4


Sometimes it may be usefull to be able to explicitly prevent the 
SlingPostServlet from doing anythin. This may be done by adding a "null" 
operation comparable to the venerable 6502 CPU instruction "NOP", which just 
burnt cycles.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: Upgrade to Jackrabbit 1.5

2009-01-03 Thread Felix Meschberger
Hi Rory,

Rory Douglas schrieb:
> 3) Changed/added the following:
> pdfbox;version=0.7.3,
> fontbox;version=0.1.0,
> jempbox;version=0.2.0,
> poi;version=3.0.2-FINAL,
> poi-scratchpad;version=3.0.2-FINAL,
> 
> 4) Removed the direct nekohtml dependency (the newest 1.9.7 version gets
> pulled in via jackrabbit-text-extractors dependency).
> 

Fixed in Rev. 731062 for SLING-801.

> 
> Lastly, to follow the final step in [1] (actually updating an ACL on a
> node), you need to get the AccessControlManager, which is currently only
> available on the SessionImpl class (), so I retained my
> jackrabbit-server POM tweak to make those o.a.j.core classes visible
> outside the bundle:
> 
> 
>org.apache.jackrabbit.core.*,
>org.apache.jackrabbit.spi.*
> 
> 
> 
> That last tweak is ugly, and could perhaps be avoided by exporting a
> utility class from the jackrabbit-server bundle that can return the
> AccessControlManager without exposing the o.a.j.core classes (say,
> AccessControlUtil.getAccessControlManager(Session session))?

I implemented such a utility method in Rev. 731080 for SLING-803.

Hope this helps.

Regards
Felix

> 
> Regards,
> Rory
> 
> [1] http://www.nabble.com/Jackrabbit-1.5-Security-td21080602.html
> 
> 
> Felix Meschberger wrote:
>> Hi all again,
>>
>> Well, I think, I have finished upgrading to Jackrabbit 1.5. There may be
>> glitches, which should be fixed in the next few days...
>>
>> Please report any issues, you might find. Thanks.
>>
>> Regards
>> Felix
>>
>> Felix Meschberger schrieb:
>>  
>>> Hi all,
>>>
>>> I am currently committing the changes to use Jackrabbit 1.5 in Sling.
>>> This may result in temporary failure building Sling.
>>>
>>> As soon as I am done, I will inform you.
>>>
>>> Regards
>>> Felix
>>>
>>> 
> 


[jira] Closed: (SLING-803) Provide utility to get AccessControlManager from the session

2009-01-03 Thread Felix Meschberger (JIRA)

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

Felix Meschberger closed SLING-803.
---

Resolution: Fixed

Implemented the utility method in Rev. 731080

> Provide utility to get AccessControlManager from the session
> 
>
> Key: SLING-803
> URL: https://issues.apache.org/jira/browse/SLING-803
> Project: Sling
>  Issue Type: New Feature
>  Components: JCR
>Affects Versions: JCR Base 2.0.4
>Reporter: Felix Meschberger
>Assignee: Felix Meschberger
> Fix For: JCR Base 2.0.4
>
>
> Starting with Jackrabbit 1.5 JSR-283 Security API is being implemented. 
> Unfortunately, not all API is available yet through the public interfaces. 
> Most notably the getAccessControlManager method is missing.
> To still get the AccessControlManager without requiring access to the 
> "SessionImpl", a utility method should be provided which uses reflection.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (SLING-803) Provide utility to get AccessControlManager from the session

2009-01-03 Thread Felix Meschberger (JIRA)
Provide utility to get AccessControlManager from the session


 Key: SLING-803
 URL: https://issues.apache.org/jira/browse/SLING-803
 Project: Sling
  Issue Type: New Feature
  Components: JCR
Affects Versions: JCR Base 2.0.4
Reporter: Felix Meschberger
Assignee: Felix Meschberger
 Fix For: JCR Base 2.0.4


Starting with Jackrabbit 1.5 JSR-283 Security API is being implemented. 
Unfortunately, not all API is available yet through the public interfaces. Most 
notably the getAccessControlManager method is missing.

To still get the AccessControlManager without requiring access to the 
"SessionImpl", a utility method should be provided which uses reflection.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Closed: (SLING-802) Provide JackrabbitSession support for PooledSession

2009-01-03 Thread Felix Meschberger (JIRA)

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

Felix Meschberger closed SLING-802.
---

Resolution: Fixed

Implemented in Rev. 731076

> Provide JackrabbitSession support for PooledSession
> ---
>
> Key: SLING-802
> URL: https://issues.apache.org/jira/browse/SLING-802
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Affects Versions: JCR Base 2.0.4
>Reporter: Felix Meschberger
>Assignee: Felix Meschberger
> Fix For: JCR Base 2.0.4
>
>
> The JackrabbitSession is a new interface in Jackrabbit 1.5 which provides two 
> new methods: getPrincipalManager and getUserManager. These methods should 
> also be provided through the session pooling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (SLING-802) Provide JackrabbitSession support for PooledSession

2009-01-03 Thread Felix Meschberger (JIRA)
Provide JackrabbitSession support for PooledSession
---

 Key: SLING-802
 URL: https://issues.apache.org/jira/browse/SLING-802
 Project: Sling
  Issue Type: Improvement
  Components: JCR
Affects Versions: JCR Base 2.0.4
Reporter: Felix Meschberger
Assignee: Felix Meschberger
 Fix For: JCR Base 2.0.4


The JackrabbitSession is a new interface in Jackrabbit 1.5 which provides two 
new methods: getPrincipalManager and getUserManager. These methods should also 
be provided through the session pooling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Closed: (SLING-801) Fix jackrabbit-server bundle inclusions

2009-01-03 Thread Felix Meschberger (JIRA)

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

Felix Meschberger closed SLING-801.
---

Resolution: Fixed

Fixed in Rev. 731062.

> Fix jackrabbit-server bundle inclusions
> ---
>
> Key: SLING-801
> URL: https://issues.apache.org/jira/browse/SLING-801
> Project: Sling
>  Issue Type: Bug
>Affects Versions: JCR Jackrabbit Server 2.0.4
>Reporter: Felix Meschberger
>Assignee: Felix Meschberger
> Fix For: JCR Jackrabbit Server 2.0.4
>
>
> After the migration to Jackrabbit 1.5 the jackrabbit-server bundle contains 
> the wrong dependent libraries. This should be fixed by better leveraging 
> transitive dependency support by Maven.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (SLING-801) Fix jackrabbit-server bundle inclusions

2009-01-03 Thread Felix Meschberger (JIRA)
Fix jackrabbit-server bundle inclusions
---

 Key: SLING-801
 URL: https://issues.apache.org/jira/browse/SLING-801
 Project: Sling
  Issue Type: Bug
Affects Versions: JCR Jackrabbit Server 2.0.4
Reporter: Felix Meschberger
Assignee: Felix Meschberger
 Fix For: JCR Jackrabbit Server 2.0.4


After the migration to Jackrabbit 1.5 the jackrabbit-server bundle contains the 
wrong dependent libraries. This should be fixed by better leveraging transitive 
dependency support by Maven.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Closed: (SLING-800) Fix contents of jcr/webdav bundle

2009-01-03 Thread Felix Meschberger (JIRA)

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

Felix Meschberger closed SLING-800.
---

Resolution: Fixed

Fixed in Rev. 731020 by including the complete required libraries and excluding 
explicitly unneeded  packages from the import list.

Deployed SNAPSHOT version 20090103.164550-3

> Fix contents of jcr/webdav bundle
> -
>
> Key: SLING-800
> URL: https://issues.apache.org/jira/browse/SLING-800
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Webdav 2.0.4
>Reporter: Felix Meschberger
>Assignee: Felix Meschberger
> Fix For: JCR Webdav 2.0.4
>
>
> The JCR Webdav bundle currently lacks a number of packages: two packages from 
> the jackrabbit-jcr-commons library are required for Jackrabbit WebDAV 1.5. In 
> addition new packages have been added to the libraries.
> To simplify the bundlezation of Jackrabbit WebDAV, we should probably include 
> the complete required libraries by means of Embed-Dependency and carefully 
> check the dependencies introduced by this inclusion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (SLING-800) Fix contents of jcr/webdav bundle

2009-01-03 Thread Felix Meschberger (JIRA)
Fix contents of jcr/webdav bundle
-

 Key: SLING-800
 URL: https://issues.apache.org/jira/browse/SLING-800
 Project: Sling
  Issue Type: Bug
  Components: JCR
Affects Versions: JCR Webdav 2.0.4
Reporter: Felix Meschberger
Assignee: Felix Meschberger
 Fix For: JCR Webdav 2.0.4


The JCR Webdav bundle currently lacks a number of packages: two packages from 
the jackrabbit-jcr-commons library are required for Jackrabbit WebDAV 1.5. In 
addition new packages have been added to the libraries.

To simplify the bundlezation of Jackrabbit WebDAV, we should probably include 
the complete required libraries by means of Embed-Dependency and carefully 
check the dependencies introduced by this inclusion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: Issue with moving/replacing and re-ordering

2009-01-03 Thread Felix Meschberger
Hi Will,

Will Carpenter schrieb:
> Hey,
> I'm trying to add a re-order option for a list of items in a CMS.  I'm
> trying to use the :move method with replace set to true, and am using
> :order before and :order after to indicate which direction to shift the
> affected node.  I have pasted an example of one of my generated forms below:
> 
>  method="POST" enctype="multipart/form-data">
>  name=":operation" value="move" />
>  value="./" />
>  value="true"/>
>  value="before /content/site/jcr:content/herobanners/comedy_roadtrip" />
>  name=":redirect" value="/content/site.html"/>
> 
> 
> 
> I have attached a screenshot of the error I get when I try to hit the
> "Up" form shown above.  Although it says that it can't find the path,
> the path does in fact exist.  Any ideas?

Unfortunately, the screen shot didn't make it to the list.

Yet, here are some hints: Instead of using a move operation, you may use
the default (modify operation) and the argument to the "before" command
is a simple name.

So to order the /content/site/jcr:content/herobanners/spread_tv before
comedy_roadtrip, you may do as simple as:


  
  
  


or in curl-speak:

  $ curl "-F:order=before comedy_roadtrip" \
http://host/content/site/jcr:content/herobanners/spread_tv

Both call the modify operation, without actually modifying anything,
except for moving the spread_tv above comedy_roadtrip

Hope this helps.

Regards
Felix


Re: default node type for webdav collections

2009-01-03 Thread Felix Meschberger
Hi,

Torgeir Veimo schrieb:
> 
> On 3 Jan 2009, at 20:35, Bertrand Delacretaz wrote:
> 
>> Hi,
>>
>> On Sat, Jan 3, 2009 at 7:09 AM, Torgeir Veimo  wrote:
>>> ...If I take the current sling svn trunk code, do a mvn install in
>>> the root,
>>> then a mvn install in launchpad/webapp, then use the resulting war
>>> file in
>>> the target directory, then I should get the latest sling trunk code?...
>>
>> Yes, but the launchpad app and webapp modules do not necessarily use
>> snapshot versions of all bundles, some dependencies are still on the
>> released versions of bundles.
>>>
> 
> Ok, so launchpad != latest trunk.

Hmm, I would consider this a "bug", then.

Thanks, Bertrand for fixing this.


> What is the easiest way to run the
> latest modules?

Launchpad should really get you the latest modules - unless launchpad is
not updated for the latest modules. In this case it was mea culpa, sorry.

> 
>> Note that you could also have updated the org.apache.sling.jcr.webdav
>> bundle manually after starting the launchpad webapp, for example by
>> building the webapp bundle using
>>
>>  mvn -P autoInstallBundle clean install -D
>> sling.url=http://localhost:/system/console
> 
> 
> Thank you! running this command in jcr/webdav fixed my problem!
> 

Great ! Good to hear.

Regards
Felix


Re: default node type for webdav collections

2009-01-03 Thread Torgeir Veimo


On 3 Jan 2009, at 20:35, Bertrand Delacretaz wrote:


Hi,

On Sat, Jan 3, 2009 at 7:09 AM, Torgeir Veimo   
wrote:
...If I take the current sling svn trunk code, do a mvn install in  
the root,
then a mvn install in launchpad/webapp, then use the resulting war  
file in
the target directory, then I should get the latest sling trunk  
code?...


Yes, but the launchpad app and webapp modules do not necessarily use
snapshot versions of all bundles, some dependencies are still on the
released versions of bundles.




Ok, so launchpad != latest trunk. What is the easiest way to run the  
latest modules?



Note that you could also have updated the org.apache.sling.jcr.webdav
bundle manually after starting the launchpad webapp, for example by
building the webapp bundle using

 mvn -P autoInstallBundle clean install -D
sling.url=http://localhost:/system/console



Thank you! running this command in jcr/webdav fixed my problem!

--
Torgeir Veimo
torg...@pobox.com






Re: default node type for webdav collections

2009-01-03 Thread Bertrand Delacretaz
Hi,

On Sat, Jan 3, 2009 at 7:09 AM, Torgeir Veimo  wrote:
> ...If I take the current sling svn trunk code, do a mvn install in the root,
> then a mvn install in launchpad/webapp, then use the resulting war file in
> the target directory, then I should get the latest sling trunk code?...

Yes, but the launchpad app and webapp modules do not necessarily use
snapshot versions of all bundles, some dependencies are still on the
released versions of bundles.

> ...The simple webdav servlet configuration only has options for the
> authentication realm and the root path. Am a bit at a loss here.

The launchpad/webapp was using the 2.0.2.incubator version of the
org.apache.sling.jcr.webdav bundle, as can be verified by looking at
the bundle details from the OSGi console.

I have fixed this in the launchpad/app module, which is used to build
launchpad/webapp. Rebuilding revision 730968 as you did should now get
you the webdav bundle from trunk.

Note that you could also have updated the org.apache.sling.jcr.webdav
bundle manually after starting the launchpad webapp, for example by
building the webapp bundle using

  mvn -P autoInstallBundle clean install -D
sling.url=http://localhost:/system/console

The bundles that are embedded in the war file are only used for the
initial installation, but if you update them manually after startup
the updated versions are permantently stored in the sling.home folder.

-Bertrand


[jira] Commented: (SLING-799) Job Folder is not ordered and results in unordered queue

2009-01-03 Thread Tobias Bocanegra (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12660456#action_12660456
 ] 

Tobias Bocanegra commented on SLING-799:


> now I would prefer to use a sorted query
why a query? iterating over the child nodes should be sufficient.

> An ordered collection in jcr only means that it is "somehow" ordered. 
i disagree. i would leverage the ordering capability of the repository and rely 
on the node ordering.
this has also the advantage that you don't need to have (and calculate) a 
sequence number, which can be difficult to obtain in the cluster scenario.

> Job Folder is not ordered and results in unordered queue
> 
>
> Key: SLING-799
> URL: https://issues.apache.org/jira/browse/SLING-799
> Project: Sling
>  Issue Type: Bug
>  Components: Event
>Affects Versions: Extensions Event 2.0.2
>Reporter: Tobias Bocanegra
>
> check code of
> AbstractRepositoryEventHandler.ensureRepositoryPath()
> /**
>  * Check if the repository path already exists. If not, create it.
>  */
> protected Node ensureRepositoryPath()
> throws RepositoryException {
> final Node node = JcrResourceUtil.createPath(this.repositoryPath,
>EventHelper.NODETYPE_FOLDER,
>EventHelper.NODETYPE_FOLDER,
>this.writerSession, true);
> return node;
> }
> this should use a "sling:OrderedFolder"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: default node type for webdav collections

2009-01-03 Thread Felix Meschberger
Hi,

Torgeir Veimo schrieb:
> 
> On 3 Jan 2009, at 04:58, Felix Meschberger wrote:
> 
>> Torgeir Veimo schrieb:
>>>
>>> Do you know when? I have sling trunk from a few days ago running. Where
>>
>> Rev. 725679 dates from the 11. Dec. 2008.
> 
> If I take the current sling svn trunk code, do a mvn install in the
> root, then a mvn install in launchpad/webapp, then use the resulting war
> file in the target directory, then I should get the latest sling trunk
> code?

Yes. Note, though, that if you run this latest applications using an
existing ${sling.home} folder, the newest bundles will only be installed
if you remove the existing ${sling.home}/felix folder first.

(Or more specifically: if you remove the
${sling.home}/felix/bundle0/bootstrapinstaller.ser file and all Sling
bundles before starting the new Sling (web) app)

> 
>>> is the correct way to configure this manually? I had a look at the
>>> configuration settings for the webdav servlet, but I couldn't find any
>>> setting for the default node type.
>>
>> The configuration to look for is "Simple WebDAV Servlet
>> (org.apache.sling.jcr.webdav.impl.servlets.SimpleWebDavServlet)". This
>> should provide a whole lot of options. One of which is the "Collection
>> Primary Type" option, which defaults to sling:Folder.
> 
> 
> The simple webdav servlet configuration only has options for the
> authentication realm and the root path. Am a bit at a loss here..
> 

This means the newest WebDAV bundle is not being used.

Please note (I only realized yesterday), that the news WebDAV bundle has
a required dependency on the org.apache.jackrabbit.jsr283 package. This
package is available from the Jackrabbit API 1.5.0 bundle [1] which must
be deployed. (When building and running Sling from trunk, you should get
this bundle installed already)

After refreshing the packages (or redeploying the WebDAV bundle), the
new configuration should be available. You might also want to inspect
the log file (${sling.home}/log/error.log by default) for any errors.

Hope this helps.

Regards
Felix


[jira] Commented: (SLING-799) Job Folder is not ordered and results in unordered queue

2009-01-03 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12660450#action_12660450
 ] 

Carsten Ziegeler commented on SLING-799:


Ah, right - now I would prefer to use a sorted query and don't rely on any 
(maybe unknown) sorting of the nodes in the repository. An ordered collection 
in jcr only means that it is "somehow" ordered.
So I think we should a) sort the result of the JobStatusProvider methods during 
the query and b) use an ordered folder as this usually shows the order of the 
queue in the repository.

> Job Folder is not ordered and results in unordered queue
> 
>
> Key: SLING-799
> URL: https://issues.apache.org/jira/browse/SLING-799
> Project: Sling
>  Issue Type: Bug
>  Components: Event
>Affects Versions: Extensions Event 2.0.2
>Reporter: Tobias Bocanegra
>
> check code of
> AbstractRepositoryEventHandler.ensureRepositoryPath()
> /**
>  * Check if the repository path already exists. If not, create it.
>  */
> protected Node ensureRepositoryPath()
> throws RepositoryException {
> final Node node = JcrResourceUtil.createPath(this.repositoryPath,
>EventHelper.NODETYPE_FOLDER,
>EventHelper.NODETYPE_FOLDER,
>this.writerSession, true);
> return node;
> }
> this should use a "sling:OrderedFolder"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.