下面列出了怎么用javax.ejb.PrePassivate的API类实例代码及写法,或者点击链接到github查看源代码。
@PrePassivate
public void passivate() {
final String name = "PRE_PASSIVATE" + (++passivates);
try {
lifecycle.push(Enum.valueOf(Lifecycle.class, name));
} catch (final Exception e) {
lifecycle.push(name);
}
}
@PrePassivate
public void businessMethod() {
}
@PrePassivate
public void prePassivate() {
ExecutionChannel.getInstance().notifyObservers("prePassivate");
}
public Method PrePassivate() throws NoSuchMethodException {
return this.getClass().getMethod("PrePassivate");
}
@PrePassivate
public void PrePassivate(final InvocationContext invocationContext) throws Exception {
record(invocationContext, PrePassivate());
}
@PrePassivate
public void method() {
}
@PrePassivate
public void colorPrePassivate() {
}
@PrePassivate
public void myPassivate() {
}
@PrePassivate
public void myPassivate() {
}
@Override
@PrePassivate
public void ejbPassivate() throws EJBException, RemoteException {
}
@PrePassivate
public void myPrePassivate() {
}
@PrePassivate
public void prePassivate(final InvocationContext ic) {
}
@PrePassivate
public void beanPassivate() throws EJBException, RemoteException {
calls.add((Call) Enum.valueOf(Call.class, "EjbPassivate" + (++passivates)));
}
/**
* The interceptor method.
* This should intercept prePassivate of the bean.
*
* @param ctx - InvocationContext
* @throws Exception
*/
@PrePassivate
public void secondClassInterceptorPrePassivate(final InvocationContext ctx) throws Exception {
Interceptor.profile(ctx, "secondClassInterceptorPrePassivate");
ctx.proceed();
return;
}
/**
* The interceptor method.
* This should intercept prePassivate of the bean.
*
* @param ctx - InvocationContext
* @throws Exception
*/
@PrePassivate
public void superClassInterceptorPrePassivate(final InvocationContext ctx) throws Exception {
Interceptor.profile(ctx, "superClassInterceptorPrePassivate");
ctx.proceed();
return;
}
/**
* The interceptor method.
* This should intercept prePassivate of the bean.
*
* @param ctx - InvocationContext
* @throws Exception
*/
@PrePassivate
public void classInterceptorPrePassivate(final InvocationContext ctx) throws Exception {
Interceptor.profile(ctx, "classInterceptorPrePassivate");
ctx.proceed();
return;
}
@PrePassivate
public void ejbStore(){
}
/**
* The interceptor method.
* This should intercept prePassivate of the bean.
*
* @throws Exception runtime exceptions.
*/
@PrePassivate
public void inBeanInterceptorPrePassivate() throws Exception {
final Map<String, Object> ctxData = Interceptor.profile(this, Thread.currentThread().getStackTrace()[4].getMethodName());
setContextData(ctxData);
}
/**
* The interceptor method.
* This should intercept prePassivate of the bean.
*
* @throws Exception runtime exceptions.
*/
@PrePassivate
public void inBeanInterceptorPrePassivate() throws Exception {
final Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPrePassivate");
setContextData(ctxData);
}
/**
* The interceptor method.
* This should intercept prePassivate of the bean.
*
* @throws Exception runtime exceptions.
*/
@PrePassivate
public void inBeanInterceptorPrePassivate() throws Exception {
final Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPrePassivate");
setContextData(ctxData);
}
/**
* The interceptor method.
* This should intercept prePassivate of the bean.
*
* @param ctx - InvocationContext
* @throws Exception runtime exceptions.
*/
@PrePassivate
public void defaultInterceptorPrePassivate(final InvocationContext ctx) throws Exception {
Interceptor.profile(ctx, "defaultInterceptorPrePassivate");
ctx.proceed();
}
/**
* The interceptor method.
* This should intercept prePassivate of the bean.
*
* @throws Exception runtime exceptions.
*/
@PrePassivate
public void inBeanInterceptorPrePassivate() throws Exception {
final Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPrePassivate");
setContextData(ctxData);
}