|
Java EE 6 example source code file (Generator.java)
The Java EE 6 Generator.java source codepackage weldguess; import java.io.Serializable; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.inject.Produces; @ApplicationScoped public class Generator implements Serializable { private static final long serialVersionUID = -7213673465118041882L; private java.util.Random random = new java.util.Random( System.currentTimeMillis() ); private int maxNumber = 100; java.util.Random getRandom() { return random; } @Produces @Random int next() { return getRandom().nextInt(maxNumber); } @Produces @MaxNumber int getMaxNumber() { return maxNumber; } } Other Java EE 6 examples (source code examples)Here is a short list of links related to this Java EE 6 Generator.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.