<div class="gmail_quote">On Wed, Jul 22, 2009 at 9:11 AM, Steve Roy <span dir="ltr"><<a href="mailto:steveroy@ensighttech.com">steveroy@ensighttech.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><br></div>It would be nice if the design made it easy for resources to be released when the beforePhase/afterPhase processing completes so developers don't inadvertently forget to release expensive resources.<div>
<br></div><div>I can see the need for the feature. There is a danger though, that it makes it too easy for developers to implement time & resource expensive operations for invocations of the JSF lifecycle, which should be considered time sensitive.</div>
</blockquote><div><br>My focus was not necessarily on hooks to cleanup expensive resources. To clarify, my focus is to get listeners to tie in better with the EE platform. For instance, if I am developing an extension to JSF, and I want to manipulate the JSR-299 conversation or perhaps wrap one or more phases in a UserTransaction, there is no portable way to inject the necessary components. Another use case is that I want to store state in a JSR-299 contextual object or a stateful EJB session bean (or a hybrid of the two). Again, no portable way to access this bean. What I am looking for are injections like the following:<br>
<br>@Resource UserTransaction transaction;<br>@Current Conversation conversation;<br>@EJB Cart cart;<br>@Current StatusMessages statusMessages;<br><br>Right now phase and system event listeners have to use JNDI to get at any of those resources, with subsequent calls necessary in some cases (such as to get a contextual instance from the BeanManager).<br>
<br>My point is that managed objects in the Java EE platform should be able to receive injections. I see phase listeners and system event listeners as managed objects.<br><br>-Dan<br></div></div><br>-- <br>Dan Allen<br>Senior Software Engineer, Red Hat | Author of Seam in Action<br>
Registered Linux User #231597<br><br><a href="http://mojavelinux.com">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction">http://mojavelinux.com/seaminaction</a><br><a href="http://in.relation.to/Bloggers/Dan">http://in.relation.to/Bloggers/Dan</a><br>