Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-8816

data-source element in application.xml descriptor is not processed correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 6.0.0.Final
    • Deployers, Other
    • None
    • Hide

      Add the mentioned XML fragment to application.xml
      Try to inject the datasource in a session bean using @Resource(lookup="java:app/MyDataSource")
      This fails, but should work

      Show
      Add the mentioned XML fragment to application.xml Try to inject the datasource in a session bean using @Resource(lookup="java:app/MyDataSource") This fails, but should work

    Description

      Defining a datasource in the application.xml descriptor of an EAR using the data-source element, does not cause this datasource to become available in the defined namespace.

      For instance the following is supposed to make a datasource available in JNDI at java:app/MyDataSource

      <data-source>
      <description>Sample DataSource definition</description>
      <name>java:app/MyDataSource</name>
      <class-name>org.postgresql.ds.PGSimpleDataSource</class-name>
      <server-name>myserver.com</server-name>
      <port-number>5432</port-number>
      <database-name>mydb</database-name>

      <user>myuser</user>
      <password>mypass</password>
      </data-source>

      This however does not happen.

      Attachments

        Activity

          People

            Unassigned Unassigned
            henk53_jira henk de boer (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: