youarehow (2) [Avatar] Offline
#1
Hi dear Author, the BookOrderTask bean in listing 9.5 has an APPLICATION scoped BookFeed bean field. The BookFeed bean in listing 9.6 however does not synchronize on the methods such as addApprovedIsbn(). This means BookOrderTask.approve() method not threadsafe. Is that right statement?
tijs.rademakers (494) [Avatar] Offline
#2
Re: Thread safety of BookOrderTask bean in chapter 9
Hi,

Yes you're right. The BookFeed bean is set to application scope because that's an easy implementation for the example. By no means is this the way you should use it in your production application.

Best regards,

Tijs
youarehow (2) [Avatar] Offline
#3
Re: Thread safety of BookOrderTask bean in chapter 9
Hi Tijs, thanks for the reply. I am currently evaluating Activiti but some team member is using jBPM5. So far I am happy with Activiti. One important aspect to verify is the concurrency handling since BPMN implementation abstracts out lots of the details. So I started reading thebook a second time with that in mind and that is how I thought of discussing the above finding. I agree your example choose the easy implementation but it would make things correct if we at least use a synchronized list. smilie
tahers (3) [Avatar] Offline
#4
Re: Thread safety of BookOrderTask bean in chapter 9
I am trying to build a process with my own defined primefaces pages. I am using
I tried index.xhtml as well, but could not succeeded.

There will not be any exception but the form index did not appreared ? Can anyone tel me why ? Any guidance ?