Message
I tried to use the same JAR for both MySQL and
SQL Server
in JBoss 3.0.5 but couldn't figure out how to
get around
specifying the data-source mapping in the
jbosscmp-jdbc.xml
file. How did you do
that?
I thought about modifying the default
standardjbosscmp-jdbc.xml
but that doesn't seem clean and then I'd have
to restart JBoss.
JD
At the moment we are
able to deploy the same physical EAR image to a variety of application servers
with a variety of databases on the back-end. We achieve this using two system
variables: a container vendor switch and a database vendor switch. The amount of
code that relies on those switches is minuscule so we are happy campers in
portability land. The problem is that we are considering using Oracle triggers
so that we have a uniform mechanism for generating keys: automatically generated
in the database using triggers in Oracle or IDENTITY columns in DB2 or SQL
Server. This means that we need entity-commands in jbosscmp-jdbc.xml (3.2.2
feature) and we need to fork our heretofore database agnostic DDs to specify how
to get the primary key:
<entity-command>mssql-fetch-key</entity-command>
or
<entity-command>sybase-fetch-key</entity-command>
or
<entity-command>oracle-sequence</entity-command>
or
...
Is there any way we
can parameterize this in the DD? I know that sounds like a deployment descriptor
deployment descriptor but it would be nice if we could use the same EAR on any
platform.
Thx