[jboss-jira] [JBoss JIRA] Commented: (JBAS-8559) Implement DataSource resource provider

jaikiran pai (JIRA) jira-events at lists.jboss.org
Mon Nov 1 03:39:54 EDT 2010


    [ https://jira.jboss.org/browse/JBAS-8559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560535#action_12560535 ] 

jaikiran pai commented on JBAS-8559:
------------------------------------

Adding the details on what exactly is required out of this task. 

The JavaEE 6 spec (section EE.5.17) states that:

<quote>
A DataSource resource may be defined in a web module, EJB module, application client module, or application deployment descriptor using the datasource element.

For example:
    <data-source>
         <description>Sample DataSource definition</description>
         <name>java:app/MyDataSource</name>
         <class-name>com.foobar.MyDataSource</class-name>
         <server-name>myserver.com</server-name>
         <port-number>6689</port-number>
         <database-name>myDatabase</database-name>
         <user>lance</user>
         <password>secret</password>
         <property>
           <name>Property1</name>
           <value>10</value>
         </property>
         <property>
           <name>Property2</name>
           <value>20</value>
         </property>
         <login-timeout>0</login-timeout>
         <transactional>false</transactional>
         <isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
         <initial-pool-size>0</initial-pool-size>
             <max-pool-size>30</max-pool-size>
              <min-pool-size>20</min-pool-size>
              <max-idle-time>0</max-idle-time>
              <max-statements>50</max-statements>
         </data-source>

A DataSource resource may also be defined using the DataSourceDefinition annotation on a container-managed class, such as a servlet or enterprise bean class.

For example:

            @DataSourceDefinition(name="java:app/MyDataSource",
                className="com.foobar.MyDataSource",
                portNumber=6689,
                serverName="myserver.com",
                user="lance",
                password="secret")

(Of course, we do not recommend including passwords to production systems in the code, but it's often useful while testing. Passwords, or other parts of the DataSource definition, can be overridden by a deployment descriptor when the application is deployed.)

</quote>


So all that needs to be done is to process this Java EE spec defined datasource deployment descriptor element and the corresponding annotation and create a JBoss specific datasource and bind it to JNDI. That's it.



> Implement DataSource resource provider
> --------------------------------------
>
>                 Key: JBAS-8559
>                 URL: https://jira.jboss.org/browse/JBAS-8559
>             Project: JBoss Application Server
>          Issue Type: Sub-task
>      Security Level: Public(Everyone can see) 
>            Reporter: Shelly McGowan
>            Assignee: Weston Price
>             Fix For: 6.0.0.CR1
>
>
> See http://community.jboss.org/wiki/Switchboard for what's needed for ResourceProvider in AS 6 to implement.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list