]
Luke Maurer commented on JBSEAM-3086:
-------------------------------------
Ah - yes, that'd do it. (Hadn't realized @BypassInterceptors bypasses proxying
entirely ... makes sense.)
Allow bypass-interceptors to be set in components.xml
-----------------------------------------------------
Key: JBSEAM-3086
URL:
http://jira.jboss.com/jira/browse/JBSEAM-3086
Project: Seam
Issue Type: Feature Request
Components: Core
Reporter: Luke Maurer
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: