problem when developing a web service consuming dfs

Options
Alex_Liu
edited December 16, 2008 in Documentum #1

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

Comments

  • Oleg
    edited December 15, 2008 #2
    Options

    I couldn't find anything that would block execution in "ContextFactory.getInstance()". Could you please create a plain "Hello world" service and make sure it works? If it does, could you please create a new service with this single "ContextFactory.getInstance()" statement in it and let me know if it hangs or not?

  • aflowers001
    edited December 16, 2008 #3
    Options

    Try wrapping the failing call in a try...catch, but catch a throwable.

    I have had this in a number of other Java based applications over the years that at startup, or whilst running, throw a runtimeexception, or a plain throwable, and normally these are not caught all that well.

    My guess would be that if it works in Eclipse but not standalone then it is possibly either a classpath or java version issue.