You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Julian Reschke <ju...@gmx.de> on 2009/07/07 14:31:31 UTC

testing Workspace Management

Hi,

according to <https://issues.apache.org/jira/browse/JCR-1608>, 
Jackrabbit (trunk) currently only supports creating workspaces, but not 
deleting them.

The spec allows UnsupportedOperationException on both create and delete.

So what should the TCK do? Discover the repository feature, attempt 
creation, then deletion, but not report an error if the latter fails? 
That may be tricky because it would cause an ever-growing number of 
workspaces being generated every time the TCK is run...

BR, Julian

Re: testing Workspace Management

Posted by Marcel Reutegger <ma...@day.com>.
On Tue, Jul 7, 2009 at 15:36, Julian Reschke<ju...@gmx.de> wrote:
> Marcel Reutegger wrote:
>>
>> I think it should do the following:
>>
>> - attempt to create a workspace
>>    - if it throws a UnsupportedOperationException catch the exception
>
> If the repository descriptor says workspace management is supported, that
> exception should not occur, right?

correct. that's how I understand the spec.

regards
 marcel

>> and throw a NotExecutableException
>>    - if it succeeds
>>        - do a login on the newly created workspace
>>        - attempt to delete the workspace
>>            - if it throws a UnsupportedOperationException catch the
>> exception and throw a NotExecutableException
>>            - if it succeeds check if it is gone by doing a login into
>> the deleted workspace and expect an exception
>
> Of course.
>
>>> That
>>> may be tricky because it would cause an ever-growing number of workspaces
>>> being generated every time the TCK is run...
>>
>> well, I don't think that's a big problem.
>> ...
>
> I think it would be a problem, but an implementation of course can avoid it
> by allowing removal of a workspace.
>
> BR, Julian
>
>

Re: testing Workspace Management

Posted by Julian Reschke <ju...@gmx.de>.
Marcel Reutegger wrote:
> I think it should do the following:
> 
> - attempt to create a workspace
>     - if it throws a UnsupportedOperationException catch the exception

If the repository descriptor says workspace management is supported, 
that exception should not occur, right?

> and throw a NotExecutableException
>     - if it succeeds
>         - do a login on the newly created workspace
>         - attempt to delete the workspace
>             - if it throws a UnsupportedOperationException catch the
> exception and throw a NotExecutableException
>             - if it succeeds check if it is gone by doing a login into
> the deleted workspace and expect an exception

Of course.

>> That
>> may be tricky because it would cause an ever-growing number of workspaces
>> being generated every time the TCK is run...
> 
> well, I don't think that's a big problem.
> ...

I think it would be a problem, but an implementation of course can avoid 
it by allowing removal of a workspace.

BR, Julian


Re: testing Workspace Management

Posted by Marcel Reutegger <ma...@day.com>.
On Tue, Jul 7, 2009 at 14:31, Julian Reschke<ju...@gmx.de> wrote:
> Hi,
>
> according to <https://issues.apache.org/jira/browse/JCR-1608>, Jackrabbit
> (trunk) currently only supports creating workspaces, but not deleting them.
>
> The spec allows UnsupportedOperationException on both create and delete.
>
> So what should the TCK do? Discover the repository feature, attempt
> creation, then deletion, but not report an error if the latter fails?

I think it should do the following:

- attempt to create a workspace
    - if it throws a UnsupportedOperationException catch the exception
and throw a NotExecutableException
    - if it succeeds
        - do a login on the newly created workspace
        - attempt to delete the workspace
            - if it throws a UnsupportedOperationException catch the
exception and throw a NotExecutableException
            - if it succeeds check if it is gone by doing a login into
the deleted workspace and expect an exception

> That
> may be tricky because it would cause an ever-growing number of workspaces
> being generated every time the TCK is run...

well, I don't think that's a big problem.

regards
 marcel

Re: testing node type management

Posted by Julian Reschke <ju...@gmx.de>.
Marcel Reutegger wrote:
> Hi,
> 
> On Tue, Jul 7, 2009 at 15:41, Julian Reschke<ju...@gmx.de> wrote:
>> <https://issues.apache.org/jira/browse/JCR-1591> indicates that only
>> registration, but not removal is supported.
>>
>> Looking at the Javadoc for the unregister methods, I don't see this case
>> considered. So, should we consider this a missing feature of the RI?
> 
> to me, it seems the spec is not clear enough about unregistering node
> types. e.g. what happens if there still is content using that node
> type? AFAICS the spec only talks about collisions when updating a node

I think we can't require repositories to support removal of a node type 
that is in use. We may want to specify the exact exception to be thrown.

> ...

BR, Julian

Re: testing node type management

Posted by Marcel Reutegger <ma...@day.com>.
Hi,

On Tue, Jul 7, 2009 at 15:41, Julian Reschke<ju...@gmx.de> wrote:
> <https://issues.apache.org/jira/browse/JCR-1591> indicates that only
> registration, but not removal is supported.
>
> Looking at the Javadoc for the unregister methods, I don't see this case
> considered. So, should we consider this a missing feature of the RI?

to me, it seems the spec is not clear enough about unregistering node
types. e.g. what happens if there still is content using that node
type? AFAICS the spec only talks about collisions when updating a node
type. and for that case there's also a repository descriptor:
NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED. at least in the spec. I
just saw that it is missing in the Repository interface :-/
(https://jsr-283.dev.java.net/issues/show_bug.cgi?id=793). I think for
unregistration there should be something similar.

regards
 marcel

> And, again, how should the TCK deal with it?
>
> BR, Julian
>
>
>
>
>

testing node type management

Posted by Julian Reschke <ju...@gmx.de>.
Julian Reschke wrote:
> Hi,
> 
> according to <https://issues.apache.org/jira/browse/JCR-1608>, 
> Jackrabbit (trunk) currently only supports creating workspaces, but not 
> deleting them.
> 
> The spec allows UnsupportedOperationException on both create and delete.
> 
> So what should the TCK do? Discover the repository feature, attempt 
> creation, then deletion, but not report an error if the latter fails? 
> That may be tricky because it would cause an ever-growing number of 
> workspaces being generated every time the TCK is run...
> 
> BR, Julian
> ...

And, related to my previous question:

<https://issues.apache.org/jira/browse/JCR-1591> indicates that only 
registration, but not removal is supported.

Looking at the Javadoc for the unregister methods, I don't see this case 
considered. So, should we consider this a missing feature of the RI?

And, again, how should the TCK deal with it?

BR, Julian