/** * Opens a new connection. */ @PostConstruct @PostActivate public void openConnection() { try { connection = dataSource.getConnection(); } catch (SQLException sqle) { sqle.printStackTrace(); } }
/** * @PostActivate: Marks a method to be invoked immediately after the container reactivates the instance. * This method is called after the bean is deserialized and before the * business methoed called by the client run. * This method with @PostActivate annotation correspond to the ejbActivate() method used in EJB 2.x. */ @PostActivate public void activate() { System.out.println("activate"); // reacquire the resources someVarNoSerializable = new Object(); }
@PostActivate public void activate() { final String name = "POST_ACTIVATE" + (++activates); try { lifecycle.push(Enum.valueOf(Lifecycle.class, name)); } catch (final Exception e) { lifecycle.push(name); } }
@PostActivate public void activate() { logger.info("the bean is active"); }
@PostActivate private void postActivate() { logger.info("In PostActivate method"); }
@PostActivate private void postActivate(InvocationContext context) { System.out.println("MyStatefulBean.postActivate"); }
@PostActivate public void activate(InvocationContext ctx) { System.out.println("[CountCallbacks] @PostActivate"); }
@PostActivate public void activate() { System.out.println("[CountBean] @PostActivate"); }
@PostActivate public void onPostActivate() { // Session-Statistik aktualisieren BestellvorgangSessionStatistics.passivatedSessions--; BestellvorgangSessionStatistics.activeSessions++; }
@PostActivate public void nachAktivierung() { meinZustand = Zustand.AUFGEWACHT; }
@PostActivate public void postActivate() { ExecutionChannel.getInstance().notifyObservers("postActivate"); }
public Method PostActivate() throws NoSuchMethodException { return this.getClass().getMethod("PostActivate"); }
@PostActivate public void PostActivate(final InvocationContext invocationContext) throws Exception { record(invocationContext, PostActivate()); }
@PostActivate public void method() { }
@PostActivate public void myActivate() { }
@PostActivate public void myActivate(final Object anInvalidArgument) { }
@Override @PostActivate public void ejbActivate() throws EJBException, RemoteException { }
@PostActivate public void myPostActivate() { }
@PostActivate public void postActivate(final InvocationContext ic) { }
@PostActivate public void beanActivate() throws EJBException, RemoteException { calls.add((Call) Enum.valueOf(Call.class, "EjbActivate" + (++activates))); }
/** * The interceptor method. * This should intercept postActivate of the bean * * @param ctx - InvocationContext * @throws runtime exceptions. */ @PostActivate public void secondClassInterceptorPostActivate(final InvocationContext ctx) throws Exception { Interceptor.profile(ctx, "secondClassInterceptorPostActivate"); ctx.proceed(); return; }
/** * The interceptor method. * This should intercept postActivate of the bean * * @param ctx - InvocationContext * @throws runtime exceptions. */ @PostActivate public void superClassInterceptorPostActivate(final InvocationContext ctx) throws Exception { Interceptor.profile(ctx, "superClassInterceptorPostActivate"); ctx.proceed(); return; }
/** * The interceptor method. * This should intercept postActivate of the bean * * @param ctx - InvocationContext * @throws runtime exceptions. */ @PostActivate public void classInterceptorPostActivate(final InvocationContext ctx) throws Exception { Interceptor.profile(ctx, "classInterceptorPostActivate"); ctx.proceed(); return; }
/** * The interceptor method. * This should intercept postActivate of the bean * * @throws Exception runtime exceptions. */ @PostActivate public void inBeanInterceptorPostActivate() throws Exception { final Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostActivate"); setContextData(ctxData); }
/** * The interceptor method. * This should intercept postActivate of the bean * * @param ctx - InvocationContext * @throws Exception runtime exceptions. */ @PostActivate public void defaultInterceptorPostActivate(final InvocationContext ctx) throws Exception { Interceptor.profile(ctx, "defaultInterceptorPostActivate"); ctx.proceed(); }
@PostActivate public void colorPostActivate() { }