Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How can we logout from EWM using java code

We have a scheduler that runs every 15mins, and everytime when it fetch certain value from ewm workitem.
It is taking from cached value but not the current value in EWM workitem. So we want to try logging out from EWM after the scheduler run completes. So is there any way we can logout from ALM programmatically using Java.

0 votes



2 answers

Permanent link

I'm not aware of a "log me out" operation - the closest equivalent in HTTP terms would be to delete the session where you're connected to ELM so the authentication cookie is erased. I'm not sure how that's done in Java but presumably connecting creates a POJO and you have to ensure it's deleted?

0 votes


Permanent link
The question leaves the important information out: which API do you use.
It also is likely asking the wrong question.
  1. If you use the Plain Java Client Libraries/SDK, 
    1. There is a logout that is shown in the snippets that come with the Plain Java client libraries.
    2. There is no need to log out. You can use the caching mode to resolve/refresh/reload the item.
Other APIs might provide different answers, so consider putting more effort into your question, if you are interested in an answer.

0 votes

Comments
We are getting cached value every time the scheduler runs, we don't want this to happen.
We have tried using logout() and shutdown() method so that we get data from the rtc server for every scheduler run.

Did you read the answer? I am not so sure.

Your are likely using the Plain Java Client Libraries.

Dependent on the code you use, you can pass parameters to refresh the item. e.g. in IItemManager.fetch* or IAuditableCommon.resolveAuditable().

See https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ and https://rsjazz.wordpress.com/2013/01/02/working-with-work-item-attributes/

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,132

Question asked: May 28 '24, 2:30 a.m.

Question was seen: 711 times

Last updated: Jun 05 '24, 9:15 a.m.

Confirmation Cancel Confirm