摘要: 又犯了一个愚蠢的错误,今天利用maven来构建OSGI,创建一个父工程之后,接着创建mavevn module 在pom.xml中添加了代码 <build> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.1.0</version> <extensions>true</extensions> 阅读全文
posted @ 2012-04-10 16:55 haoxx 阅读(411) 评论(0) 推荐(0) 编辑
摘要: I ServiceFactory的講解 一、首先我們實現一個繼承ServiceFactory接口聽服務Bean.如下:public class HelloServiceFactory implementsServiceFactory{ private int usageCounter = 0; public Object getService(Bundle bundle, ServiceRegistration registration) { System.out.println("Create object of HelloService for " + bundle.. 阅读全文
posted @ 2012-04-10 13:56 haoxx 阅读(650) 评论(0) 推荐(0) 编辑