Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363870 - Add default support for resolving binding information in a deployed application
Summary: Add default support for resolving binding information in a deployed application
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Justin Spadea CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 363792 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-15 16:47 EST by Brian Svihovec CLA
Modified: 2017-02-23 14:20 EST (History)
9 users (show)

See Also:


Attachments
Runtime support for the default DD changes (7.27 KB, patch)
2011-11-15 17:34 EST, Justin Spadea CLA
no flags Details | Diff
Deployment and runtime support (15.74 KB, patch)
2011-11-22 10:53 EST, Justin Spadea CLA
no flags Details | Diff
Deployment and runtime support (with Matt's suggestions) (15.74 KB, patch)
2011-11-22 11:30 EST, Justin Spadea CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Svihovec CLA 2011-11-15 16:47:25 EST
1) When a part is deployed, locate the rununit.properties file in the target project and add a key/value pair for the DD file being used to deploy the part:
  a) If the rununit.properties file does not exist, create one and add the key/value pair
  b) If the rununit.properties file exists, and a value does not exist for the current key, append the key/value pair to the file
  c) If the rununit.properties file exists, and a value exists for the current key, and the value matches the DD file currently being used, do nothing.
  d) If the rununit.properties file exists, and a value exists for the current key, and the value does not match the DD file currently being used, append the key/value pair to the file.

2) The key to use in the file is "egl.application.property.file.partname", where "partname" is the name of the part being deployed.

3) The value to use is the name of the generated bnd.xml file for the DD file being used to deploy the part.

3) At runtime, if binding information is not specified (e.g. hard coded binding information, properties file named in the source, etc), the rununit.properties file is used to locate the name of the properties file.  This file should first be resolved using "egl.application.property.file.partname", where "partname" is the name of the part that started the current rununit, followed by ""egl.application.property.file".  

4) When resolving information from a resource being created in a Library, the name of the part that started the rununit should be used when resolving the key specified in #3.
Comment 1 Brian Svihovec CLA 2011-11-15 17:04:58 EST
Additional comments:

1) The part name specified in the key should be the qualified part name of the generated file, in case the part name is aliased.
Comment 2 Justin Spadea CLA 2011-11-15 17:34:14 EST
Created attachment 207066 [details]
Runtime support for the default DD changes

This is the runtime portion of the change. It does not include the deployment work to add/update rununit.properties.
Comment 3 Tony Chen CLA 2011-11-16 01:56:37 EST
An egldd has entry for Services being deployed, thus, we can set the dd name for these services. However, for Programs, there's no entry in egldd so we can not set one for a Program part. Programs will have to use egl.application.property.file setting.
Comment 4 Yun Feng Ma CLA 2011-11-16 10:00:26 EST
Justin will take care of this. Justin, thanks a lot.
Comment 5 Yun Feng Ma CLA 2011-11-16 10:03:22 EST
*** Bug 363792 has been marked as a duplicate of this bug. ***
Comment 6 Tony Chen CLA 2011-11-22 09:09:36 EST
Justin, is this enhancement in?
Comment 7 Justin Spadea CLA 2011-11-22 09:38:56 EST
Not yet
Comment 8 Justin Spadea CLA 2011-11-22 10:53:18 EST
Created attachment 207371 [details]
Deployment and runtime support
Comment 9 Justin Spadea CLA 2011-11-22 11:08:00 EST
Note: To minimize the impact this late in the game, as long as there is at least 1 RUI Handler being deployed we will set the property "egl.application.property.file" to the current DD, in support of dedicated services. The only way to find out which services are being invoked as dedicated is to walk the IRs of all referenced parts being deployed, looking for @DedicatedService on service or interface variable declarations. We can look into doing this in the next release. For now, our default configuration will have dedicated services all use the egl.application.property.file property and REST services (since the DD tells us which are REST) are configured to use "egl.application.property.file.partname". Users are free to edit this file to add application-specific keys for their dedicated services.
Comment 10 Justin Spadea CLA 2011-11-22 11:30:45 EST
Created attachment 207375 [details]
Deployment and runtime support (with Matt's suggestions)
Comment 11 Justin Spadea CLA 2011-11-22 15:01:27 EST
Patch has been applied