[seam-issues] [JBoss JIRA] Commented: (JBSEAM-3086) Allow bypass-interceptors to be set in components.xml

Thomas Küstermann (JIRA) jira-events at lists.jboss.org
Thu Apr 22 04:10:11 EDT 2010


    [ https://jira.jboss.org/jira/browse/JBSEAM-3086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12526951#action_12526951 ] 

Thomas Küstermann commented on JBSEAM-3086:
--------------------------------------------

Added our implementation, usage example:

<component name="wordUtils" scope="event" auto-create="true" bypass-interceptors="true" class="org.apache.commons.lang.WordUtils" />

> Allow bypass-interceptors to be set in components.xml
> -----------------------------------------------------
>
>                 Key: JBSEAM-3086
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3086
>             Project: Seam
>          Issue Type: Feature Request
>          Components: Core
>            Reporter: Luke Maurer
>         Attachments: JBSEAM-3086-patch.txt
>
>
> It would be very convenient to be able to define a "component" in components.xml without actually having it be wrapped in a proxy, in cases where I just want to have an object put into application context and have a few setters called on it, but don't need any interceptors installed.
> For a use case, see http://www.jasypt.org/hibernate3.html (the "Providing the encryptor to Hibernate" section) - instructions are given for a convenient way to configure the library using Spring, even though the classes in question (StandardPBEStringEncryptor and HibernatePBEStringEncryptor) were not written as Spring beans. The equivalent code in Seam components.xml does not work, since Seam attempts to proxy the objects, and the classes are final (Javassist throws a CannotCompileException). Since none of the functionality offered by proxies is required, in principle the only requirement to make this work would be a way to turn off proxying. (Presumably Spring does so automatically here.)
> Naturally, there is a perfectly good workaround, which would be to use a @Factory or @Unwrap method on a Seam component and include setter methods to do the configuration. But this is a lot of tedious glue code, and I find the idea of directly configuring the objects in components.xml to be much more elegant.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the seam-issues mailing list