jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guo Du <mrdu...@gmail.com>
Subject Re: Jackrabbit management API
Date Thu, 03 Sep 2009 20:24:55 GMT
On Thu, Sep 3, 2009 at 4:43 PM, Thomas Müller<thomas.mueller@day.com> wrote:
>> Think of the complexity of controlling the lifecycle of Derby that
>> uses the DriverManager API in JDBC to startup and shutdown the
>> database.
> Other databases provide betters ways. For HSQLDB and H2, you close the
> database by executing the SQL statement SHUTDOWN. This doesn't even
> require any new Java API. H2 by default closes the database when the
> last connection is closed (like TransientRepository), which is not
> always what you want, but OK. There is also a mechanism to specify a
> 'close delay'.

JCR is very much like a database. The jackrabbit repository host is
much like a embed database, and once it's running, it will act as a db
server for remote client. The life cycle could be managed as database.

1. For repository host
The shutdown method is already exist at least from 1.5.6 at
org.apache.jackrabbit.api.JackrabbitRepository.shutdown(). We just
need another method in JackrabbitRepository to be able to explicit
start up a the repository. For TransientRepository, we just need
expose the exist method startRepository as startup.

2. For remote client
I don't think it's necessary to expose the lifecycle management to
remote client, compare with database, a client is not suppose to
startup/shutdown db server. Client shouldn't even depends on
Jackrabbit API, such as developer normally only deal jdbc instead of
vendor jdbc api.


View raw message