[seam-dev] incremental outjection

Dan Allen dan.j.allen at gmail.com
Fri Nov 14 01:02:00 EST 2008


The bijection interceptor changed in Seam 2.1 to accommodate a
multi-threaded component (such as an application-scoped component). In
order for this to work, the bijection process is now stretched across
all concurrent invocation of a component using client counting, such
that injection happens when the first client thread invokes the
component and outjection/disinjection happens when the last thread
leaves.

This raises the question of whether we should have incremental
outjection, where outjection would take place as soon as a thread
finished invoking the component. First, do we want to do this? It
seems to make sense to me. Second, in order to do this, we will have
to distinguish between reentrant calls from the same thread and
separate threads (2 types of "clients" so to speak). I think that to
differentiate rentry from invocation by a sibling thread, we need to
introduce a thread-local variable. Is that correct? I guess a
secondary solution would be to put information in the method context.

I'm looking for two answers:
1) Should we do incremental outjection?
2) How would you suggest detecting when it should be done?

-Dan

-- 
Dan Allen
Software consultant | Author of Seam in Action

http://mojavelinux.com
http://mojavelinux.com/seaminaction

NOTE: While I make a strong effort to keep up with my email on a daily
basis, personal or other work matters can sometimes keep me away
from my email. If you contact me, but don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the spam filters.  Please don't hesitate to resend a message if
you feel that it did not reach my attention.



More information about the seam-dev mailing list