countcallbacks.java

来自「EJB3.0请一定要上载质量高而且本站没有的源码」· Java 代码 · 共 44 行

JAVA
44
字号
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()");
    }
    
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?