jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frizz <frizzthe...@googlemail.com>
Subject Repository is started up and shut down in every call
Date Tue, 17 Jun 2014 10:14:20 GMT
I have a small WebService that's deployed in an OSGi container using
Jackrabbit 2.6.2

(1) Initialization for JCR (only done once):

RepositoryFactory repositoryFactory = new RepositoryFactoryImpl();
repository = repositoryFactory.getRepository(cfgMap);

(2) Because Jackrabbit is not thread safe I do the following for each
WebService request:

session = repository.login(new SimpleCredentials(USER_NAME, PASSWORD));
... do some query stuff ...
session.logout();
session = null;

But when I check my logfile it seems that in each WebService call
Jackrabbit is COMPLETELY started up and shut down -> slowing everything
down.

Is this really the way Jackrabbit is supposed to work? Am I doing something
wrong?

Especially those "Database XZY shutdown" don't look right to me, no?

Also: I see a "Repository started (xyz ms)" in every call.



-- First WebService Call: --

Starting repository...
LocalFileSystem initialized at path \user\temp\repository\repository
LocalFileSystem initialized at path \user\temp\repository\version
initializing workspace 'default'...
LocalFileSystem initialized at path \user\temp\repository\default
Index initialized: \user\temp\repository\index
workspace 'security' initialized
Repository started (915ms)
Transient repository initialized
Session opened

... do some query stuff ...

Session closed
Shutting down repository...
shutting down workspace 'default'...
Notification of EventListeners stopped.
workspace 'default' has been shutdown
shutting down workspace 'security'...
Notification of EventListeners stopped.
Index closed: \user\temp\repository\index
Database \user\temp\repository\workspaces\security\db' shutdown.
workspace 'security' has been shutdown
Database \user\temp\repository\version\db shutdown
Repository has been shutdown
Transient repository shut down


-- Second WebService Call: --

Starting repository...
LocalFileSystem initialized at path \user\temp\repository
LocalFileSystem initialized at path \user\temp\version
initializing workspace 'default'...
LocalFileSystem initialized at path \user\temp\default
Index initialized: \user\temp\index
workspace 'security' initialized
Transient repository initialized
Session opened

... do some query stuff ...

Session closed
Shutting down repository...
shutting down workspace 'default'...
Notification of EventListeners stopped.
workspace 'default' has been shutdown
shutting down workspace 'security'...
Notification of EventListeners stopped.
Index closed: \user\temp\index
Database repository\workspaces\security\db' shutdown.
workspace 'security' has been shutdown
Database \user\temp\version\db shutdown
Repository has been shutdown
Transient repository shut down


-- Third WebService Call: --
... and so one ...


cheers,
Frizz

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message