<div dir="ltr">Hi guys,<div><br></div><div>following request scope thread and to center the discussion on the thread safety part: do we work on this?</div><div><br></div><div>Background: @RequestScoped is often used as a ThreadLocal instance solution. A lot of SE or Batch implementations rely on it from what I saw as well as async implementations reusing existing business logic with this thread safety constraint.</div><div><br></div><div>Proposal: providing a @ThreadScoped implementation is cheap for CDI and implemenation and would avoid the headache we can have with @RequestScoped. Will also remove the quite dark side of the spec regarding servlet request and request scope since now we would have a more natural solution for all of these situation so @RequestScoped goals wouldn't collide as much.</div><div><br></div><div>Questions:</div><div>- is it automatically started as request scoped is (JMS, @Async, ...)? Alternative could be some configuration in beans.xml (merged accross the app):</div><div><br></div><div><beans></div><div> <scopes></div><div> <thread></div><div> <active>JMS</active></div><div> <active>ASYNCHONOUS</active><br></div><div> </thread></div><div> </scopes></div><div></beans></div><div><br></div><div>- start/stop API (this is typically an API the user should be able to control for its own threads)</div><div>- CDI 2.*0*?</div><div><br></div><div>wdyt?<br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br><span style="font-size:small">Romain Manni-Bucau</span><br><a href="https://twitter.com/rmannibucau" target="_blank">@rmannibucau</a> | <a href="http://rmannibucau.wordpress.com" target="_blank">Blog</a> | <a href="https://github.com/rmannibucau" target="_blank">Github</a> | <a href="https://www.linkedin.com/in/rmannibucau" target="_blank">LinkedIn</a> | <a href="http://www.tomitribe.com" target="_blank">Tomitriber</a></div></div></div></div></div></div></div></div></div></div>
</div></div>