I am creating a web service which is going to do full-text search and some query on the repository.
I am using the code from the sdk examples.
When I run the code as a java application on eclipse, it works fine.
But when I expose the class to a web service, the code fail while not throwing exception
After some checking, I found that the code stopped running or just stuck when setting the context at the following line:
ContextFactory contextFactory = ContextFactory.getInstance(); // <---
serviceContext = contextFactory.newContext();
RepositoryIdentity repoId = new RepositoryIdentity();
repoId.setRepositoryName(defaultRepositoryName);
repoId.setUserName(userName);
repoId.setPassword(password);
I try to guess the reason, I wonder if my web service have occupy some resouces (e.g. jar) that was running in an single thread
so that the getInstance wait for the notification.
Is there any other problem with this or any other way to get a ContextFactory.
Thanks,
Alex