cancel
Showing results for 
Search instead for 
Did you mean: 

Is is possible to work work with Java Threads ind WDJ 04s ?

Former Member
0 Kudos

Hi experts,

it is possible to work with treads in wdj 04s? I want to reder the ui in one therad and another one should read the data from serveral webservices! After all webservice cals are finished the data should be shown on the ui.

Example:

1. User start process -> User see the UI and a progressbar

2. In background the wervice get the data

3. User see the improvement

How it is possible?

It ist not possible withe the progress bar ui element because I always lost one second between the calls....

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I actually tried it once, and the problem is that the main thread doesn't notice that anything changed (in another thread) - so you can't / don't get a UI update! So I had to press a button or something (in the main thread) before the application noticed that something had changed.

I also read somewhere that Java Threads should not be used in Webdynpro's.

Former Member
0 Kudos

Basically, you shouldn't use threads in any Application Server, since the environment is not thread-safe.

I think there's a scheduler API in NW that would fit you best. Create your "task" as a scheduled task, happening once, and query this task using some sort of TimerTrigger.

Would be a way easier if WDP was a bit more advanced, at least I don't see an easy way for you to do that.

One way running J2EE 1.4 would be the use of ejbTimeout.

Hope it helps,

Daniel

Edited by: Daniel Ruiz on Dec 3, 2009 2:24 PM

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi

Have a look at the blog: [Loading... Please wait.|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/4648] [original link is broken] [original link is broken] [original link is broken];. It shows how to do what you want.

BR, Siarhei