!--a11y-->
Creating a DataSource 
In certain scenarios – for example, if you need to use a different database from the default one – you need to create a new DataSource.
You can register a DataSource in the Visual Administrator using the functions provided by the JDBC Connector Service. For more information, see:
·
Creating a
DataSource with JDBC 1.x Driver
·
Creating a
DataSource with JDBC 2.0 Driver
The J2EE Engine supports deployment of DataSource objects with an application or a library.
· Deploying DataSource with an application:
...
a. Create a file named data-sources.xml using the format defined in data-sources.dtd.
b. Include the file in the META-INF directory of your application archive (EAR) file and deploy it to the J2EE Engine.
You can use the DataSource when the associated application is started.
· Deploying DataSource with a library:
a. Create a file named data-sources.xml using the format defined in data-sources.dtd.
b. Include the file in the ../server/descriptors directory of the library SDA, and deploy it to the J2EE Engine.
Unlike the case when you deploy the DataSource with
an application, in this scenario the DataSource becomes functional when the
JDBC Connector
Service is started.