Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,412,037
Community Members
 
Community Events
169
Community Groups

How synchronise directory in Fisheye programmatically and receive the information about completion?

Hello.

I use Fisheye and Crucible 4.5.1 and I am writing plugin for them.

I want to synchronize the directory forcibly. I use the following method for that in my plugin:

com.atlassian.crowd.manager.directory.DirectoryManager.synchroniseCache(dirId, SynchronisationMode.INCREMENTAL, true); 

And this works, nessesary directory is synchronised. But I use "true" for the third parameter here. According to https://docs.atlassian.com/atlassian-crowd/2.9.5/com/atlassian/crowd/manager/directory/DirectoryManager.html#synchroniseCache-long-com.atlassian.crowd.manager.directory.SynchronisationMode-boolean- that means that "the synchronise will happen asynchronously".

I do not need to synchronise in background. In other word I need wait, while directory synchronisation is complete and only then do me next activities.

The problem is that when I use "false" instead of "true" the "synchroniseCache" method not work. I recive SocketTimeoutException, directory is not synchronized.

I use "DirectoryManager.synchroniseCache" with "false" in my Jira and Confluence plugins. It works here, directories are synchronised.

Is there some bug in Fisheye\Crucible or do I do something wrong?

How can I synchronize the directory to receive the information that synchronisation is complete?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events