OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

sca-j message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: NEW ISSUE: Clarify what a Component Implementation can do with threads





The current SCA-J specification does not mention any restrictions regarding threading that a developer must comply with when implementing a SCA Component. The SCA-J specification is silent on whether a component implementation can create new threads, kill threads, suspend threads, etc.


Implementations of SCA-J SCA Runtime are likely to use ThreadLocals to implement accessing the RequestContext, security credentials, Conversation IDs on Service Proxies, etc. If the developer is allowed to create their own threads, then these ThreadLocals may not function as intended.


The EJB 3 specification contains the following comment regarding threads (page 546 of ejb-3_0-fr-spec-ejbcore.pdf [1])


The enterprise bean must not attempt to manage threads. The enterprise bean must not attempt to start, stop, suspend, or resume a thread, or to change a thread’s priority or name. The enterprise bean must not attempt to manage thread groups.


These functions are reserved for the EJB container. Allowing the enterprise bean to manage threads would decrease the container’s ability to properly manage the runtime environment.


This issue is related to JAVA-61 which describes what the Component Implementation can expect from the SCA Runtime for each Scope with regards to threading. However, it is different since this issue describes what the SCA Runtime can expect from the Component Implementation with regards to threads.





Nothing concrete as yet but we have at least the following options available to us for consideration:


1)       Do nothing – Leave the SCA-J specification as is and remain silent on threading

2)       Restrict threading (like EJB3) so that threads cannot be created, stopped, suspended, etc

3)       Allow creation of new threads in SCA-J and describe how it works and what are the restrictions




[1] EJB 3 final Specifications - http://jcp.org/aboutJava/communityprocess/final/jsr220/index.html


Mark Combellack| Software Developer| Avaya | Eastern Business Park | St. Mellons | Cardiff | CF3 5EA | Voice: +44 (0) 29 2081 7624 | mcombellack@avaya.com



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]