Re: AW: Sling+ModeShape

2011-02-15 Thread Felix Meschberger
Hi

thanks for the feedback and congratulations to your success.

Along with Mike Moulton and Mike Müller I invite to contribute back
either in the form of contributing the project setup  or with some
documentation on our wiki.

Thanks !

Regards
Felix

Am Mittwoch, den 09.02.2011, 15:54 + schrieb Alessandro Novarini: 
 Hello list,
 
 As promised, here a quick update and a not-so-quick question.
 
 I think we're almost done with the modeshape-server bundle, we fought a lot 
 with the class loading but now it looks good.
 
 But...
 
 We started this work assuming that replacing the jackrabbit-server bundle was 
 enough to have a sling working, as Carl also confirmed right below.
 Probably we still miss something, but we are now struggling with 
 authentication and authorization; in particular two issues:
 
 ModeShape relies on JAAS to check for valid credentials, and at the moment 
 it's complaining that no configuration is found.
 We tried to add a jaas config file, made Sling point to that file, but we 
 don't know if there are LoginModules already available or if we need to add 
 one to the classpath (we asked to ModeShape forum and they suggested to look 
 at JBoss Picketbox [1]).
 
 So at the moment we replaced the mechanism of authentication with a custom 
 one, and ModeShape is quite happy with that, even though we would like to 
 align the functionality with what Sling is using and is expecting by 
 jackrabbit.
 We came across a strange side-effect there, because now from the web console 
 we cannot do anything without having Sling asking for a login.
 Useless to say that whatever we enter, the login fails :(
 
 Going a step further... we're examining the class 
 org.apache.sling.extensions.webconsolesecurityprovider.internal.SlingWebConsoleSecurityProvider,
  the one that tries to login to the repository passing a SimpleCredentials 
 (triggering the JAAS mechanism skipping our custom one) - method 
 authenticate(String, String).
 
 What scared us was the code just after the repository.login(creds): it seems 
 a bit implementation-dependent,  since all the code is into an if (session 
 instanceof JackrabbitSession), otherwise the method will return null (no 
 success).
 
 Do you confirm what we are thinking, that even fixing our current issue, 
 we're going to have a broken web console?
 
 Thank you in advance
 Ale
  
 
 On Jan 13, 2011, at 4:11 AM, Carl Hall wrote:
 
  We (Sakai Project) are working to replace JCR with a non-JCR backend
  (Cassandra and any JDBC; our mail list details the reasons and factors).
  While this isn't JackRabbit - ModeShape (staying with JCR will be much
  easier), we can certainly attest that changing the storage engine is
  possible with some work.  The Sling code does a great job of decoupling
  itself from the storage mechanism.
  
  
  On Fri, Dec 17, 2010 at 10:27 AM, Alessandro Novarini 
  a.novar...@sourcesense.com wrote:
  
  Hi Simon,
  
  Fine for me, we should start working on the server bundle soon.
  I'll let you know what our progresses are.
  
  Thanks
  Ale
  
  
  On Dec 17, 2010, at 2:28 PM, Gunzenreiner Simon wrote:
  
  Hi Ale
  
  I posted this question originally. Just to give you an update on where we
  stand - we haven't started this work yet, and it probably will be mid
  January until we do. I suggest we share our findings on this list ...
  
  Regards
  Simon
  
  -Ursprüngliche Nachricht-
  Von: Alessandro Novarini [mailto:a.novar...@sourcesense.com]
  Gesendet: Mittwoch, 15. Dezember 2010 18:43
  An: users@sling.apache.org
  Betreff: Sling+ModeShape
  
  Hello list,
  
  I've just subscribed because I would like to know if any progress has
  been made on the replacement of Jackrabbit with another JCR implementation,
  as discussed here:
  
  http://dev.day.com/discussion-groups/content/lists/sling-users/2010-11/2010-11-16_Replacing_jackrabbit_with_other_JCR_implementation_Gunzenreiner_Simon.html
  
  I've tried in the last couple of days to work on it too, taking as sample
  the org.apache.sling.auth.openid bundle, and I've had some hard time 
  because
  at the moment I have little knowledge of ModeShape; anyway, if there was 
  the
  will to work openly on the project, I would be glad to contribute in some
  way.
  
  I don't have the original thread as email so sorry for not directly
  replying to it.
  
  Thanks
  Ale
  
  
 




Re: Build error

2011-02-15 Thread Justin Edelson
Sorry about that. I tried to catch all the dependency changes, but I guess I 
missed this one.

Thanks for catching it.

Justin

On Feb 15, 2011, at 5:56 AM, Markus Joschko markus.josc...@gmail.com wrote:

 The api version has been changed to 1.0.0 which gives me the following
 build error when trying to do a clean compile of trunk:
 
 
 [INFO] 
 
 [ERROR] BUILD ERROR
 [INFO] 
 
 [INFO] Failed to resolve artifact.
 
 Missing:
 --
 1) org.apache.sling:org.apache.sling.launchpad.api:jar:1.0.0
 
  Try downloading the file manually from the project website.
 
  Then, install it using the command:
  mvn install:install-file -DgroupId=org.apache.sling
 -DartifactId=org.apache.sling.launchpad.api -Dversion=1.0.0
 -Dpackaging=jar -Dfile=/path/to/file
 
  Alternatively, if you host your own repository you can deploy the file there:
  mvn deploy:deploy-file -DgroupId=org.apache.sling
 -DartifactId=org.apache.sling.launchpad.api -Dversion=1.0.0
 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
 
  Path to dependency:
1) org.apache.sling:maven-launchpad-plugin:maven-plugin:2.0.11-SNAPSHOT
2) org.apache.sling:org.apache.sling.launchpad.api:jar:1.0.0
 
 --
 1 required artifact is missing.
 
 for artifact:
  org.apache.sling:maven-launchpad-plugin:maven-plugin:2.0.11-SNAPSHOT
 
 from the specified remote repositories:
  apache.snapshots (http://repository.apache.org/snapshots),
  central (http://repo1.maven.org/maven2),
  jboss (https://repository.jboss.org/nexus/content/repositories/releases/)


Re: getting ResourceResolver from JCR Session

2011-02-15 Thread Alexander Klimetschek
On 15.02.11 16:14, sam lee skyn...@gmail.com wrote:

Actually, I am writing Day CQ workflow:

public void execute(WorkItem item, WorkflowSession workflowSession,
MetaDataMap map) throws WorkflowException {

I get Session like:

final Session session = workflowSession.getSession();


Maybe this is Day specific. I'll open a customer support ticket on Day
side.

Not really, workflows are a background scenario where you have no request
and thus pre-defined resource resolver available.

Unless the Sling guys have a replacement for it (i.e. wrapping an existing
jcr session), I would continue to use the JcrResourceResolverFactory at
the moment.

Regards,
Alex

-- 
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel






Re: getting ResourceResolver from JCR Session

2011-02-15 Thread Alexander Klimetschek
On 15.02.11 17:43, Carsten Ziegeler cziege...@apache.org wrote:

If you're using Sling API 2.2.0 you can put the session into the
authentication map:

map.put( user.jcr.session, session);

and then call

getResourceResolver(map) on the ResourceResolverFactory.

Cool, didn't know that. Would probably be useful if this would be noted in
the deprecated notice of the JcrResourceResolverFactory class.

Regards,
Alex

-- 
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel






Re: getting ResourceResolver from JCR Session

2011-02-15 Thread Carsten Ziegeler
Alexander Klimetschek  wrote
 On 15.02.11 17:43, Carsten Ziegeler cziege...@apache.org wrote:
 
 If you're using Sling API 2.2.0 you can put the session into the
 authentication map:

 map.put( user.jcr.session, session);

 and then call

 getResourceResolver(map) on the ResourceResolverFactory.
 
 Cool, didn't know that. Would probably be useful if this would be noted in
 the deprecated notice of the JcrResourceResolverFactory class.
 
Good idea - just did that.

Thanks
Carsten

-- 
Carsten Ziegeler
cziege...@apache.org