summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/session/stateful_dd/CountCallbacks.java
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/session/stateful_dd/CountCallbacks.java
downloadStudium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.gz
Studium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/session/stateful_dd/CountCallbacks.java')
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/session/stateful_dd/CountCallbacks.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/session/stateful_dd/CountCallbacks.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/session/stateful_dd/CountCallbacks.java
new file mode 100644
index 0000000..f2ed8b0
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/session/stateful_dd/CountCallbacks.java
@@ -0,0 +1,43 @@
+package examples.session.stateful_dd;
+
+import javax.ejb.InvocationContext;
+
+/**
+ * This class is a lifecycle callback interceptor for the Count bean.
+ * The callback methods simply print a message when invoked by
+ * the container.
+ */
+public class CountCallbacks {
+
+ public CountCallbacks() {}
+
+ /**
+ * Called by the container after construction
+ */
+ public void construct(InvocationContext ctx) {
+ System.out.println("cb:construct()");
+ }
+
+ /**
+ * Called by the container after activation
+ */
+ public void activate(InvocationContext ctx) {
+ System.out.println("cb:activate()");
+ }
+
+ /**
+ * Called by the container before passivation
+ */
+ public void passivate(InvocationContext ctx) {
+ System.out.println("cb:passivate()");
+ }
+
+ /**
+ * Called by the container before destruction
+ */
+
+ public void destroy(InvocationContext ctx) {
+ System.out.println("cb:destroy()");
+ }
+
+}