Bug 1124774 - [Documentation] Add the <driver> element in the example XML for the Datasource configuration
Summary: [Documentation] Add the <driver> element in the example XML for the Datasourc...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Documentation
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.3.0
Assignee: sgilda
QA Contact: Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-30 09:45 UTC by oarribas
Modified: 2014-09-29 17:07 UTC (History)
2 users (show)

Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Build Name: 22507, Migration Guide-6.3-1 Build Date: 25-07-2014 14:15:35 Topic ID: 5409-649872 [Specified]
Last Closed: 2014-08-06 14:40:48 UTC
Type: Bug


Attachments (Terms of Use)

Description oarribas 2014-07-30 09:45:35 UTC
Title: Use the IronJacamar Migration Tool to Convert a Datasource Configuration File

Describe the issue:

In https://documentation-devel.engineering.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6.3/html-single/Migration_Guide/index.html#Use_the_IronJacamar_Migration_Tool_to_Convert_a_Datasource_Configuration_File1
Procedure 4.4, point 4 "Modify the generated XML in the new configuration file", the resulting configuration of the datasouce not contains the <driver> element. The <driver-class> element is commented, but no <driver> element added.


Suggestions for improvement:

Something like:

...
      <connection-url>jdbc:hsqldb:.</connection-url>
      <!-- Comment out the following driver-class element 
           since it is not the preferred way to define this.
           <driver-class>org.hsqldb.jdbcDriver</driver-class>     -->
      <transaction-isolation>TRANSACTION_NONE</transaction-isolation>
      <!-- Added the driver element  -->
      <driver>h2</driver>
      <pool>
...


Additional information:

Comment 1 sgilda 2014-07-30 12:06:06 UTC
The <driver> element does not belong in the <datasource> section. If you look at the example more closely, you should see it within the <drivers> element later in the XML. See my comment below: <!--**DRIVER DEFINITION** -->

<datasources>
   <datasource enabled="true" 
            jndi-name="java:jboss/datasources/bookingDatasource" jta="true"
            pool-name="bookingDatasource" use-ccm="true" use-java-context="true">
      <connection-url>jdbc:hsqldb:.</connection-url>
      <!-- Comment out the following driver-class element 
           since it is not the preferred way to define this.
           <driver-class>org.hsqldb.jdbcDriver</driver-class>     -->
      <transaction-isolation>TRANSACTION_NONE</transaction-isolation>
      ...
      ...
   </datasource>
   <drivers>
      <!-- The following driver element was not in the 
            XML target file. It was created manually. -->
      <driver name="h2" module="com.h2database.h2"> <!--**DRIVER DEFINITION** -->
         <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
      </driver>
   </drivers>
</datasources>

Please reopen this bug if I misunderstand the issue.

Comment 2 oarribas 2014-07-30 12:20:28 UTC
Hi Sande,

But you need to specify what driver the datasource should use, aren't you?

If you look at the ExampleDS datasource example in a standalone.xml you can see a <driver>h2</driver> inside the <datasource .....> .... </datasource> to set what driver should the datasource use:


            <datasources>
                <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
                    <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
                    <driver>h2</driver>       <!-- this driver element -->
                    <security>
                        <user-name>sa</user-name>
                        <password>sa</password>
                    </security>
                </datasource>
                <drivers>
                    <driver name="h2" module="com.h2database.h2">
                        <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                    </driver>
                </drivers>
            </datasources>

Comment 5 Nikoleta Ziakova 2014-07-31 12:07:24 UTC
Verified in revision 6.3.0-24


Note You need to log in before you can comment on or make changes to this bug.