Use this procedure to register an alias for an existing DataSource object.
You can:
· Deploy the alias definition with your J2EE application or J2EE Engine library
· Define the alias at runtime
1. In the J2EE Explorer view, open the context menu of the Enterprise Application Project and choose New → META-INF/data-source-aliases.xml.
2. Enter a name for the alias. You can use uppercase letters, digits, slash and underscore only. Choose Finish. The system adds a data-source-aliases.xml to the project. It defines an alias for the default DataSource.
3. In the context menu of the Enterprise Application Project, choose Build EAR File. The system informs you if the build process has been successful.
4. Choose the generated EAR file and open its context menu. Choose Deploy to J2EE engine to deploy the application on the J2EE Engine using the SDM. The system displays a message to inform you that the deployment process has finished successfully.
You can also deploy an alias for data sources other than the default one. To do this:
· Create a data-source-aliases.xml using the format defined in data-source-aliases.dtd.
· Include the XML file in the META-INF directory of the application archive.
...
1. Create a file named data-source-aliases.xml using the format defined in data-source-aliases.dtd.
2. Include the XML file in the ../server/descriptors directory of the SDA, and deploy it to the J2EE Engine.
You can define an alias using the Visual Administrator. For more information, see Managing Aliases in the Administration Manual.
You can now access the DataSource using the alias that you have specified.