[jboss-cvs] jboss-seam/src/main/org/jboss/seam ...
Gavin King
gavin.king at jboss.com
Thu Oct 12 21:27:31 EDT 2006
User: gavin
Date: 06/10/12 21:27:31
Modified: src/main/org/jboss/seam Component.java
Log:
use Semaphore in @Synchronized
Revision Changes Path
1.189 +15 -4 jboss-seam/src/main/org/jboss/seam/Component.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Component.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Component.java,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -b -r1.188 -r1.189
--- Component.java 12 Oct 2006 00:09:45 -0000 1.188
+++ Component.java 13 Oct 2006 01:27:31 -0000 1.189
@@ -32,6 +32,7 @@
import java.util.Locale;
import java.util.Map;
import java.util.Set;
+import java.util.concurrent.Semaphore;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
@@ -109,7 +110,7 @@
*
* @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
* @author Gavin King
- * @version $Revision: 1.188 $
+ * @version $Revision: 1.189 $
*/
@Scope(ScopeType.APPLICATION)
public class Component
@@ -127,6 +128,7 @@
private boolean startup;
private String[] dependencies;
private boolean synchronize;
+ private long timeout;
private Method destroyMethod;
private Method createMethod;
@@ -211,10 +213,14 @@
}
synchronize = beanClass.isAnnotationPresent(Synchronized.class);
- if (synchronize && scope==STATELESS)
+ if (synchronize)
+ {
+ if (scope==STATELESS)
{
throw new IllegalArgumentException("@Synchronized not meaningful for stateless components: " + name);
}
+ timeout = beanClass.getAnnotation(Synchronized.class).timeout();
+ }
jndiName = getJndiName(applicationContext);
@@ -1903,4 +1909,9 @@
return preDestroyMethod;
}
+ public long getTimeout()
+ {
+ return timeout;
+ }
+
}
More information about the jboss-cvs-commits
mailing list