You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by tv...@apache.org on 2018/11/26 15:02:23 UTC
[8/9] tomee git commit: Added more text to introduction explaining
the producers. This text is cribbed from the cdi-produces-disposes exampmle.
Added more text to introduction explaining the producers. This text is cribbed from the cdi-produces-disposes exampmle.
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/4460f837
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/4460f837
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/4460f837
Branch: refs/heads/master
Commit: 4460f837d044ebb9bd5cac3bb83d93d6b3fe6750
Parents: 34a3f23
Author: Richard Monson-Haefel <Ri...@Uncommon-Design.com>
Authored: Mon Nov 26 08:33:21 2018 -0600
Committer: Richard Monson-Haefel <Ri...@Uncommon-Design.com>
Committed: Mon Nov 26 08:33:21 2018 -0600
----------------------------------------------------------------------
examples/cdi-produces-field/README.md | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/4460f837/examples/cdi-produces-field/README.md
----------------------------------------------------------------------
diff --git a/examples/cdi-produces-field/README.md b/examples/cdi-produces-field/README.md
index 60f0387..cbf32bc 100644
--- a/examples/cdi-produces-field/README.md
+++ b/examples/cdi-produces-field/README.md
@@ -5,6 +5,17 @@ This example shows the usage of the @Produces annotation. @Produces is a CDI mec
a producer field can be used. A producer field can be used instead of a simple getter method. It could be used to
inject resources, such as persistence contexts. One caveat to using producer fields over producer
methods is that a @Disposes method cannot be used in conjunction with @Produces field.
+
+For the purposes of this example, the type is hard-coded to a specific value.
+A Logger implementation shall contain a list of LogHandlers. We shall have three implementations of the LogHandler interface.
+
+ * A DatabaseHandler
+ * A FileHandler
+ * A ConsoleHandler
+
+The DatabaseHandler would seemingly write the logs to a database. The FileHandler would write the same logs to a file.
+The ConsoleHandler would just print the logs to a console (Standard out). This example is just an illustration of how
+the concepts within CDI work and is not intended to provide a logging framework design/implementation.
## ConsoleHandler