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 2006/10/26 18:44:50 UTC
SPI: level 2 support
Hi,
I'm currently trying to implement SPI on top of a level 1 store, and see
(when accessed through jcr2spi):
1)
testLogin(com.xythos.jcr.BasicSPITest)javax.jcr.UnsupportedRepositoryOperationException:
level.2.supported is not supported by this repository.
at
org.apache.jackrabbit.jcr2spi.SessionImpl.checkSupportedOption(SessionImpl.java:829)
at
org.apache.jackrabbit.jcr2spi.SessionImpl.getValueFactory(SessionImpl.java:366)
at org.apache.jackrabbit.jcr2spi.SessionImpl.<init>(SessionImpl.java:143)
at
org.apache.jackrabbit.jcr2spi.RepositoryImpl.login(RepositoryImpl.java:78)
at
org.apache.jackrabbit.jcr2spi.RepositoryImpl.login(RepositoryImpl.java:86)
This is caused by the init code for SessionImpl which seems to require a
ValueFactory.
Is this by design (that is, do I need to support L2 in order to use
jcr2spi), or a bug?
Best regards, Julian
Re: SPI: level 2 support
Posted by Angela Schreiber <an...@day.com>.
hi julian
JSR170 1.0 Section 7.1.1.6 Session:
getValueFactory()
This method returns a ValueFactory that is used to create Value objects
for use when setting repository properties (see 7.1.5 Adding and Writing
Properties and 7.1.5.3 Creating Value Objects).If writing to the
repository is not supported (because this is a level 1-only
implementation, for example) an UnsupportedRepositoryOperationException
will be thrown.
thus, i'd say:
= according to the spec it seems required, that Session.getValueFactory
throws the exception in a level 1 repository.
= but...., if the level 1 methods internally make use
of the valuefactory they should probably not fail.... i'll fix
those (PropertyImpl is affected and NodeTtypeManager creation).
regards
angela
Julian Reschke wrote:
> Hi,
>
> I'm currently trying to implement SPI on top of a level 1 store, and see
> (when accessed through jcr2spi):
>
> 1)
> testLogin(com.xythos.jcr.BasicSPITest)javax.jcr.UnsupportedRepositoryOperationException:
> level.2.supported is not supported by this repository.
> at
> org.apache.jackrabbit.jcr2spi.SessionImpl.checkSupportedOption(SessionImpl.java:829)
>
> at
> org.apache.jackrabbit.jcr2spi.SessionImpl.getValueFactory(SessionImpl.java:366)
>
> at
> org.apache.jackrabbit.jcr2spi.SessionImpl.<init>(SessionImpl.java:143)
> at
> org.apache.jackrabbit.jcr2spi.RepositoryImpl.login(RepositoryImpl.java:78)
> at
> org.apache.jackrabbit.jcr2spi.RepositoryImpl.login(RepositoryImpl.java:86)
>
> This is caused by the init code for SessionImpl which seems to require a
> ValueFactory.
>
> Is this by design (that is, do I need to support L2 in order to use
> jcr2spi), or a bug?
>
> Best regards, Julian