When you request components from Seam container, Seam wires those
objects with interceptors completely wrapping it into a proxy. So yes,
what you get is a proxy which has a different class signature than what
the import statements define in your DRL. However since Seam uses Cglib
to create these proxies, they end up being subclasses of the concrete
class, and you should be able to simply cast them back before inserting
into the WM.
Hope this helps.
Thanks.
Tihomir
On 2/27/11 2:52 AM, sherlock wrote:
Hi,
a newbie question.
I am asserting references to JBoss Seam beans (SFSB) as Drools facts and
it looks that the rule engine does not recognize them as instances of
the original bean POJO class - it looks that it sees the JBoss Seam proxies.
When I use an intermediate non-Seam enabled wrapper POJO class which
wraps the Seam bean everything works, but now there will be an
additional need to maintain set of wrapper classes and in addition DRL
conditions code is cluttered with statements to access the JBoss Seam
beans...
Surely I am missing something, but I cannot find out so far. Googling
didn't seem to find anything helpful.
The environment is: Seam 2.2.0.GA, Drools 5.1.1
Thank you in advance!
sherlock
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users