Can you do me favor and use forms at
http://community.jboss.org/en/teiid?view=discussions
for questions. It has better formatting for code and easily searchable
than mailing list. Thanks.
Your answer is below.
On Thu, 2010-07-15 at 16:32 -0400, Charles Simon wrote:
I am trying to use the additional properties. The
"key=value" pairs
after the semi-colon in the URL or set as
TeiidDataSource.setAdditionalProperties(...).
I cannot figure out where/how these additional properties get passed to
my translator. When are they available so I can capture them for use in
my ResultSetExecution object? I thought they would get passed into my
subclasses for ExecutionFactory or BasicConnetionFactory. Or possibly
they need to parameters of my BasicConnction subclass?
What am I missing?
No, they never get passed to your Translator. These are connection
properties that may be dynamic in nature, that *may* influence the how
query results are generated based if passed to translator. Once the VDB
is built, the generation of the results is defined, and should be same
for all users. So, no per user properties.
If you defined properties in your 'ExecutionFactory' as defined here
http://docs.jboss.org/teiid/7.0.0/developer-guide/en-US/html_single/#d0e516
using @TranslatorProperty, then those properties can be supplied through
"vdb.xml". For example, say you defined "foo" property and its
get/set
methods, then in "vdb.xml" (check the additional "translator"
fragment)
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
<vdb name="imageVDB" version="1">
<property name="UseConnectorMetadata" value="cached" />
<model name="Images">
<source name="mysql" translator-name="mysql"
connection-jndi-name="java:imageDS"/>
</model>
<translator name="extended-mysql" type="mysql">
<property name="foo" value"bar"/>
</translator>
</vdb>
The value will be injected into your translator at invocation time.
Seems like this is missing from our docs. can you log JIRA on that, we
will update.
Thanks
Ramesh..