Directory

← Back

vaadin-osgi

OSGi Support for Vaadin

Author

Rating

Popularity

<100

The core Vaadin jar is a valid OSGi bundle but creating a Vaadin OSGi application can be a daunting task.

This package contains a bundle which allows Vaadin apps to be deployed as OSGi Declarative Service components, a bundle which proxies resources from the core Vaadin bundle (though static resource deployment to a web-server is recommended) and a sample application.

Please see the README.txt in the zip for more information and each bundle contains it's own source code.

Note: See the discussion thread for instructions on how to get started with Felix.

Sample code

package uk.org.brindy.guessit;

import uk.org.brindy.guessit.random.RandomService;
import uk.org.brindy.guessit.view.MainView;
import aQute.bnd.annotation.component.Component;
import aQute.bnd.annotation.component.Reference;

import com.vaadin.Application;
import com.vaadin.ui.Window;

@SuppressWarnings("serial")
@Component(factory = "vaadin.app", name = "guessit")
public class GuessItApp extends Application {

	private RandomService random;

	private Window mainWindow = new Window("Guess It!");

	@Override
	public void init() {
		setMainWindow(mainWindow);
		mainWindow.setWidth("300px");
		new MainView(this);
	}

	@Reference
	public void setRandomService(RandomService service) {
		random = service;
	}

	public RandomService getRandomService() {
		return random;
	}

}

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Fixed minor bug, tidied up source and released to Github. This is a housekeeping release before releasing version 2.0.0 which will incorporate changes based on code by Peter Kriens.

Released
2010-07-27
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 6.2+
Browser
Browser Independent

vaadin-osgi - Vaadin Add-on Directory

OSGi Support for Vaadin vaadin-osgi - Vaadin Add-on Directory
The core Vaadin jar is a valid OSGi bundle but creating a Vaadin OSGi application can be a daunting task. This package contains a bundle which allows Vaadin apps to be deployed as OSGi Declarative Service components, a bundle which proxies resources from the core Vaadin bundle (though static resource deployment to a web-server is recommended) and a sample application. Please see the README.txt in the zip for more information and each bundle contains it's own source code. Note: See the discussion thread for instructions on how to get started with Felix.
Online