Hi Frank,

Is it possible to set the platform setting at runtime based on the
specified driver name ?

This shouldn't be a problem. Set all common properties in the repository file and in a startup class lookup (before the frist use of PB instances) the jdbc-connection-descriptor and set the missing properties.

ConnectionRepository cr = MetadataManager.
                            getInstance().connectionRepository();
JdbcConnectionDescriptor jcd = cr.getDescriptor(pbKey);
jcd.setXYZ(...)
...

Or do the whole connection setup at runtime and don't specify a
jdbc-connection descriptor in repository file

http://db.apache.org/ojb/faq.html#Connect%20to%20database%20at%20runtime?

regards,
Armin

Frank Renaers wrote:

Hi,



We are using a jndi Datasource to connect to the database.



<jdbc-connection-descriptor

jcd-alias="descriptor_with_jndi_datasource"

default-connection="true"

PLATFORM="MsSQLServer"

jdbc-level="2.0"

eager-release="false"

batch-mode="false"

useAutoCommit="2"

ignoreAutoCommitExceptions="false"

JNDO-DATASOURCE-NAME="java:comp/env/jdbc/scm4all"



  <sequence-manager
className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImp
l">

<attribute attribute-name="grabSize" attribute-value="1"/>

</sequence-manager>

</jdbc-connection-descriptor>



The problem is that we have to define a 'platform' setting in the
jdbc-connection-descriptor,

So if a client uses another database, we have to change the platform
setting in repository_database.xml. (i.e. change our WAR file!)

Is there a workaround for this ?

Is it possible to set the platform setting at runtime based on the
specified driver name ?



Thanks,



Frank Renaers - Ikan Software





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to