This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 209244 - Expose the ManagementBindingProvider to annotated class
Summary: Expose the ManagementBindingProvider to annotated class
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Cosmos (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Joel Hawkins CLA
QA Contact:
URL: http://wiki.eclipse.org/COSMOS_Bug_De...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-08 14:23 EST by Joel Hawkins CLA
Modified: 2012-01-03 13:53 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Hawkins CLA 2007-11-08 14:23:59 EST
For annotated classes, there are cases where the implementation needs addressability to underyling management implementations. For example, there is a need for a managed resource to be able to access it's WSDM EPR. 

In the current implementation, each management techonolgy (JMX, WSDM, etc.) corresponds to an existing binding implementation. There is also a mechanism that allows the annotation framework to bind references within an implementation class. This mechanism could be used to wire in access to the set of binding technologies that the annotated class is exposed thruough. Each of these binding types could then be cast to technology-specific interfaces.
Comment 1 Joel Hawkins CLA 2007-11-09 08:49:55 EST
This should require a fairly low level of effort.
Comment 2 Joel Hawkins CLA 2007-11-12 19:11:12 EST
This capability is already supported using the @ManagedFrameworkAutowire annotation. An example of how to gain addressability to the WSDMBinding (and hence the WSResource implementation corresponding to a particular object) can be found in the org.eclipse.cosmos.dc.sample.components.source.WefSource example. It basically comes down to the following:

@ManagedResource
public class MyClass {


	@ManagedFrameworkAutowire(name="WSDM")
	private Binding wsdmBinding;
	
	public void setWsdmBinding(Binding wsdmBinding){
		this.wsdmBinding = wsdmBinding;
		
	}

	public boolean someMethod() throws Exception {
		Object consumerObject = wsdmBinding.getBindingForObject(this);
		if(consumerObject != null && consumerObject instanceof WsResource){
			EndpointReference consumer = ((WsResource)consumerObject).getEndpointReference();
			for(Element target : targets){


etc...
Comment 3 Mark Weitzel CLA 2007-11-13 11:42:59 EST
We have a dependency on Muse to provide the work around for the WS-Addressing so that capabilities can accept requests from "vanilla", e.g. non-statefull clients
Comment 4 Mark Weitzel CLA 2007-11-13 11:48:45 EST
We will need to ensure this works with some test cases.  CMDBf interop with non-cosmos clients will simply fail.

Comment 5 Shivashankari CLA 2008-01-11 05:30:26 EST
Has @ManagedFrameworkAutowire annotation been implemented? I guess QA should find similar implementations (given above) across COSMOS that pertain to addressability to WSDM binding.
Comment 6 David Whiteman CLA 2008-11-05 14:57:41 EST
closing to cleanup bugzilla