To support checked transactions we can only resume if the action is local or we received it implicitly. If the control refers to a nested transaction then we must recreate the entire hierarchy, i.e., the effect of a suspend/resume on the same control should be the same as never calling suspend in the first place. If the control is for a local transaction then it is simple to recreate the hierarchy. Otherwise we rely upon the PropagationContext to recreate it. If this control is a "proxy" then create a new proxy instance, so we can delete proxies whenever suspend is called. Should check if "new" transaction is not actually the current one anyway. If so, just return. The spec. doesn't mention what to do in this case, so for now we go to the overhead of the work regardless.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.