johnstok - [
http://community.jboss.org/people/johk] created the discussion
"How can I set an Oracle XA datasource property from my -ds.xml file?"
To view the discussion, visit:
http://community.jboss.org/message/575385#575385
--------------------------------------------------------------
I need to set a property on my Oracle data source. However, I can't see how to do this
via my -ds.xml file.
In code I am doing the following:
final OracleXADataSource ods = new OracleXADataSource();
ods.setPassword(password);
ods.setUser(username);
ods.setURL(url);
final Properties connectionProps = new Properties();
connectionProps.put(
"oracle.jdbc.RetainV9LongBindBehavior", "true");
ods.setConnectionProperties(connectionProps);
final OracleXADataSource ods = new OracleXADataSource();
ods.setPassword(password);
ods.setUser(username);
ods.setURL(url);
final Properties connectionProps = new Properties();
connectionProps.put("oracle.jdbc.RetainV9LongBindBehavior", "true");
ods.setConnectionProperties(connectionProps);
My current datasource file looks like this:
<xa-datasource>
<jndi-name>${application.prefix}</jndi-name>
<xa-datasource-property
name="URL">${ccc.db.connection.url}</xa-datasource-property>
<xa-datasource-class>${ccc.db.datasource}</xa-datasource-class>
<user-name>${application.db-username}</user-name>
<password>${application.db-password}</password>
<max-pool-size>100</max-pool-size>
<exception-sorter-class-name>${ccc.db.exc-sorter}</exception-sorter-class-name>
</xa-datasource>
I tried the "xa-datasource-property" element but this doesn't seem to work -
my understanding is that this will try to find a JavaBean setter, which doesn't
exist.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/575385#575385]
Start a new discussion in Datasource Configuration at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]