/*
 *  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.apache.webbeans.sample.numberguess;


import java.util.Random;

import javax.webbeans.ApplicationScoped;
import javax.webbeans.Produces;

@ApplicationScoped
public class NumberProducer {
   
   Random random = new Random( System.currentTimeMillis() );
   
   private int maxNumber = 100;
   
   java.util.Random getRandom()
   {
      return random;
   }
   
   @Produces @MaxNum int getMaxNumber()
   {
      return maxNumber;
   }
   
   
   @Produces @Rand int next() { 
      return getRandom().nextInt(maxNumber); 
   }
   
} 
@@ -927,16 +927,45 @@
 Scoped;%0A
+import javax.webbeans.Named;%0A
 import j
@@ -989,16 +989,23 @@
 duces;%0A%0A
+@Named%0A
 @Applica
@@ -1047,16 +1047,21 @@
 cer 
+%0A
 %7B%0A   
-%0A  
+private
  Ran
@@ -1074,51 +1074,21 @@
 ndom
- = new Random( System.currentTimeMillis() )
+Number = null
 ;%0A  
@@ -1128,26 +1128,131 @@
 %0A   %0A   
-java.util.
+public NumberProducer()%0A   %7B%0A       this.randomNumber = new Random(System.currentTimeMillis());%0A   %7D%0A   %0A   public 
 Random g
@@ -1286,16 +1286,22 @@
 n random
+Number
 ;%0A   %7D%0A 
@@ -1315,16 +1315,19 @@
 Produces
+%0A  
  @MaxNum
@@ -1327,16 +1327,27 @@
 @MaxNum 
+%0A   public 
 int getM
@@ -1395,20 +1395,16 @@
   %7D%0A   %0A
-   %0A
    @Prod
@@ -1412,14 +1412,29 @@
 ces 
+%0A   
 @Rand 
+%0A   public 
 int 
@@ -1456,27 +1456,33 @@
  return 
-getRandom()
+this.randomNumber
 .nextInt

Add annotation.