/** * Cleans everything up */ @PrePassivate @PreDestroy public void cleanup() { try { connection.close(); connection = null; } catch (SQLException sqle) { sqle.printStackTrace(); } }
/** * @PrePassivate: Marks a method to be invoked before the container passivates the instance. * This method is called before the bean is passivate by the Container. * This method with @PrePassivate annotation correspond to the ejbPassivate() method used in EJB 2.x. */ @PrePassivate public void passivate() { System.out.println("passivate"); someVarNoSerializable = null; // we must set null // myConnection = null; }
@PreDestroy @Remove @PrePassivate public void remove() { this.account = null; this.em = null; this.queue = null; this.queueFactory = null; this.ctx = null; }
@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 passivate() { logger.info("the bean is passivating"); }
@PrePassivate private void prePassivate() { logger.info("In PrePassivate method"); }
@PrePassivate private void prePassivate(InvocationContext context) { System.out.println("MyStatefulBean.prePassivate"); }
@PreDestroy @Remove @PrePassivate public void remove() { this.agency = null; this.em = null; this.ctx = null; }
@PrePassivate public void passivate(InvocationContext ctx) { System.out.println("[CountCallbacks] @PrePassivate"); }
@PrePassivate public void passivate() { System.out.println("[CountBean] @PrePassivate"); }
@PrePassivate public void onPrePassivate() { // Session-Statistik aktualisieren BestellvorgangSessionStatistics.passivatedSessions++; BestellvorgangSessionStatistics.activeSessions--; }
@PrePassivate public void vorPassivierung() { meinZustand = Zustand.SCHLAFEND; }
@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() { }
@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 runtime exceptions. */ @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 runtime exceptions. */ @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 runtime exceptions. */ @PrePassivate public void classInterceptorPrePassivate(final InvocationContext ctx) throws Exception { Interceptor.profile(ctx, "classInterceptorPrePassivate"); ctx.proceed(); return; }
/** * 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. * * @param ctx - InvocationContext * @throws Exception runtime exceptions. */ @PrePassivate public void defaultInterceptorPrePassivate(final InvocationContext ctx) throws Exception { Interceptor.profile(ctx, "defaultInterceptorPrePassivate"); ctx.proceed(); }