Author: dblevins
Date: Tue Apr 12 10:38:17 2011
New Revision: 1091363
URL: http://svn.apache.org/viewvc?rev=1091363&view=rev
Log:
Meta version of access timeout
Added:
openejb/trunk/openejb3/examples/access-timeout-meta/
- copied from r1090509, openejb/trunk/openejb3/examples/access-timeout/
openejb/trunk/openejb3/examples/access-timeout-meta/build.xml
- copied unchanged from r1090810,
openejb/trunk/openejb3/examples/access-timeout/build.xml
openejb/trunk/openejb3/examples/access-timeout-meta/pom.xml
- copied, changed from r1090810,
openejb/trunk/openejb3/examples/access-timeout/pom.xml
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/BusyBee.java
- copied, changed from r1090810,
openejb/trunk/openejb3/examples/access-timeout/src/main/java/org/superbiz/accesstimeout/BusyBee.java
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitBriefly.java
(with props)
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitForever.java
(with props)
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitNever.java
(with props)
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/Metatype.java
(with props)
openejb/trunk/openejb3/examples/access-timeout-meta/src/test/java/org/superbiz/accesstimeout/BusyBeeTest.java
- copied, changed from r1090810,
openejb/trunk/openejb3/examples/access-timeout/src/test/java/org/superbiz/accesstimeout/BusyBeeTest.java
Copied: openejb/trunk/openejb3/examples/access-timeout-meta/pom.xml (from
r1090810, openejb/trunk/openejb3/examples/access-timeout/pom.xml)
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/access-timeout-meta/pom.xml?p2=openejb/trunk/openejb3/examples/access-timeout-meta/pom.xml&p1=openejb/trunk/openejb3/examples/access-timeout/pom.xml&r1=1090810&r2=1091363&rev=1091363&view=diff
==============================================================================
--- openejb/trunk/openejb3/examples/access-timeout/pom.xml (original)
+++ openejb/trunk/openejb3/examples/access-timeout-meta/pom.xml Tue Apr 12
10:38:17 2011
@@ -23,10 +23,10 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.superbiz</groupId>
- <artifactId>access-timeout</artifactId>
+ <artifactId>access-timeout-meta</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
- <name>OpenEJB :: Examples :: @AccessTimeout</name>
+ <name>OpenEJB :: Examples :: @AccessTimeout (Meta)</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Copied:
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/BusyBee.java
(from r1090810,
openejb/trunk/openejb3/examples/access-timeout/src/main/java/org/superbiz/accesstimeout/BusyBee.java)
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/BusyBee.java?p2=openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/BusyBee.java&p1=openejb/trunk/openejb3/examples/access-timeout/src/main/java/org/superbiz/accesstimeout/BusyBee.java&r1=1090810&r2=1091363&rev=1091363&view=diff
==============================================================================
---
openejb/trunk/openejb3/examples/access-timeout/src/main/java/org/superbiz/accesstimeout/BusyBee.java
(original)
+++
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/BusyBee.java
Tue Apr 12 10:38:17 2011
@@ -16,6 +16,10 @@
*/
package org.superbiz.accesstimeout;
+import org.superbiz.accesstimeout.api.AwaitBriefly;
+import org.superbiz.accesstimeout.api.AwaitForever;
+import org.superbiz.accesstimeout.api.AwaitNever;
+
import javax.ejb.AccessTimeout;
import javax.ejb.Asynchronous;
import javax.ejb.Lock;
@@ -46,17 +50,17 @@ public class BusyBee {
return null;
}
- @AccessTimeout(0)
+ @AwaitNever
public void doItNow() {
// do something
}
- @AccessTimeout(value = 5, unit = TimeUnit.SECONDS)
+ @AwaitBriefly
public void doItSoon() {
// do something
}
- @AccessTimeout(-1)
+ @AwaitForever
public void justDoIt() {
// do something
}
Added:
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitBriefly.java
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitBriefly.java?rev=1091363&view=auto
==============================================================================
---
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitBriefly.java
(added)
+++
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitBriefly.java
Tue Apr 12 10:38:17 2011
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.accesstimeout.api;
+
+import javax.ejb.AccessTimeout;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.concurrent.TimeUnit;
+
+@Metatype
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+
+@AccessTimeout(value = 5, unit = TimeUnit.SECONDS)
+public @interface AwaitBriefly {
+}
\ No newline at end of file
Propchange:
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitBriefly.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitForever.java
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitForever.java?rev=1091363&view=auto
==============================================================================
---
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitForever.java
(added)
+++
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitForever.java
Tue Apr 12 10:38:17 2011
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.accesstimeout.api;
+
+import javax.ejb.AccessTimeout;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Metatype
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+
+@AccessTimeout(-1)
+public @interface AwaitForever {
+}
Propchange:
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitForever.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitNever.java
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitNever.java?rev=1091363&view=auto
==============================================================================
---
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitNever.java
(added)
+++
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitNever.java
Tue Apr 12 10:38:17 2011
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.accesstimeout.api;
+
+import javax.ejb.AccessTimeout;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Metatype
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+
+@AccessTimeout(1)
+public @interface AwaitNever {
+}
\ No newline at end of file
Propchange:
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/AwaitNever.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/Metatype.java
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/Metatype.java?rev=1091363&view=auto
==============================================================================
---
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/Metatype.java
(added)
+++
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/Metatype.java
Tue Apr 12 10:38:17 2011
@@ -0,0 +1,12 @@
+package org.superbiz.accesstimeout.api;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Metatype
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.ANNOTATION_TYPE)
+public @interface Metatype {
+}
Propchange:
openejb/trunk/openejb3/examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/Metatype.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied:
openejb/trunk/openejb3/examples/access-timeout-meta/src/test/java/org/superbiz/accesstimeout/BusyBeeTest.java
(from r1090810,
openejb/trunk/openejb3/examples/access-timeout/src/test/java/org/superbiz/accesstimeout/BusyBeeTest.java)
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/access-timeout-meta/src/test/java/org/superbiz/accesstimeout/BusyBeeTest.java?p2=openejb/trunk/openejb3/examples/access-timeout-meta/src/test/java/org/superbiz/accesstimeout/BusyBeeTest.java&p1=openejb/trunk/openejb3/examples/access-timeout/src/test/java/org/superbiz/accesstimeout/BusyBeeTest.java&r1=1090810&r2=1091363&rev=1091363&view=diff
==============================================================================
---
openejb/trunk/openejb3/examples/access-timeout/src/test/java/org/superbiz/accesstimeout/BusyBeeTest.java
(original)
+++
openejb/trunk/openejb3/examples/access-timeout-meta/src/test/java/org/superbiz/accesstimeout/BusyBeeTest.java
Tue Apr 12 10:38:17 2011
@@ -34,7 +34,7 @@ public class BusyBeeTest extends TestCas
final CountDownLatch ready = new CountDownLatch(1);
- final BusyBee busyBee = (BusyBee)
context.lookup("java:global/access-timeout/BusyBee");
+ final BusyBee busyBee = (BusyBee)
context.lookup("java:global/access-timeout-meta/BusyBee");
// This asynchronous method will never exit
busyBee.stayBusy(ready);