There are two ways to deploy a Data Source:
● As a standalone Data Source using the Telnet Administrator tool
● As part of a Java EE 5 application using the SAP NetWeaver Developer Studio
The standalone Data Source can be used by multiple applications. Its life cycle is independent from the life cycle of the applications that are using it.
To deploy a standalone Data Source, proceed as follows:
1. Open the Telnet Administrator console:
a. Go to the SAP Management Console and open the AS Java Process Table for your SAP NetWeaver Application Server Java.
b. Choose AS Java Telnet from the context menu of the ICM process.
2. Login to the server by providing a valid Administrator user and password in the User name and Password fields in the Telnet Administrator console.
3. Enter add dbpool in the command line to add the DBPOOL shell command group to the environment.
4. Enter make_data_source <xml_descriptor> in the command line to deploy the Data Source defined by the <xml_descriptor> parameter.
The <xml_descriptor>parameter specifies the path to your data-sources.xml file on the file system.
If you deploy a Data Source as part of an application, the Data Source’s life cycle will depend on the application’s life cycle - that is, the Data Source will be available only if the application that deployed it is started. It can also be used by other applications by declaring resource references to it in their deployment descriptors.
To deploy a Data Source with an application, you need to add a data-sources.xml to the META-INFfolder of the application’s EARfile. The following procedure describes how to do this using the SAP NetWeaver Developer Studio.
1. Add the SAP Data Source facet to your EAR project.
a. Select your EAR project in the Project Explorer and choose Properties from the context menu.
b. Select Project Facets from the properties tree and choose Modify Project.
c. Set the SAP Data Source checkbox and choose Finish.
The SAP NetWeaver Developer Studio creates the data-sources.xml file under the META-INF directory of your EAR project.
d. Choose OK.
e. To open the data-sources.xml file for editing, select the file and choose Open from the context menu.
2. Fill in the elements you need to define your Data Source.
More information: data-sources.dtd