On Jun 16, 2010, at 11:44 AM, Barry Lafond wrote:
As far as JNDI name, since the JNDI name is really constructed with
"Workspace" info (i.e. workspace uuid, project path, model name) AND DQP is
responsible for communicating with Teiid (i.e. managing Data Sources) then the JNDI name
should be managed in DQP.
You just agreed the name is generated from things that are entirely local. What does
eventual communication with Teiid have to do with anything? The same name would be used
on multiple instances of Teiid, so communication with a particular instance is irrelevant
(But see below).
In all cases, the JNDI name should be given to the VDB when models
are added, just like Translators... OR users given the option of
"searching/selecting" existing Translators and Data Sources. (See my comments
yesterday
onhttps://jira.jboss.org/browse/TEIIDDES-411)
This is a distinction between preview and "real" VDBs. PVDBs will always get a
generated name. For real VDBs, the user will have to know an existing name to enter. We
could offer a way to select an existing name from a server, but AFAIK, that's still
out-of-scope.
Simple scenario, 1) user creates relational model from one URL Oracle
source. 2) User previews model (JNDI name is auto-generated) 3) User changes Connection
Profile for Model to different URL Oracle Source 4) user previews model (JNDI name is
auto-generated but DS already exists but with wrong URL. So we either need to "clean
up JNDI" names when CP's change for model or find some other way to match.
Without DS "type" or URL info, there's no way to know what's behind a DS
on a Teiid Server.. short of opening up JON/JOPR. Again, JNDI names, though simple, are
tied closely with Connection info, which is exclusive to the DQP. Hence DQP manages JNDI
names as well as Data Sources on server. VDB's don't need to know anything but
the value of the JNDI name string.
We certainly need to either re-create the CP whenever the underlying property values
change, which DQP would be responsible for, but that has nothing to do with the JNDI name.
There's nothing related to the name that DQP would need to manage. Not sure what you
mean by Connection info, but connection profile info is a DTP concern, not DQP, and again,
the names have nothing to do with that info.
Having said all that, mostly to ensure we're on the same page wrt the implementation
details, maybe it does make sense to me that DQP manages that name since:
a) the whole concept is a runtime concern to begin with
b) it's not a required attribute in the vdb.xml
c) I'm going to have to expose the JNDI name anyway for real VDBs, so the preview code
should be able to just set the value via an exposed setter for that property
One obliquely related aside: Right now, the workspace UUID generation is being handled by
the VDB plug-in activator class. I probably should move that to ModelerCore.
Thanks,
JPAV