[ Download ] | [ Documentation Home ] | [ Release Note ]

How to use JNDI data source to create Data Service?

You can find grammar for Data Service configuration file in the following URL. Data Services Specification

Your feedback on WSO2 WSAS is most appreciated. Please send them to our mailing lists .

Before we begin : In this example, we have created a mysql data source inside Jboss-4.0.4 and bound it to the JNDI name 'ProjectDS'. Step 1 shows mysql-ds.xml file we used. Similarly you can use any other server(eg. Tomcat) to create data source and bind it to a jndi name. Make sure server selected allows you to expose a JNDI data source outside server's JVM.


JNDI Config

In the WSO2 WSAS management console, click on Services on the left hand panel. In the Add New Service panel, click on Define Data Service.

Step 1 :

In the Configuration box, from the Data Source dropdown, select JNDI. A popup window will open up.



Step 1

Enter configuration details like JNDI Context Class, Provider URL, Resource Name etc.

Step 2 : You need to copy JBOSS_HOME/client/jbossall-client.jar (or the equivalent file for the server you're using) to WSAS_HOME/lib.

Please refer to Step 2 and onward of either of the 3 other guides, RDBMS Data Source, CSV Data Source or Excel Data Source on how to continue.