[webbeans-commits] Webbeans SVN: r1782 - in examples/trunk/conversations: src/main/java/org/jboss/webbeans/examples/conversations and 1 other directory.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Fri Mar 6 04:04:54 EST 2009


Author: nickarls
Date: 2009-03-06 04:04:54 -0500 (Fri, 06 Mar 2009)
New Revision: 1782

Added:
   examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Example.java
Modified:
   examples/trunk/conversations/WebContent/WEB-INF/beans.xml
   examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java
Log:
minor. short conversation timeout for example

Modified: examples/trunk/conversations/WebContent/WEB-INF/beans.xml
===================================================================
--- examples/trunk/conversations/WebContent/WEB-INF/beans.xml	2009-03-06 08:37:50 UTC (rev 1781)
+++ examples/trunk/conversations/WebContent/WEB-INF/beans.xml	2009-03-06 09:04:54 UTC (rev 1782)
@@ -0,0 +1,7 @@
+<Beans xmlns="urn:java:ee" xmlns:conversations="urn:java:org.jboss.webbeans.examples.conversations">
+	<Deploy>
+		<Standard />
+		<Production />
+		<conversations:Example />
+	</Deploy>
+</Beans>
\ No newline at end of file

Modified: examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java
===================================================================
--- examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java	2009-03-06 08:37:50 UTC (rev 1781)
+++ examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java	2009-03-06 09:04:54 UTC (rev 1782)
@@ -12,10 +12,12 @@
 
 import java.io.Serializable;
 
+import org.jboss.webbeans.WebBean;
 import org.jboss.webbeans.conversation.ConversationIdGenerator;
 import org.jboss.webbeans.conversation.ConversationManager;
 import org.jboss.webbeans.conversation.bindings.ConversationInactivityTimeout;
 
+
 @SessionScoped
 @Named("conversations")
 public class Conversations implements Serializable {
@@ -29,6 +31,14 @@
    {
    }
    
+   @Produces
+   @ConversationInactivityTimeout
+   @Example
+   public static long getConversationTimeoutInMilliseconds()
+   {
+      return 10000;
+   }   
+   
    public void abandon() 
    {
       conversation.begin(id.nextId());

Added: examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Example.java
===================================================================
--- examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Example.java	                        (rev 0)
+++ examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Example.java	2009-03-06 09:04:54 UTC (rev 1782)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.examples.conversations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.DeploymentType;
+
+ at Target( { TYPE, METHOD, FIELD })
+ at Retention(RUNTIME)
+ at Documented
+ at DeploymentType
+public @interface Example
+{
+}
\ No newline at end of file




More information about the weld-commits mailing list