tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KARR, DAVID" <>
Subject Any way to define custom properties in a datasource definition that can be read by the application?
Date Fri, 13 Jan 2017 23:57:26 GMT
My problem may just be a SQL issue, but let me describe the whole problem.

I've written a small back-end service that runs an Oracle query (using Spring JDBC).  I built
it first with a particular datasource in mind, but I knew I would be changing to another datasource,
and also to make it use multiple similarly-formatted datasources.  I was told that they would
all have the same schema, so I wasn't that concerned (dumb).

Using the original datasource, I could run a query like "select variouscolumns from TABLE_NAME
...".  I'm now about to integrate the second datasource, but in this datasource, I have to
do "select variouscolumns from BLAH.TABLE_NAME ..." (what is the Oracle SQL term for what
"BLAH" represents?).

I have to design a strategy will let me use basically the same query on both datasources (and
others).  The best idea I can come up with is defining environment strings associated with
each datasource that represents the "table prefix" (still don't know what that term is). 
This can work, but it's a little annoying.  Is there some way I could define a custom property
in each datasource Resource defined in "tomee.xml" and have that readable by the application?

View raw message