Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4590

Expansion of variables in datasource configuration <driver> in standalone.xml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 7.1.2.Final (EAP)
    • 7.1.2.Final (EAP)
    • JCA, Server
    • Test with upstream 7.1 master (commit f82bc48f5d4a74e5214503fa0e301c507ccfea4e ~ 4/23/2012 11:30 CET+2)

      Overwrite the datasource driver by expression did not work.

      If the element is <driver>${test.db.driver}</driver> the following messages are shown:
      ===> not given by -D
      13:38:23,146 ERROR [org.jboss.as.controller.management-operation]
      (ServerService Thread Pool – 27) Operation ("enable") failed - address: ([
      ("subsystem" => "datasources"),
      ("data-source" => "ExampleDS")
      ]) - failure description: "JBAS014802: Cannot resolve expression
      'expression \"${test.db.driver}\"' – java.lang.IllegalStateException:
      Failed to resolve expression: ${test.db.driver}"

      ===> given by -Dtest.db.driver=h2
      JBAS014775: New missing/unsatisfied dependencies:
      service jboss.jdbc-driver.${test_db_driver} (missing) dependents:
      [service jboss.data-source.java:jboss/datasources/ExampleDS]

      Looks that it should be possible to use the expression (as for the other attributes like url/user/passwd) but the dependency is checked before replacing the environment.

      The dependency and deployment should work.
      If it is not possible to use it for the driver the expression should be defeated with an approproate message.

              smaestri@redhat.com Stefano Maestri
              rhn-support-wfink Wolf Fink
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: