sunlabs.brazil.sunlabs
public class LockTemplate extends Template
Only one lock may be held at a time. The current lock (if any) is automatically released at the end of the template. Care should be taken not to acquire a lock then invoke a blocking operation (such as with the QueueTemplate) or deadlock may occur.
Example:
<lock name="server"> <set namespace="server" name=.....> ... <set namespace="server" name=.....> </lock>This insures that no other session may access the code protected by the "server" lock, either from this or any other template.
Version: @(#)LockTemplate.java 1.1
Method Summary | |
---|---|
boolean | done(RewriteContext hr) |
void | tag_lock(RewriteContext hr)
Acquire a lock, preventing any other session from accessing
the same locked section of markup. |
void | tag_slash_lock(RewriteContext hr)
Release the previosly named lock. |