Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[edt-dev] @Resource deafult for the bindingKey

@Resource generates into a SysLib.getResource. getResource returns an object specific to the binding type: ie HTTPRest for a REST binding and SQLDataSource.

There was a defect in that I just fixed with the default bindingKey being generated. In RBD the default bindingKey was derived from the type so in the RBD example below RBD would go to the egldd and look up the binding named "IMortgageService". In EDT this has been change to the variable name so in EDT example the runtime will go to the egldd and look up the binding named "mortgageServiceBinding".

RBD example
mortgageServiceBinding IMortgageService{@Resource};

EDT example
mortgageServiceBinding HttpREST{@Resource};

The reason this has changed is in EDT the binding variable will normally be the type returned by the SysLib.getResource like in the EDT example. For rest services this will be HttpREST. Using the type name would force the use of a bindingKey on almost all @Resource annotations, using the variable name allows you to use a descriptive name.

Note: In EDT an interface or service can be used as the type (like the RBD example). The getResource still returns an HTTPRest object but it is bound to the interface for use by the call statement.

regards,
Joe Vincens
EGL Developer
Rational Software, IBM Software Group
150 Kettletown Road, Southbury, CT  06488, USA
Tel: 203.528.3041

Back to the top