/** * Get the AbstractCommand requested from this factory. This method is implemented in addition in * order to ensure the execution in the PoolContext. */ @Override public AbstractCommand getCommand(final int requestId) { PoolContext.enter(); try { return super.getCommand(requestId); } finally { PoolContext.exit(); } }
/** Recycle the object and put is back into the command factory. */ @Override public final void recycle() { PoolContext.enter(); try { CommandFactory.getInstance().recycle(this); } finally { PoolContext.exit(); } }