cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ana Rosselló-Busquet <>
Subject OSGi Listener Service through webservices
Date Mon, 18 Jun 2012 22:19:37 GMT

I have been working with OSGi framework using Equinox implementation in
Eclipse. I have been using two bundles, one exporting the service and
another importing the service. The service interface (IMessageSender) has
the following methods:

	public abstract void addListener(IMessageListener listener);
	public abstract void removeListener(IMessageListener listener);

The implementation of this service (MessageSender implements IMessageSender)
has the following methods:

	private List listeners = new ArrayList();

	public synchronized void addListener(IMessageListener listener) {

	public synchronized String send_message(String message) throws 
		for (Iterator i = listeners.iterator(); i.hasNext();)
			reply = new String(((IMessageListener);
		return reply;

Furthermore, the bundle exporting the service defines IMessageListener
interface which has only one method:

	public String status_update(String feedback);

The bundle importing the service contains a class implementing
IMessageListener and uses the service to add itself as a listener after
importing the service. This class (MessageListener implements
IMessageListener) contains the following methods:

	public void setService(IMessageSender value) {
		sender = value;

	public String status_update(String feedback){

Now, I would like to implement the interaction between the bundles through
web services using  cxf-dosgi-ri-singlebundle-distribution (1.2.0). 
However, I am not sure if it is possible or not and how I should do it.
Could anyone please help me?



View this message in context:
Sent from the cxf-dev mailing list archive at

View raw message