📄 countcallbacks.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -