Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356155

Summary: Add SQL Database Binding Wizard
Product: z_Archived Reporter: Tony Chen <chenzhh>
Component: EDTAssignee: Zhi Zhu <zhuzhi>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: jspadea, smythew
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Check in code
lasher: iplog+
Complete the feature none

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