jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Neale" <michael.ne...@gmail.com>
Subject Re: possible performance problem (need a way to test it)
Date Mon, 18 Sep 2006 15:47:51 GMT
remember if you find in "gotchas" please do put them in the wiki for others
to benefit from !

On 9/18/06, Jukka Zitting <jukka.zitting@gmail.com> wrote:
>
> Hi,
>
> On 9/18/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
> > I have identified a possible performance problem with high concurrency
> > querying against JCR. Still, I would like to have an easy way to
> > reproduce it, so that I can profile it. I am wondering if there are in
> > the Jackrabbit source base good samples on how to set up a quick
> > testing repository.
>
> I'm not sure if this is what you're looking for, but the
> TestRepository in org.apache.jackrabbit.core was designed for easy
> test cases. Something like the following would probably suit your
> needs:
>
>     final Repository repository = TestRepository.getInstance();
>     // TODO: Fill in the repository with test data (perhaps using XML
> import)
>     for (int i = 0; i < 100; i++) {
>         new Thread() {
>             public void run() {
>                 try {
>                     Session session = repository.login();
>                     try {
>                         // TODO: Run concurrent tests
>                     } finally {
>                         session.logout();
>                     }
>                 } catch (RepositoryException e) {
>                     e.printStackTrace();
>                 }
>             }
>         }.start();
>     }
>
> No advance configuration required. See the TestRepository javadocs for
> the details.
>
> BR,
>
> Jukka Zitting
>
> --
> Yukatan - http://yukatan.fi/ - info@yukatan.fi
> Software craftsmanship, JCR consulting, and Java development
>

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