Whenever you have a method like this:
@Out(scope=ScopeType.EVENT) @Factory Boolean getSomeFlag () { return this.someMethod() != null; }
public Object bijectTargetComponent(InvocationContext invocation) throws Exception { if (component.needsInjection()) //only needed to hush the log message { if ( log.isTraceEnabled() ) { log.trace("injecting dependencies of: " + component.getName()); } component.inject(invocation.getTarget()/*, true*/); } Object result = invocation.proceed(); if (component.needsOutjection()) //only needed to hush the log message { if ( log.isTraceEnabled() ) { log.trace("outjecting dependencies of: " + component.getName()); } component.outject(invocation.getTarget()); } return result; }
In the CVS version of Seam there is a new kind of @Factory method which can be used like this. Check the docs in CVS.