jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller" <thomas.tom.muel...@gmail.com>
Subject Re: remove JackrabbitRepository.shutdown()
Date Tue, 15 Apr 2008 13:24:51 GMT

> > - Applications must hardcode a specific class,
> > org.apache.jackrabbit.core.RepositoryImpl
>  you have to hard code that in any case, because otherwise you cannot start
> the repository.
> Repository construction and destruction is not specified in JSR 170 nor in JSR 283.

Do you mean "repository creation and deletion" or "repository object
creation and closing"? JSR 283, version 2.0, public review 2 July
2007, page 49 talks about "Repository Construction".

>  why is that an issue?

When the application has to link to a specific class it is not
possible to create wrappers (for example JCRLog). When the application
links to an interface this is not an issue.

>  but this is about getting a connection and closing it again, which is
> equivalent to obtaining a JCR session and logging out when your done. that's
> already standardized in JSR 170.

There is no 'Database' interface in the JDBC API, and applications
don't need it. When using the JCR API, you first have to have to
construct a Repository object to get a Session. Yes, closing a
database is vendor specific. However it is still possible without
having to cast to a specific interface or class, that means it is
still possible to write a wrapper around the JDBC API. To close a
database in HSQLDB and H2, you execute the SQL statement "SHUTDOWN".
Apache Derby is a bit more complicated: you have to open connection
with a special URL. But in all cases, you don't need to import any
vendor specific interface or class.


View raw message