-
1. Re: Calling a java class from teiid trigger
rareddy Jul 18, 2012 1:22 PM (in response to rokhmanov)You can use User Defined Function (UDF). A UDF is defined on a view model, and implementation is provided through Java code. See https://docs.jboss.org/author/display/TEIID/User+Defined+Functions
When you define the function like "test123" on the translator it is called "source or pushdown" function, it upto the translator to handle it in translator layer or really push down to source for evaluation. Look the ExecutionFactory class's "addPushDownFunction" method. Also, when the query is passed to translator for evaluation, you need to provide hooks to evaluate and return right results.
Ramesh..
-
2. Re: Calling a java class from teiid trigger
shawkins Jul 18, 2012 1:48 PM (in response to rokhmanov)Andriy,
We hook into Java either through a translator or a UDF. You're choice would mostly be about calling style, function/procedure/table abstraction. If you don't need a result set and only have in parameters then you can use function.
Steve
-
3. Re: Calling a java class from teiid trigger
rokhmanov Jul 18, 2012 2:35 PM (in response to shawkins)Thanks Steve and Ramesh. I want to do something with the results of continuous execution (fire some actions based on conditions). I think calling UDF from trigger is exactly what I need.