Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356155 - Add SQL Database Binding Wizard
Summary: Add SQL Database Binding Wizard
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Zhi Zhu CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-30 02:35 EDT by Tony Chen CLA
Modified: 2017-02-23 14:19 EST (History)
2 users (show)

See Also:


Attachments
Check in code (21.42 KB, patch)
2011-08-31 07:36 EDT, Zhi Zhu CLA
lasher: iplog+
Details | Diff
Complete the feature (19.59 KB, text/plain)
2011-09-02 00:53 EDT, Zhi Zhu CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Chen CLA 2011-08-30 02:35:03 EDT
Add new wizard to create SQL Database Binding. 

Story: 
Developer opens the DD editor and clicks the Resource Bindings tab
Developer clicks Add button in Resource Binding tab
Developer selects SQL Database Binding to launch the db binding wizard
	( ) Resting Service Binding 
	(*) SQL Database Binding
Developer chooses a connection from the Database Connection drop-down (populated from set of connections configured in the workspace), accepts the default binding name (based on the name of the connection), and click Finish. Developers can also launch the wizard to create a new Database Connection. 

The information of the selected (created) database binding is written to EGLDD
Comment 1 Zhi Zhu CLA 2011-08-31 07:34:29 EDT
Tony, in SQLDatabaseBinding, there exists a 'name' property, from my understanding, it refers to 'user name' while connection database, if my understanding is correct, then it should be changed to 'userName', and add a 'name' property for the item, now no property for newly added item.

 The checked code can added 4 properties, for others, need discussion about it.
  Please review code.
Comment 2 Zhi Zhu CLA 2011-08-31 07:36:19 EDT
Created attachment 202502 [details]
Check in code

Tony, please review code
Comment 3 Will Smythe CLA 2011-08-31 20:38:27 EDT
Justin - to avoid the situation we found ourselves in RBD where we didn't store enough parameters to create, for example, the context.xmL, can you confirm we're storing enough of the db connection parameters and in a way such that a deploy operation to create a context.xml will have what it needs? My thought would be to add every db property we can to the DD ...
Comment 4 Justin Spadea CLA 2011-08-31 21:01:39 EDT
The following properties are the minimum needed to configure a data source in context.xml for Tomcat:

JNDI name
User name
Password
JDBC URL
Driver class name

There are other data source properties that can be set, but we haven't exposed them before. Users are free to edit context.xml if they don't like the settings. Examples include:

maxWait="5000"
auth="Container"
maxIdle="2"
maxActive="4"
type="javax.sql.DataSource"


The issue in RBD was configuring a data source on WAS. The RAD tooling in the EAR's DD expected the pieces broken up differently. There was sufficient information if you had a workspace database connection, but the problem was when the values came from the build descriptor - and I don't remember exactly what settings WAS needed that we didn't have.
Comment 5 Tony Chen CLA 2011-08-31 23:31:02 EDT
name refers to the name of the binding
sqlId is the username



(In reply to comment #1)
> Tony, in SQLDatabaseBinding, there exists a 'name' property, from my
> understanding, it refers to 'user name' while connection database, if my
> understanding is correct, then it should be changed to 'userName', and add a
> 'name' property for the item, now no property for newly added item.
> 
>  The checked code can added 4 properties, for others, need discussion about it.
>   Please review code.
Comment 6 Tony Chen CLA 2011-09-01 02:34:01 EDT
see this bug 356157 for egldd model changes 



(In reply to comment #4)
> The following properties are the minimum needed to configure a data source in
> context.xml for Tomcat:
>
Comment 7 Zhi Zhu CLA 2011-09-02 00:53:29 EDT
Created attachment 202649 [details]
Complete the feature
Comment 8 Zhi Zhu CLA 2011-09-02 00:53:51 EDT
Complete the feature
Comment 9 Zhi Zhu CLA 2011-09-29 22:26:54 EDT
close the feature