jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (Commented) (JIRA) <j...@apache.org>
Subject [jira] [Commented] (OAK-5) JCR bindings for Oak
Date Fri, 09 Mar 2012 10:44:57 GMT

    [ https://issues.apache.org/jira/browse/OAK-5?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225997#comment-13225997
] 

Michael Dürig commented on OAK-5:
---------------------------------

The sandbox currently contains two JCR implementations [1, 2] on top of the Microkernel. Both
implementations are results from experimenting with implementation approaches [3]. [2] is
based on a hacked SPI stack and brings along a lot of further dependencies and lot of legacy.
[1] is a fresh implementation from scratch. Apart from using JcrUtils for acquiring the repository,
both implementations pass above test. 

>From my experience while working on these implementations I suggest we go with [1] and
selectively copy things over from existing libraries (i.e. spi-commons, jcr-commons, ...)
as we go. 

[1] http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/
[2] http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/
[3] https://docs.google.com/presentation/pub?id=1wGoisT6xog9wZi9IfH1rGt-HyiytFNCR3UuD9zd-IK4&start=false&loop=false&delayms=3000#slide=id.p
                
> JCR bindings for Oak
> --------------------
>
>                 Key: OAK-5
>                 URL: https://issues.apache.org/jira/browse/OAK-5
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>            Reporter: Jukka Zitting
>              Labels: jcr
>             Fix For: 0.1
>
>
> One of the proposed goals for the 0.1 release is at least a basic JCR binding for Oak.
Most of that already exists in /jackrabbit/sandbox, we just need to decide where and how to
place it in Oak. I think we should either put it all under o.a.j.oak.jcr in oak-core, or create
a separate oak-jcr component for the JCR binding.
> As for functionality, it would be nice if the JCR binding was able to do at least the
following:
> {code}
> Repository repository = JcrUtils.getRepository(...);
> Session session = repository.login(...);
> try {
>     // Create
>     session.getRootNode().addNode("hello")
>         .setProperty("world",  "hello world");
>     session.save();
>     // Read
>     assertEquals(
>         "hello world",
>         session.getProperty("/hello/world").getString());
>     // Update
>     session.getNode("/hello").setProperty("world", "Hello, World!");
>     session.save();
>     assertEquals(
>         "Hello, World!",
>         session.getProperty("/hello/world").getString());
>     // Delete
>     session.getNode("/hello").delete();
>     session.save();
>     assertTrue(!session.propertyExists("/hello/world"));
> } finally {
>     create.logout();
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message