[QFJ-396] Thread safe or not Created: 22/Jan/09 Updated: 22/Jan/09 Resolved: 22/Jan/09 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Other | Priority: | Default |
Reporter: | sangeetha | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None |
Description |
Are the callback methods like onCreate() fromApp() toAdmin() etc thread safe. I am asking because I have two connections in the same application, SocketAcceptor and SocketInitiator connection. |
Comments |
Comment by Steve Bate [ 22/Jan/09 ] |
The callbacks may be invoked from multiple threads and it's the callback coder's responsibility to ensure their callback code is thread safe. In other words, QFJ doesn't manage threads to avoid the need for thread-safe in the callbacks (it's doesn't make the same guarantees as a J2EE EJB container, for example). The callbacks should be thread safe even if you don't have both an acceptor and an initiator. |