An SQL database binding gives details necessary
to access an SQL service.
To add an SQL database binding to an EGL deployment descriptor,
do as follows:
- Open the EGL Deployment Descriptor editor by double-clicking
the name of an EGL deployment descriptor.
- Click Resource Bindings.
The Resource Bindings Configuration tab
is displayed.
- Click Add. The Add
a Resource Binding page is displayed.
- Click SQL database binding and then
click Next. The Add
a SQL Database Binding page is displayed.
- The Add a SQL Database Binding page
is under review. The main point is this: you can specify what detail
is used at deployment time: either the connection profile (the first
option) or details that you type at this screen (the second option).
- After you click Finish, you can
make additional changes in the SQL Database Binding pane.
There, you select one of the first two options to specify where the
binding details are stored:
- To use connection details that are specified in an Eclipse connection
profile, select the first option. Reference an existing connection
profile or press New to define one.
If you select this option, any subsequent change to the Eclipse
connection profile is available to your code at development and deployment
time. After the EGL deployer has packaged the application, though,
the changes have no effect on the deployed code unless you redeploy
the application.
- To specify connection details directly in the binding definition,
select the second option instead.
- Also at the SQL Database Binding pane,
you can configure a JNDI entry as follows:
- Define the connection by specifying the first or second option.
- Select the third option. In relation to Apache Tomcat, the JNDI
name and other details that you specify here are associated with the
other details. The information is packaged during EGL deployment.
By
default, the JNDI details result in a container-based authentication,
which means that the server stores any user ID and password needed
for database access. If you are handling authentication in your code,
select Use application-based authentication.
In the future, you can update the service binding that you
just defined:
- Open the Resource Bindings tab.
- Select the binding.
- Edit the displayed information.