[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Registering two services in the same bundle

You should keep in mind the different views of the service between the registrant and the consumer. On the registrant (service producing/implementing) side, it is perfectly reasonable for them to register a single service object under all the different service interfaces they implement. But I think Niel's point is on the side of the consumer bundle. I think it is far more simple for them to simply bind to each service (interface) that they require individually instead of trying to find a particular service which implements all the service interfaces they need at once and then casting that single service to the various interfaces it implements. As Neil points out this also couples a client to a particular type of implementation that must use a single service registration for all the service interfaces needed by the client.

Tom



Inactive hide details for Tim Diekmann ---11/16/2009 05:46:21 PM---Neil, one concrete example where the services need to be proTim Diekmann ---11/16/2009 05:46:21 PM---Neil, one concrete example where the services need to be provided as a unit is the support for JTA (coming in the Enterprise Pr


From:

Tim Diekmann <tdiekman@xxxxxxxxx>

To:

"Equinox development mailing list" <equinox-dev@xxxxxxxxxxx>

Date:

11/16/2009 05:46 PM

Subject:

Re: [equinox-dev] Registering two services in the same bundle




Neil,

one concrete example where the services need to be provided as a unit is the support for JTA (coming in the Enterprise Profile soon). In the JTA case, the provider is mandated to implement 3 services and register them, among them UserTransaction and TransactionManager. Since they come from the JTA spec, they cannot be easily combined.

Tim.


"In the end everything will be right. But since things are not right, we are not at the end yet!"
-- Unknown



On Nov 16, 2009, at 3:32 PM, Neil Bartlett wrote:
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


GIF image

GIF image