jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra" <tobias.bocane...@day.com>
Subject Re: java.lang.IllegalStateException: workspace 'default' not initialized
Date Thu, 27 Jul 2006 18:52:56 GMT
it looks like it should work. although there is some thread-local magic.
can you try to create the 5 sessions beforehand, and pass them to the
tests, instaed of creating them on the fly?

regards, toby

On 7/27/06, sowmi <sowmit@telenav.com> wrote:
>
> fuzzySearch() looks like this:
>
> Session session = SessionManager.getInstance().getSession();
> List list = RepositorySearch.search(session, query, maxItems);
>
> I have a singleton of SessionManager that instantiates the
> TransientRepository
>
> public static synchronized SessionManager getInstance() {
>                 if (sessMgr == null) {
>                         sessMgr = new SessionManager();
>                 }
>                 return sessMgr;
>         }
> private SessionManager() {
>                 try {
>                         repository = new TransientRepository();
>                 } catch (IOException ex) {
>                         log.error("Unable to open the repository.", ex);
>                 }
>         }
>
> Will this still cause a problem?
> --
> View this message in context: http://www.nabble.com/java.lang.IllegalStateException%3A-workspace-%27default%27-not-initialized-tf2006499.html#a5526727
> Sent from the Jackrabbit - Users forum at Nabble.com.
>
>


-- 
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---

Mime
View raw message