[jboss-user] [Datasource Configuration] - How can I set an Oracle XA datasource property from my -ds.xml file?

johnstok - do-not-reply at jboss.com
Fri Dec 10 06:52:20 EST 2010


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&containerType=14&container=2077]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101210/ae7a9152/attachment.html 


More information about the jboss-user mailing list