<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TechJava &#187; TechJava &#8211; Articles tagged by bundle</title>
	<atom:link href="http://www.techjava.de/topics/tag/bundle/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.techjava.de</link>
	<description>Journal on Java Technology</description>
	<lastBuildDate>Wed, 11 May 2011 21:15:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Guicy Mocks in Eclipse RCP</title>
		<link>http://www.techjava.de/topics/2010/11/guicy-mocks/</link>
		<comments>http://www.techjava.de/topics/2010/11/guicy-mocks/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 23:42:52 +0000</pubDate>
		<dc:creator>Simon Zambrovski</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Enterprise Systems]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[bundle]]></category>
		<category><![CDATA[business delegate]]></category>
		<category><![CDATA[di]]></category>
		<category><![CDATA[eclipse rcp]]></category>
		<category><![CDATA[extension point]]></category>
		<category><![CDATA[google guice]]></category>
		<category><![CDATA[java enterprise]]></category>
		<category><![CDATA[Modeling]]></category>
		<category><![CDATA[plug-in]]></category>
		<category><![CDATA[service locator]]></category>

		<guid isPermaLink="false">http://www.techjava.de/?p=699</guid>
		<description><![CDATA[Abstract Development of Eclipse RCP as a rich client of the multi-tier Java Enterprise application becomes an an interesting alternative to other frontend technologies. An important aspect is the ability to develop and test the frontend independent from the backend. In this article, an approach for testing and de-coupling of server and client development in [...]]]></description>
			<content:encoded><![CDATA[<p>
<a  href="http://www.techjava.de/wp-content/uploads/juice.gif" onclick="javascript:pageTracker._trackPageview('/downloads/wp-content/uploads/juice.gif');" ><img style="float: right;" title="Google Guice" src="http://www.techjava.de/wp-content/uploads/juice.gif" alt="Google Guice" width="200" height="214" /></a></p>
<h2>Abstract</h2>
<p>Development of Eclipse RCP as a rich client of the multi-tier Java Enterprise application becomes an an interesting alternative to other frontend technologies. An important aspect is the ability to develop and test the frontend independent from the backend. In this article, an approach for testing and de-coupling of server and client development in Eclipse RCP is introduced.</p>
<h2>Business Delegate, Service Locator and Dependency Injection</h2>
<p>In a Java multi-tier application, the business logic is implemented in form of server-hosted components (EJB, Spring Beans, OSGi Services, etc&#8230;). In this example, the EJB Backend is used, but it can be easily replaced with other technologies mentioned previously. A rich client is connected to the server using some remoting technology and contains a local storage for the client-specific state, which allows to build more complex and reactive applications. A common approach to hide the aspects of remote invocations on the client side is the use of 
<a  href="http://java.sun.com/blueprints/corej2eepatterns/Patterns/BusinessDelegate.html" onclick="javascript:pageTracker._trackPageview('/external/java.sun.com/blueprints/corej2eepatterns/Patterns/BusinessDelegate.html');" >Business Delegate</a> enterprise design pattern. My favorite way of implementing it is to define the technology-independent business interface (POJI = Plain Old Java Interface) and implement it on the server side by the server beans and on the client side by the business delegates. This article uses the following business interface as example:</p>
<pre class="brush: java; title: ;">
public interface MyBusinessService extends BaseBusinessService {

	/**
	 * Full qualified name of the interface (used for Binding).
	 */
	String IF_FQN = &quot;....MyBusinessService&quot;;

	/**
	 * Does something on server.
	 *
	 * @param parameter Parameter of invocation.
	 * @return Result of execution.
	 */
	List&lt;OperationResultDto&gt; doSomeStuff(ParameterDto parameter);
}
</pre>
<p>The delegates make use of the 
<a  href="http://java.sun.com/blueprints/corej2eepatterns/Patterns/ServiceLocator.html" onclick="javascript:pageTracker._trackPageview('/external/java.sun.com/blueprints/corej2eepatterns/Patterns/ServiceLocator.html');" >Service Locator</a> design pattern. Here is an example, how the implementation of the Base Facade can look like, which is a superclass of all business delegates:</p>
<pre class="brush: java; title: ;">
public abstract class BaseFacade {
...
	/**
	 * Delegates a call to a stateless session bean on the server.
	 *
	 * @param &lt;T&gt; type business interface
	 * @param iterfaze business interface
	 * @param jndi binding on the server
	 * @return result of invocation
	 */
	public static &lt;T&gt; T delegate(Class&lt;T&gt; iterfaze, String jndi) {
		return Activator.getDefault().getServiceLocator().getStateless(iterfaze, jndi);
	}

	/** ... */
	public static void debug(String message) {...}
}
</pre>
<p>The <code>ServiceLocator.getStateless()</code> method is hiding the lookup of the remote EJB. Using the BaseFacade, the business delegate looks as following:</p>
<pre class="brush: java; title: ;">
public class MyBusinessServiceFacade extends BaseFacade implements MyBusinessService {

	public List&lt;OperationResultDto&gt; doSomeStuff(ParameterDto parameter) {
		debug(&quot;entering doSomeStuff(ParameterDto)&quot;);
		final List&lt;OperationResultDto&gt; result = delegate(MyBusinessService.class, MyBusinessService.IF_FQN)
				.doSomeStuff(parameter);
		debug(&quot;leaving doSomeStuff(ParameterDto)&quot;);
		return result;
	}

}
</pre>
<p><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">This setup results in a following architecture:</span></p>
<p style="text-align: center;">
<a  href="http://www.techjava.de/wp-content/uploads/architecture.png" onclick="javascript:pageTracker._trackPageview('/downloads/wp-content/uploads/architecture.png');" ><img class="size-full wp-image-713 aligncenter" src="http://www.techjava.de/wp-content/uploads/architecture.png" alt="Architecture" width="420" height="210" /></a></p>
<h2>Business Delegate Boilerplate</h2>
<p>The setup looks good in theory, but in fact it is pretty boring to program on the client side. You can reduce the effort of creating business delegates (in fact I use MDSD techniques and Xtext to generate it), but in every place a service is required,  the business delegate is instantiated directly. The approach works, but it just not nice, because you reference the implementation directly.</p>
<p>A common approach to avoid writing the code of direct instantiation is the usage of Dependency Injection frameworks. A very popular one is Google Guice, which is used in this article. The essential idea of Google Guice is to configure the binding between the dependency and its resolution and use Google Guice as a kind of factory to create instances and inject dependencies in it. For the creation of the binding, Guice offers a class <code>AbstractModule</code> to subclass from.</p>
<pre class="brush: java; title: ;">
public class ServiceFacadeModule extends AbstractModule {

	/**
	 * @see com.google.inject.AbstractModule#configure()
	 */
	@Override
	protected void configure() {
		bind(MyBusinessService.class).to(MyBusinessServiceFacade.class);
	}
}
...
public class InjectorHolder {
...
	private Injector injector;

	public static void configureInjector(AbstractModule module) {
		InjectorHolder.getInstance().setInjector(Guice.createInjector(module));
	}

	/**
	 * Creates an instance of a class.
	 *
	 * @param &lt;T&gt; type of the class
	 * @param clazz type to create
	 * @return a instance with injected dependencies
	 */
	public static &lt;T&gt; T get(Class&lt;T&gt; clazz) {
		return getInstance().getInjector().getInstance(clazz);
	}
...
}
</pre>
<p>In order to hide references to Guice classes in client code, the DI can be encapsulated inside of a <code>InjectorHolder</code>, which acts as factory for instances with service references:</p>
<pre class="brush: java; title: ;">
/**
 * Class with a reference.
 */
public class DataSource {

	/**
	 * Reference to the service.
	 */
	private MyBusinessService myBusinessService;

	@Inject
	public void setMyBusinessService(MyBusinessService myBusinessService) {
		this.myBusinessService = myBusinessService;
	}
}
/**
 * Client which requires the data source with injected references.
 */
public class MyView {

	/**
	 * Let Google Guice create the instance and inject dependencies.
	 */
	private DataSource source = InjectorHolder.get(DataSource.class);
}
</pre>
<p>Please note, that the data source is using setter-injection for the service implementations and the InjectorHolder as a factory to create an instance of data source with injected reference.</p>
<h3>Packaging Guice</h3>
<p>After this short introduction of Guice, it is time to package this 
<a  href="http://vannevarvision.wordpress.com/2007/03/08/making-external-libraries-available-as-an-eclipse-plug-in/" onclick="javascript:pageTracker._trackPageview('/external/vannevarvision.wordpress.com/2007/03/08/making-external-libraries-available-as-an-eclipse-plug-in/');" >3rd-party library into the Eclipse RCP client</a>. In fact it is all about putting the JARs (guice-2.0.jar, aopalliance-1.0.jar) into some folder inside of the client plug-in and modifying the MANIFEST.MF so that the JARs are on the bundle class-path and the packages are listed as &#8220;exported&#8221;.</p>
<h3>What about mock?</h3>
<p>After the client has the ability to use business delegates it can access the business functionality of the server. In fact this requires that the server is already implemented. In order to decouple the client from the server development, 
<a  href="http://en.wikipedia.org/wiki/Mock_object" onclick="javascript:pageTracker._trackPageview('/external/en.wikipedia.org/wiki/Mock_object');" >mocks</a> can be used. Mocks are popular in context of Unit tests, but can be used to simulate behavior of server implementation as well. Since mocks should not be delivered into production it is a good idea to put them into a separate mock plug-in, included into the special mock feature. The mock plug-in should export its packages. These should be imported by the main plug-in, instead of defining of a dependency on the mock plug-in directly. The mock feature is included in the product / top-level feature as an optional feature. This specific configuration allows the main plug-in to instantiate classes from the mock plug-in, if this is delivered, but doesn&#8217;t produce errors if the mock plug-in is not included into release.</p>
<p>Since the business delegate implementes the business interface, its mock should also do so:</p>
<pre class="brush: java; title: ;">
public class MyBusinessServiceMock implements MyBusinessService {

	public List&lt;OperationResultDto&gt; doSomeStuff(ParameterDto parameter) {
		debug(&quot;entering doSomeStuff(ParameterDto)&quot;);
		final List&lt;OperationResultDto&gt; result = new ArrayList&lt;OperationResultDto&gt;();
		result.add(new OperationResult(parameter.getValue()));
		debug(&quot;leaving doSomeStuff(ParameterDto)&quot;);
		return result;
	}
...
}
</pre>
<p>Since the mocks should also be injected by Guice, we define the binding module as well.</p>
<pre class="brush: java; title: ;">
public class ServiceMockModule extends AbstractModule {
	protected void configure() {
		bind(MyBusinessService.class).to(MyBusinessServiceMock.class);
	}
}
</pre>
<p>Finally, we got two implementations and two Guice&#8217;s AbstractModule implementation binding them. The last missing piece is the dynamic configuration which allows to switch between them easily. For this purpose we use the extension-point mechanism of Eclipse and define the following extension point (all documentation elements are removed for readability):</p>
<pre class="brush: xml; title: ;">
&lt;schema targetNamespace=&quot;...&quot; xmlns=&quot;...&quot;&gt;
   &lt;element name=&quot;extension&quot;&gt;
      ...
      &lt;complexType&gt;
         &lt;sequence&gt;&lt;element ref=&quot;moduleConfiguration&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;unbounded&quot;/&gt;&lt;/sequence&gt;
         &lt;attribute name=&quot;point&quot; type=&quot;string&quot; use=&quot;required&quot;&gt;&lt;/attribute&gt;
         &lt;attribute name=&quot;id&quot; type=&quot;string&quot;&gt;&lt;/attribute&gt;
         &lt;attribute name=&quot;name&quot; type=&quot;string&quot;&gt;&lt;/attribute&gt;
      &lt;/complexType&gt;
   &lt;/element&gt;
   &lt;element name=&quot;moduleConfiguration&quot;&gt;
      &lt;complexType&gt;
         &lt;attribute name=&quot;moduleClassname&quot; type=&quot;string&quot; use=&quot;required&quot;&gt;
            &lt;annotation&gt;
               &lt;appInfo&gt;&lt;meta.attribute kind=&quot;java&quot; basedOn=&quot;com.google.inject.AbstractModule:&quot;/&gt;&lt;/appInfo&gt;
            &lt;/annotation&gt;
         &lt;/attribute&gt;
         &lt;attribute name=&quot;priority&quot; type=&quot;string&quot; use=&quot;required&quot;&gt;&lt;/attribute&gt;
      &lt;/complexType&gt;
   &lt;/element&gt;
&lt;/schema&gt;
</pre>
<p>Using this definition, the plug-in can extend the main plug-in, by providing <code>moduleConfigurations</code>, which is a class name of the class extending the Guice AbstractModule and the priority. Using the following utility class, the module configurations can be read:</p>
<pre class="brush: java; title: ;">
public class PluginUtility {

	public static TreeMap&lt;Integer, AbstractModule&gt; getModuleConfigurations() throws CoreException {
		final TreeMap&lt;Integer, AbstractModule&gt; moduleConfigurations = new TreeMap&lt;Integer, AbstractModule&gt;();
		IExtension[] moduleConfigurationExtensions = Platform.getExtensionRegistry().getExtensionPoint(&quot;...id...&quot;).getExtensions();
		for (IExtension moduleConfiguration : moduleConfigurationExtensions) {
			for (IConfigurationElement configElement : moduleConfiguration.getConfigurationElements()) {

				AbstractModule module = (AbstractModule) configElement.createExecutableExtension(&quot;moduleClassname&quot;);
				String priorityAsString = configElement.getAttribute(&quot;priority&quot;);
				int priority = 0;
				try {
					priority = Integer.parseInt(priorityAsString);
				} catch (NumberFormatException e) {
					throw new CoreException(...);
				}

				moduleConfigurations.put(Integer.valueOf(priority), module);
			}
		}
		return moduleConfigurations;
	}
}
</pre>
<p>Using this utility, the main plug-in can read in available AbstractModules available in runtime and configure Dependency Injection. Before the usage of InjectorHolder this should be configured. We use higher priority (bigger number) as a reason to select the AbstractModule.</p>
<pre class="brush: java; title: ;">
public class InjectorHolder {
...
	private Injector injector;

	public static InjectorHolder getInstance() {
		if (instance == null) {
			instance = new InjectroHolder();
			injector = Guice.createInjector(PluginUtility.getModuleConfigurations().lastEntry().getValue());
		}
		return instance;
	}
...
}
</pre>
<p>Finally, the two binding modules should use the extension-point. The plug-in containing the business delegates should define the module configuration with a &#8220;standard&#8221; priority:</p>
<pre class="brush: xml; title: ;">
   &lt;extension
         point=&quot;....ModuleConfiguration&quot; name=&quot;ModuleConfiguration&quot;&gt;
      &lt;moduleConfiguration
            moduleClassname=&quot;....ServiceFacadeModule&quot;
            priority=&quot;1&quot;&gt;
      &lt;/moduleConfiguration&gt;
   &lt;/extension&gt;
</pre>
<p>The mock plugin should define a higher priority, which would win against the business delegate, if included into release.</p>
<pre class="brush: xml; title: ;">
   &lt;extension
         point=&quot;....ModuleConfiguration&quot; name=&quot;ModuleConfiguration&quot;&gt;
      &lt;moduleConfiguration
            moduleClassname=&quot;....ServiceMockModule&quot;
            priority=&quot;10&quot;&gt;
      &lt;/moduleConfiguration&gt;
   &lt;/extension&gt;
</pre>
<h3>Summary</h3>
<p>In this article, an implementation approach for business delegates and service locator patterns is shown. Usage of Google Guice Dependency Injection framework allows for a flexible resolution of dependency in client code. Since it doesn&#8217;t support multiple binding configurations, we introduce a self-defined extension point, which allows to register different DI-Configuration modules and assign different priorities to them. In addition, we use the ability of Eclipse to define and use optional feature, to foster runtime-based configuration. Using different &#8220;Run Configurations&#8221;, you can start the RCP client with different implementation of your business services. If the mock plug-in is included, its higher priority will win against the business delegates. Therefore the development of the client can be performed using mock objects instead of real business delegates without any additional configuration.</p>
<p>Have Fun&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techjava.de/topics/2010/11/guicy-mocks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Launching Eclipse RCP via Java Web Start</title>
		<link>http://www.techjava.de/topics/2010/02/launching-rcp-via-jws/</link>
		<comments>http://www.techjava.de/topics/2010/02/launching-rcp-via-jws/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 16:32:15 +0000</pubDate>
		<dc:creator>Simon Zambrovski</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Enterprise Systems]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Application id not found]]></category>
		<category><![CDATA[bundle]]></category>
		<category><![CDATA[delivery]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[Java Web Start]]></category>
		<category><![CDATA[JNLP]]></category>
		<category><![CDATA[JWS]]></category>
		<category><![CDATA[osgi]]></category>
		<category><![CDATA[packaging]]></category>
		<category><![CDATA[rcp]]></category>

		<guid isPermaLink="false">http://www.techjava.de/?p=582</guid>
		<description><![CDATA[The Eclipse RCP became a prominent platform for building client software. One of the delivery mechanisms supported by Eclipse RCP is Sun&#8217;s Java Web Start (JWS). Since Galileo Edition some changes has been introduced in the platform. This article provides some hints for creation of the RCP delivered by Java Web Start. Packaging In order [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.techjava.de/wp-content/uploads/eclipse-rcp.png" alt="" title="eclipse-rcp" width="237" height="237" style="float:right; margin:5px" />The Eclipse RCP became a prominent platform for building client software. One of the delivery mechanisms supported by Eclipse RCP is Sun&#8217;s Java Web Start (JWS). Since Galileo Edition some changes has been introduced in the platform. This article provides some hints for creation of the RCP delivered by Java Web Start.</p>
<h2>Packaging</h2>
<p>In order to package the RCP I suggest to use feature-based products as described in 
<a  href="http://www.techjava.de/topics/2009/07/packaging-eclipse-based-rcp-for-the-use-in-enterprise-context/">a previous article</a>. Following it, you should have a top-level plug-in (also refered as product-defining plug-in) and top-level feature, which is called &#8220;wrap&#8221;-feature in the context of the Java Web Start. </p>
<h3>Exporting the product</h3>
<p>Before you start with Java Web Start (JWS), export the product and make sure it starts as a standalone application. In doing so, you have to ensure that your references to the plug-ins are correct. One of the way of doing it is to hit the Validate button in the top left of the product editor. <img src="http://www.techjava.de/wp-content/uploads/validate-product.png" alt="" title="validate-product" width="196" height="79" style="float:right; margin:5px;" /> If the validation is successful, try to export the product. The PDE builder will run and create a distribution. The errors of the compiler/builder/assembler, if any, are reported to files zipped to the <code>logs.zip</code> file in the distribution directory. <span id="more-582"></span> A prominent error is</p>
<pre class="brush: plain; light: true; title: ;">
Compliance level '1.3' is incompatible with source level '1.6'. A compliance level '1.6' or better is required.
</pre>
<p>Which actually means that the plug-in classes has not been compiled at all. In order to avoid this error make sure to set the following properties in the <code>build.properties</code> file of the corresponding plug-in:</p>
<pre class="brush: plain; light: true; title: ;">
javacSource=1.3
javacTarget=1.3
</pre>
<h3>Exporting the wrap-feature</h3>
<p>After a successful export of the product, just export the top-level feature (the wrap-feature). Make sure to provide the signing information, since JWS requires all resources to be signed. If you are aiming to deliver for different platforms, make sure to define a target platform (<strong>Window > Preferences > Plug-in Development > Target Platform</strong>) which contains a Delta Pack. A Delta Pack is a set of plug-ins which can be downloaded separately on the 
<a  href="http://ww.eclipse.org/downloads/" onclick="javascript:pageTracker._trackPageview('/external/ww.eclipse.org/downloads/');" >Eclipse Homepage</a>. Also, don&#8217;t forget to switch over to the Java Web Start tab of the Feature Export Wizard, activate the checkbox &#8220;Create JNLP manifest for the JAR archives&#8221; and specify the site URL where the resulting JNLP will be located. Make sure all your features has the provider attribute set, since it is used as the &#8220;vendor&#8221; inside of the JNLP file, which is a mandatory attribute.</p>
<h3>Creating the main JNLP</h3>
<p>The PDE build will run and create a distribution in the specified directory. Along with the exported JARs in features and plug-ins, the packaging script will generate the JNLP descriptors for every feature. Still, the main JNLP file required for launching the application is missing and has to be provided separately. Here is, how it looks like:</p>
<pre class="brush: xml; title: ;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;jnlp spec=&quot;1.0+&quot; codebase=&quot;http://localhost/app/&quot; href=&quot;app.jnlp&quot;&gt;
    &lt;information&gt;
        &lt;title&gt;application titel&lt;/title&gt;
        &lt;vendor&gt;provider&lt;/vendor&gt;
        &lt;offline-allowed/&gt;
    &lt;/information&gt;

    &lt;security&gt;
        &lt;all-permissions/&gt;
    &lt;/security&gt;

    &lt;application-desc main-class=&quot;org.eclipse.equinox.launcher.WebStartMain&quot;&gt;
	&lt;argument&gt;-product&lt;/argument&gt;
	&lt;argument&gt;de.techjava.app.webstart.productid&lt;/argument&gt;
	&lt;argument&gt;-application&lt;/argument&gt;
	&lt;argument&gt;de.techjava.app.webstart.appid&lt;/argument&gt;
    &lt;/application-desc&gt;

    &lt;resources&gt;
        &lt;j2se version=&quot;1.4+&quot; ax-heap-size=&quot;128m&quot; /&gt;
	&lt;jar href=&quot;plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar&quot;/&gt;
	&lt;extension name=&quot;wrap feature&quot; href=&quot;features/wrap_feature_1.0.0.jnlp&quot; /&gt;
	&lt;!-- OSGI setup --&gt;
        &lt;property name=&quot;osgi.instance.area&quot; value=&quot;@user.home/app&quot;/&gt;
        &lt;property name=&quot;osgi.configuration.area&quot; value=&quot;@user.home/app&quot;/&gt;
    &lt;/resources&gt;
&lt;/jnlp&gt;
</pre>
<p>Important is to specify both, the <strong>product id</strong> and the <strong>applciation id</strong>, otherwise you will see the &#8220;Application id not found&#8221; exception. Of course you can specify 
<a  href="http://help.eclipse.org/galileo/topic/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html" onclick="javascript:pageTracker._trackPageview('/external/help.eclipse.org/galileo/topic/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html');" >additional options</a> as command-line arguments of the launcher itself. I found it useful to be able to let the OSGi running and then connect to it and query for loaded bundles. You can do it by adding the following arguments:</p>
<pre class="brush: xml; title: ;">
	&lt;argument&gt;-console&lt;/argument&gt;
	&lt;argument&gt;1234&lt;/argument&gt;
	&lt;argument&gt;-noExit&lt;/argument&gt;
</pre>
<p>This will allow to connect via telnet with running OSGi, even after the application finishes.<br />
This is basically it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techjava.de/topics/2010/02/launching-rcp-via-jws/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>OSGi: Why Modularity is Important.</title>
		<link>http://www.techjava.de/topics/2008/09/osgi-why-modularity-is-important/</link>
		<comments>http://www.techjava.de/topics/2008/09/osgi-why-modularity-is-important/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 10:16:18 +0000</pubDate>
		<dc:creator>Simon Zambrovski</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[bundle]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[Hamburg]]></category>
		<category><![CDATA[hotel east]]></category>
		<category><![CDATA[osgi]]></category>
		<category><![CDATA[peter kriens]]></category>

		<guid isPermaLink="false">http://www.techjava.de/?p=120</guid>
		<description><![CDATA[Yesterday, the OSGi session took place in Hotel East in Hamburg. Peter Kriens, the OSGi evangelist showed a wonderful Zen Presentation on OSGi. I wrote a lot during his talk which happens to me very seldom. Here are the core statements I understood: The core difference between usual plugin architectures and OSGi is that OSGi [...]]]></description>
			<content:encoded><![CDATA[<p><img style="border: 1px solid black; margin: 4px;" src="http://farm4.static.flickr.com/3250/2844821687_ea54b10e51_m.jpg" alt="OSGi HH" width="120" height="180" /><img style="border: 1px solid black; margin: 4px;" src="http://farm4.static.flickr.com/3172/2844822729_ed696da911_m.jpg" alt="OSGi HH" width="180" height="120" /><img style="border: 1px solid black; margin: 4px;" src="http://farm4.static.flickr.com/3012/2844827273_332a7c565e_m.jpg" alt="OSGi HH" width="120" height="180" /></p>
<p>Yesterday, the 
<a  href="http://www.techjava.de/topics/2008/09/osgi-session-in-east-hotel-hamburg/">OSGi session</a> took place in 
<a  href="http://www.east-hamburg.de/" onclick="javascript:pageTracker._trackPageview('/external/www.east-hamburg.de/');" >Hotel East</a> in Hamburg. 
<a  href="http://www.aqute.biz/Main/HomePage" onclick="javascript:pageTracker._trackPageview('/external/www.aqute.biz/Main/HomePage');" >Peter Kriens</a>, the OSGi evangelist showed a wonderful 
<a  href="http://www.presentationzen.com/" onclick="javascript:pageTracker._trackPageview('/external/www.presentationzen.com/');" >Zen Presentation</a> on OSGi. I wrote a lot during his talk which happens to me very seldom. Here are the core statements I understood:</p>
<ul>
<li>The core difference between usual plugin architectures and OSGi is that OSGi concentrates on collaboration of the components.</li>
<li>OSGi delivers a controlled environment, in which the question if a component runs or not can be answered in beforehand.</li>
<li>OSGi bundles use metadata (about versions, dependencies, etc) to predict an error, not discover it in runtime.</li>
<li>OSGi has a very narrow API containing the minimal common part.</li>
<li>OSGi consists of module, life cycle and services layers. The initially developed services layer required smart class loading mechanisms (module layer).</li>
</ul>
<ol>
<li>The module layer is desigend to control the class loading machanisms (e.G. structureal class loader hierarchies instead of a linear classpath)</li>
<li>Life cycle layer adds a management API (e.G. inform the others about installation event)</li>
<li>Separation of concerns is promoted by definition of services for different tasks.</li>
</ol>
<ul>
<li>Services are used for decoupling of system parts (This is a standard application of service-orientation).</li>
<li>OSGI makes dependencies explicit (private, import, export)</li>
<li>OSGI tries to make the system managable, taking dynamics and lifecycle as fisrst-class citizens</li>
<li>OSGI will be extended to support distribution: the team works on policies, SLAs, etc&#8230;</li>
</ul>
<p>I liked the talk and the way how Peter Kriens addressed the problems of OO. I was confirmed in some ideas about coupling that will be layed out in my thesis. After the presentation we had a delicious meal and wraped up the evening with interesting discussion about pros and contras of OSGi. 
<a  href="http://www.peterfriese.de/" onclick="javascript:pageTracker._trackPageview('/external/www.peterfriese.de/');" >Peter Friese</a> showed me some 
<a  href="http://r-osgi.sourceforge.net/" onclick="javascript:pageTracker._trackPageview('/external/r-osgi.sourceforge.net/');" >remote OSGi</a> staff, he was playing with. The lack of documentation in this area makes it a little difficult, but I hope he will post some news on it. As usual, you can find other pictures in my 
<a  href="http://www.flickr.com/photos/sza/sets/72157607211061354/" onclick="javascript:pageTracker._trackPageview('/external/www.flickr.com/photos/sza/sets/72157607211061354/');" >FlickR gallery</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techjava.de/topics/2008/09/osgi-why-modularity-is-important/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

