<?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 java</title>
	<atom:link href="http://www.techjava.de/topics/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.techjava.de</link>
	<description>Journal on Java Technology</description>
	<lastBuildDate>Thu, 17 Jun 2010 10:41:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Parameterized classes, arrays and varargs</title>
		<link>http://www.techjava.de/topics/2010/06/parameterized-classes-arrays-and-varargs/</link>
		<comments>http://www.techjava.de/topics/2010/06/parameterized-classes-arrays-and-varargs/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 14:30:00 +0000</pubDate>
		<dc:creator>Simon Zambrovski</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[arrays]]></category>
		<category><![CDATA[limitation]]></category>
		<category><![CDATA[parametrized]]></category>
		<category><![CDATA[varargs]]></category>

		<guid isPermaLink="false">http://www.techjava.de/?p=668</guid>
		<description><![CDATA[Yesterday, I discovered a funny nuance in Java programming language, which I didn&#8217;t know before and decided to share it with you. I was designing an API for transport of changes in relationships between two DTO types. Since I wanted to support batch changes, I created the class for carrying these:

class ManyToManyDelta&#60;S extends BaseDto&#60;?&#62;, T [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I discovered a funny nuance in Java programming language, which I didn&#8217;t know before and decided to share it with you. I was designing an API for transport of changes in relationships between two DTO types. Since I wanted to support batch changes, I created the class for carrying these:</p>
<pre class="brush: java;">
class ManyToManyDelta&lt;S extends BaseDto&lt;?&gt;, T extends BaseDto&lt;?&gt;&gt; {

  List&lt;SimpleRelationship&lt;S,T&gt;&gt; relationshipsToAdd;
  List&lt;SimpleRelationship&lt;S,T&gt;&gt; relationshipsToRemove;
  ...
}

class SimpleRelationship&lt;V extends BaseDto&lt;?&gt;, W extends BaseDto&lt;?&gt;&gt; {

  // BaseDto classes are identified by the parameterized Id
  Id&lt;V&gt; left;
  Id&lt;W&gt; right;

  SimpleRelationship(BaseDto&lt;V&gt; one, BaseDto&lt;W&gt; another) {
    left = one.getId();
    right = another.getId();
  }
}
</pre>
<p>Having this structure, you can model the relationship between two instances of types A and B by an instance of <code>SimpleRelationship&lt;A&gt;</code>. If you want to communicate the creation of a relationship you would put the latter into the <code>relatioshipToAdd</code> list, if you want to model the deletion, you would put it into the <code>relatioshipToRemove</code> list.</p>
<p>Now I it was time to develop methods for access of the relationship lists inside of the <code>ManyToManyDelta</code>:</p>
<pre class="brush: java;">
class ManyToManyDelta&lt;S extends BaseDto&lt;?&gt;, T extends BaseDto&lt;?&gt;&gt; {
  ...
  public void add(SimpleRelationship&lt;S, T&gt; toAdd) {
    if (toAdd == null) { /* react */}
    this.relatioshipToAdd.add(toAdd);
  }
  ...
}
</pre>
<p>You could think that you have a batch update (e.g. an <code>Array</code> or <code>List</code>) of <code>SimpleRelatioship</code> objects you would like to add them by one invocation instead of a series of invocation. e.G:</p>
<pre class="brush: java;">
class ManyToManyDelta&lt;S extends BaseDto&lt;?&gt;, T extends BaseDto&lt;?&gt;&gt; {
  ...
  public void add(SimpleRelationship&lt;S, T&gt;[] toAdd) {
    if (toAdd == null) { /* react */}
    this.relatioshipToAdd.addAll(Arrays.asList(toAdd));
  }
  public void add(SimpleRelationship&lt;S, T&gt; toAdd) {
    if (toAdd == null) { /* react */}
    this.relatioshipToAdd.add(toAdd);
  }
  ...
}
</pre>
<p>Using the 
<a  href="http://java.sun.com/j2se/1.5.0/docs/guide/language/varargs.html" onclick="javascript:pageTracker._trackPageview('/external/java.sun.com/j2se/1.5.0/docs/guide/language/varargs.html');" >varargs</a> feature of Java you could also write equivalent:</p>
<pre class="brush: java;">
class ManyToManyDelta&lt;S extends BaseDto&lt;?&gt;, T extends BaseDto&lt;?&gt;&gt; {
  ...
  public void add(SimpleRelationship&lt;S, T&gt;... toAdd) {
    if (toAdd == null) { /* react */}
    this.relatioshipToAdd.addAll(Arrays.asList(toAdd));
  }
  ...
}
</pre>
<p>That would be nice, right? By the way, it is a good idea, to write some client code, during the development of API. This discovers potential problems:</p>
<pre class="brush: java;">
  ...
  A entityA = ...;
  B entityB = ...;
  ManyToManyDelta&lt;A, B&gt; delta = new ManyToManyDelta&lt;A,B&gt;();
  delta.add(new SimpleRelationship&lt;A,B&gt;(entityA, entityB));
</pre>
<p>Coding this result in a type safety warning: A generic array of SimpleRelationship<a> is created for a varargs parameter. Which reveals a problem in a Java language: you can not create an array of parameterized types. And resulting from this fact, you can not use that as varargs argument.</p>
<p>Finally, if you want to create convenience methods for one and many items, you have to do it in a old-fashined way, by providing overloaded methods.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techjava.de/topics/2010/06/parameterized-classes-arrays-and-varargs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Real World Java EE Practices &#8211; Rethinking Best Practices by Adam Bien</title>
		<link>http://www.techjava.de/topics/2010/02/rethinking-best-practices/</link>
		<comments>http://www.techjava.de/topics/2010/02/rethinking-best-practices/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 23:21:43 +0000</pubDate>
		<dc:creator>Simon Zambrovski</dc:creator>
				<category><![CDATA[enterprise systems]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[adam bien]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[enterprise]]></category>
		<category><![CDATA[jee]]></category>
		<category><![CDATA[patterns]]></category>

		<guid isPermaLink="false">http://www.techjava.de/?p=594</guid>
		<description><![CDATA[
I just returned from the furious event given by Adam Bien on 
Real World Java EE Practices. The presentation has been held in Lehmanns Bookstore in Hamburg in co-operation with the JUGHH. It was a full success with no space left in the bookstore. I think, I got the last seat and there were some [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.techjava.de/wp-content/uploads/adambien-225x300.jpg" alt="" title="adambien" width="225" height="300" style="float:right; margin:5px;" /><br />
I just returned from the furious event given by Adam Bien on 
<a  href="http://www.adam-bien.com/roller/abien/entry/free_jug_session_in_hamburg" onclick="javascript:pageTracker._trackPageview('/external/www.adam-bien.com/roller/abien/entry/free_jug_session_in_hamburg');" >Real World Java EE Practices</a>. The presentation has been held in Lehmanns Bookstore in Hamburg in co-operation with the JUGHH. It was a full success with no space left in the bookstore. I think, I got the last seat and there were some people standing. </p>
<p>Adam made it in an hour and presented many interesting topics. He started with new subjects introduces in JEE6, like optional local interfaces, cronjob-like Timer Service and other nice goodies. Then he covered new stuff from JEE like REST and CDI (Context and Dependency Injection). Finally, he moved to the best practices, patterns and anti-pattern. As usual, it was quick and precise &#8211; Adam answered many questions and gave a good overview of the technology.</p>
<p>After the presentation, JUGHH / Lehmanns offer a glass of sparkling wine for the smaller audience and Adam spoke about the possibility to speak about JavaFX next time. This time I left my camera at home and only had my phone with me, so sorry for the low-resolutioned picture&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techjava.de/topics/2010/02/rethinking-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Packaging Eclipse-based RCP for the use in enterprise context</title>
		<link>http://www.techjava.de/topics/2009/07/packaging-eclipse-based-rcp-for-the-use-in-enterprise-context/</link>
		<comments>http://www.techjava.de/topics/2009/07/packaging-eclipse-based-rcp-for-the-use-in-enterprise-context/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 20:00:33 +0000</pubDate>
		<dc:creator>Simon Zambrovski</dc:creator>
				<category><![CDATA[eclipse]]></category>
		<category><![CDATA[enterprise systems]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[rcp]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[packaging]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[product]]></category>

		<guid isPermaLink="false">http://www.techjava.de/?p=394</guid>
		<description><![CDATA[
Abstract
Using Eclipse-based rich-clients as stand-alone applications is discussed in many 
books and 
articles. In the context of enterprise systems, the software development adopted several paradigms to improve the quality of the overall architecture. This short article describes some issues in packaging the application for using it in the context of enterprise systems.
Architectural Assumptions
Designing enterprise architectures [...]]]></description>
			<content:encoded><![CDATA[<p><img style="margin: 5px; float: right" title="Packaging" src="http://www.techjava.de/wp-content/uploads/packaging.jpg" alt="Packaging" width="120" height="120" /></p>
<h2>Abstract</h2>
<p>Using Eclipse-based rich-clients as stand-alone applications is discussed in many 
<a  href="http://www.amazon.com/Eclipse-Rich-Client-Platform-Applications/dp/0321334612" onclick="javascript:pageTracker._trackPageview('/external/www.amazon.com/Eclipse-Rich-Client-Platform-Applications/dp/0321334612');" >books</a> and 
<a  href="http://www.eclipse.org/articles/Article-RCP-1/tutorial1.html" onclick="javascript:pageTracker._trackPageview('/external/www.eclipse.org/articles/Article-RCP-1/tutorial1.html');" >articles</a>. In the context of enterprise systems, the software development adopted several paradigms to improve the quality of the overall architecture. This short article describes some issues in packaging the application for using it in the context of enterprise systems.</p>
<h2>Architectural Assumptions</h2>
<p>Designing enterprise architectures is a standard discipline for IT-consulting companies or freelancers involved in software development. Maybe one of the main characteristics of enterprise architectures is the framework-driven approach of software creation. Thus, the software has to comply certain rules and standards adopted inside the enterprise. In order to simplify such constrained development process, it is common to use an in-house software framework, which enforces the  compliance of the enterprise-internal standards and acts as glue between different technologies adopted as parts of the enterprise architecture.</p>
<p>Using such frameworks has major implications for the software development in general, and especially for the rich client development. The design issues are summarized in the next section.</p>
<h2>Usaging an Enterprise Framework</h2>
<p>The major goal of the enterprise in-house framework is to simplify the process of software systems development and to enforce standardization among the software systems. This usually includes the following aspects:</p>
<ul>
<li>Domain-specific component framework</li>
<li>Methods for master data management</li>
<li>Infrastructure services: authentication, authorization, communication, security, printing, reporting</li>
<li>Application skeletons and launchers</li>
</ul>
<p>The more unification and standardization is included inside the framework, the easier it is for a software developer to concentrate on the particular business task and the easier is the maintenance of the software system.</p>
<p>From the previous list, the most interesting part related to RCP packaging and deployment is the existence of the application skeletons and launchers. So, when launching an application, the framework libraries are loaded and executed first and pass the control to the application-specific modules. The advantage of this approach is that infrastructure services can be loaded first, which can be developed and shared among different applications.<br />
<span id="more-394"></span></p>
<h2>The required plug-ins</h2>
<p>Following the general idea of RCP packaging (see rules provided in the 
<a  href="http://www.amazon.com/Eclipse-Rich-Client-Platform-Applications/dp/0321334612" onclick="javascript:pageTracker._trackPageview('/external/www.amazon.com/Eclipse-Rich-Client-Platform-Applications/dp/0321334612');" >RCP Book</a>) and assuming one target platform (in terms of one RCP product), <strong>one top-level plug-in and should be defined</strong>. In addition, we assume at least one <strong>in-house framework plug-in</strong> and at least <strong>one application-specific plug-in</strong>. Usually there will be more of each type, but it will not change the picture much. Important at this point is the fact, that the application-specific code depends on the in-house framework code. In order to simplify the identification of the plug-ins, an example project is introduced. Let’s assume the project is called <strong>FooBar</strong>. Then, the plug-ins are called:</p>
<ul>
<li><code>de.techjava.foobar</code>: This is the functional plug-in, which contains the application-specific code.</li>
<li><code>de.techjava.framework</code>: This is the framework plug-in, which contains framework component code.</li>
<li><code>de.techjava.foobar.product.standalone</code>: This is an application and product definition plug-in which contains the definition of the product and application-agnostic code for launching the application.</li>
</ul>
<h2>Managing plug-in dependencies</h2>
<p>A difficult issue for the RCP beginners is the management of dependencies between plug-ins. Especially, the transition from the development of a single plug-in to the configuration of features and products seem to be non-trivial. In order to solve this problem, there are simple rules to follow. You can violate these rules in sophisticated scenarios, but for the beginners it is a good idea to follow them.</p>
<ol>
<li><em>Create dependencies only if you need them</em>. Each plug-in should only list plug-ins (or even better packages) it really depends on. Make sure to check it with the “<strong>Find unused dependencies</strong>” action available on the right-click in the Dependencies Tab of the Plug-in Manifest Editor.</li>
<li><em>Use versioning information. </em>Plug-ins (or better bundles, or as 
<a  href="http://www.aniszczyk.org/" onclick="javascript:pageTracker._trackPageview('/external/www.aniszczyk.org/');" >Chris</a> call them Plundles) provide version information. And it is highly advisable to include them in the import statements of the plug-ins, which simplifies the migration later on…</li>
<li><em>Don’t forget anything</em>. Every Plug-in should appear in at least in one Plug-In section of the Feature definition. Every feature should be included by another feature, higher in the hierarchy.</li>
<li><em>Keep the hierarchy flat</em>. For simple scenarios, it is sufficient to have two levels of features (top-level feature, one per-product and the underlying features include their plug-ins).</li>
<li><em>Don’t re-export dependencies</em>. Every Feature for a group of plug-ins should also include plug-ins required by the members of the group. It does not hurt if a plug-in is included several times, but it does if it is not included at all. You can optimize here if you check which plug-ins are imported by the Eclipse RCP feature (which can be considered as stable), but it does not make assumptions about features developed by third parties.</li>
</ol>
<p>Following these rules it is simple to create features for the corresponding plug-ins. Several plug-ins which belong together and are handled as a fixed piece can be grouped into Features. Usaging Features is highly advisable, and sometimes simply required (e.G. by RCP in a Java Web Start target deployment strategy). So in addition to the previously mentioned plug-in projects, at least three feature projects are required:</p>
<ul>
<li><code>de.techjava.foobar.feature</code>: This is a functional feature, which includes the <code>de.techjava.foobar</code> plug-in and all plug-ins required by it, which do not appear in the Eclipse RCP feature</li>
<li><code>de.techjava.framework.feature</code>: This is a framework feature, which includes the <code>de.techjava.framework</code> plug-in and all plug-ins required by it, which do not appear in the Eclipse RCP feature</li>
<li><code>de.techjava.foobar.feature.standalone</code> This is the top level feature, which is used for the product configuration. <strong>It includes the two features above and the Eclipse RCP feature </strong>(and optional other features used, like e.G. org.eclipse.help). <strong>It also includes exactly one plug-in</strong>, which is not included anywhere else: <code>de.techjava.foobar.standalone.product</code></li>
</ul>
<h2>The product definition plug-in</h2>
<p>The definition of the product is spread among several files. First of all the plug-in.xml of the <code>de.techjava.foobar.standalone.product</code> plug-in makes uses of two extensions:</p>
<ul>
<li><code>org.eclipse.core.runtime.applications</code></li>
<li><code>org.eclipse.core.runtime.products</code></li>
</ul>
<p>The application extension point is used to point to the Java class implementing the interface <code>org.eclipse.equinox.app.IApplication</code>. Along with this implementation, other classes needed to start up the RCP (like Advisors, etc…) are placed into the source directory of the plug-in. The product extension point is used for the association of the application with a product id. The previously-defined top-level feature includes all required features and the product definition plug-in. Finally, the <code>.product</code> file is the place, where all things are bound together: product id, application id, launcher parameters, and the one top level feature: <code>de.techjava.foobar.feature.standalone</code>. Other customization of the RCP is possible from the <code>plugin-customization.ini</code>, which is placed together with the <code>.product</code> file into the plug-in root directory.</p>
<p><img class="alignnone size-full" style="margin:10px;" title="Product configuration" src="http://www.techjava.de/wp-content/uploads/product_feature_plugin1.png" alt="Product configuration" width="385" height="499" /><br />
As a result the following configuration should be achieved after the packaging is finished. The product references the product-id and the application, defined in the plugin.xml of the plug-in project it is contained in. The product configuration is feature-based and includes one top-level feature. The top-level feature includes all other features (functional, framework, Eclipse RCP, other optional) and the one plugin, in which the product file resides.</p>
<p>The simple example provided in this articles is available as sourcecode for download (
<a  href="http://www.techjava.de/download/examples/rcp-packaging.zip" onclick="javascript:pageTracker._trackPageview('/downloads/download/examples/rcp-packaging.zip');" >rcp-packaging.zip</a>).</p>
<h2>The framework hooks</h2>
<p>In the introduced scenario, the packaging is not specific to the in-house framework. It just includes the feature containing the framework plug-in. This approach works fine, if the framework is used in a white-box manner, which means that the framework provides ready-to-use components to be plugged-in to the application (like e.G. a component for the master data management). The other type of frameworks is the so-called black-box framework, which provides components that have to be configured and integrated into the application components. In this case, the framework components can not be plugged-in using some declarative extension points, but need to be called from the application code. In the latter case, the dependencies appear between the plug-in launching the application (<code>de.techjava.foobar.standalone.product</code>) and the framework plug-ins. This requires a modification in the previous setup and the violation of one of the rules posted above. The plug-in has to define the dependency to the framework plug-in, but the top-level feature does not include the required plug-in directly, but imports the whole framework feature.</p>
<p></p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">Technorati-Tags: 
<a rel="tag"  href="http://technorati.com/tags/eclipse" onclick="javascript:pageTracker._trackPageview('/external/technorati.com/tags/eclipse');" >eclipse</a>,
<a rel="tag"  href="http://technorati.com/tags/java" onclick="javascript:pageTracker._trackPageview('/external/technorati.com/tags/java');" >java</a>,
<a rel="tag"  href="http://technorati.com/tags/rcp" onclick="javascript:pageTracker._trackPageview('/external/technorati.com/tags/rcp');" >rcp</a>,
<a rel="tag"  href="http://technorati.com/tags/packaging" onclick="javascript:pageTracker._trackPageview('/external/technorati.com/tags/packaging');" >packaging</a>,
<a rel="tag"  href="http://technorati.com/tags/plugin" onclick="javascript:pageTracker._trackPageview('/external/technorati.com/tags/plugin');" >plugin</a>,
<a rel="tag"  href="http://technorati.com/tags/feature" onclick="javascript:pageTracker._trackPageview('/external/technorati.com/tags/feature');" >feature</a>,
<a rel="tag"  href="http://technorati.com/tags/product" onclick="javascript:pageTracker._trackPageview('/external/technorati.com/tags/product');" >product</a>,
<a rel="tag"  href="http://technorati.com/tags/enterprise+systems" onclick="javascript:pageTracker._trackPageview('/external/technorati.com/tags/enterprise+systems');" >enterprise systems</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.techjava.de/topics/2009/07/packaging-eclipse-based-rcp-for-the-use-in-enterprise-context/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Eclipse Ganymede and WSCompile incompatibility?</title>
		<link>http://www.techjava.de/topics/2009/02/ganymede-wscompile/</link>
		<comments>http://www.techjava.de/topics/2009/02/ganymede-wscompile/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 17:49:04 +0000</pubDate>
		<dc:creator>shuron</dc:creator>
				<category><![CDATA[eclipse]]></category>
		<category><![CDATA[enterprise systems]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[ganymede]]></category>
		<category><![CDATA[wscompile]]></category>

		<guid isPermaLink="false">http://www.techjava.de/?p=270</guid>
		<description><![CDATA[I found strange problem running wscompile (from Sun&#8217;s Java Web Service Developer Pack 1.6) inside Ganymede (Eclipse Version 3.4.1). The run of the wscompile Ant task produce a problem. The build script execution freezes on the wscompile task. It prints the following message on console but then nothing happens.

[wscompile] wscompile ...\env\java\1.4.2_03\jre\bin\classpath-classpath D:\workspaces\general\lib\bla.bo-0.0.1.jar; ... D:\workspaces\general\lib\... jar.0.5.5

In [...]]]></description>
			<content:encoded><![CDATA[<p>I found strange problem running wscompile (from Sun&#8217;s Java Web Service Developer Pack 1.6) inside Ganymede (Eclipse Version 3.4.1). The run of the wscompile Ant task produce a problem. The build script execution freezes on the wscompile task. It prints the following message on console but then nothing happens.</p>
<pre class="brush: xml;">
[wscompile] wscompile ...\env\java\1.4.2_03\jre\bin\classpath-classpath D:\workspaces\general\lib\bla.bo-0.0.1.jar; ... D:\workspaces\general\lib\... jar.0.5.5
</pre>
<p>In this line, the classpath of wscompile is printed.</p>
<p>The build script uses configured Apache Ant in version 1.6.5. I tried to start it with Java in versions 1.4.2 und 1.6.0.10. Both works in Europa (Eclipse 3.3.x) but don&#8217;t work in Ganymede (Eclipse 3.4.x), except for the first run. It seems that Ganymede provides a different handling for Ant scripts. Every first start of an Ant build script produces new &#8220;External Tool Configuration&#8221; (if not already there). <strong>If this configuration already exists, wscompile task doesn&#8217;t work!</strong></p>
<p>This means my build script with wscompile task works only once, every first time after deleting the &#8220;External Tool Configuration&#8221;. I could live with that if I wouldn&#8217;t need that configuration. But I need that configuration to use different java version that is the workspace default.</p>
<p><strong>Do anyone know how to fix that?</strong><br />
Here is my task definiton.</p>
<pre class="brush: xml;">
&lt;taskdef name=&quot;wscompile&quot;
		classname=&quot;com.sun.xml.rpc.tools.ant.Wscompile&quot;
		classpathref=&quot;class.path.jwsdp&quot;
		/&gt;
</pre>
<p>and also task usage in the script</p>
<pre class="brush: xml;">
&lt;wscompile fork=&quot;true&quot; import=&quot;true&quot; base=&quot;java/class&quot; sourceBase=&quot;java/generated&quot; verbose=&quot;true&quot; features=&quot;documentliteral, wsi, searchschema, serializeinterfaces, explicitcontext&quot; mapping=&quot;java/generated/META-INF/jaxrpc-mapping.xml&quot; config=&quot;metadata/wsdl-config.xml&quot; xSerializable=&quot;true&quot;&gt;
	&lt;classpath&gt;
		&lt;path refid=&quot;class.path.local&quot; /&gt;
		&lt;path refid=&quot;class.path.ant&quot; /&gt;
		&lt;pathelement path=&quot;${java.class.path}&quot; /&gt;
	&lt;/classpath&gt;
&lt;/wscompile&gt;
</pre>
<p>Comments are welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techjava.de/topics/2009/02/ganymede-wscompile/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Eclipse DemoCamp 2008 Hamburg &#8211; November, East Hotel</title>
		<link>http://www.techjava.de/topics/2008/11/eclipse-democamp-2008-hamburg-november-east-hotel/</link>
		<comments>http://www.techjava.de/topics/2008/11/eclipse-democamp-2008-hamburg-november-east-hotel/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 22:09:04 +0000</pubDate>
		<dc:creator>HeSoK</dc:creator>
				<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[camp]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[Hamburg]]></category>

		<guid isPermaLink="false">http://www.techjava.de/?p=200</guid>
		<description><![CDATA[On the 10th of November it was time again: an Eclipse Demo Camp took place in the East Hotel in Hamburg, Germany. This time, the Demo Camp was sponsored by 
Itemis, 
it-agile, 
froglic and of course the 
Eclipse Foundation. The organisators of the evening were Peter Friese (Itemis) and Martin Lippert (it-agile) who intruduced the [...]]]></description>
			<content:encoded><![CDATA[<p>On the 10th of November it was time again: an Eclipse Demo Camp took place in the East Hotel in Hamburg, Germany. This time, the Demo Camp was sponsored by 
<a title="http://www.itemis.de/"  href="http://www.itemis.de/" target="_blank" onclick="javascript:pageTracker._trackPageview('/external/www.itemis.de/');" >Itemis</a>, 
<a title="http://www.it-agile.de/"  href="http://www.it-agile.de/" target="_blank" onclick="javascript:pageTracker._trackPageview('/external/www.it-agile.de/');" >it-agile</a>, 
<a title="http://www.froglogic.com/"  href="http://www.froglogic.com/" target="_blank" onclick="javascript:pageTracker._trackPageview('/external/www.froglogic.com/');" >froglic</a> and of course the 
<a title="http://www.eclipse.org/"  href="http://www.eclipse.org/" target="_blank" onclick="javascript:pageTracker._trackPageview('/external/www.eclipse.org/');" >Eclipse Foundation</a>. The organisators of the evening were Peter Friese (Itemis) and Martin Lippert (it-agile) who intruduced the presenters.</p>
<p><img class="aligncenter" src="http://farm4.static.flickr.com/3068/3023273934_4913bb9247.jpg?v=0" alt="" width="500" height="333" /></p>
<p><strong>Harald Wellmann</strong> of 
<a title="http://www.harmanbecker.com/harmanBecker/www_root/index2.jsp"  href="http://www.harmanbecker.com/harmanBecker/www_root/index2.jsp" target="_blank" onclick="javascript:pageTracker._trackPageview('/external/www.harmanbecker.com/harmanBecker/www_root/index2.jsp');" >Innovative Systems GmbH (Harman/Becker Automotive Systems)</a> talked about &#8220;Europe on a Disk &#8211; Geoprocessing for Car Navigation Systems&#8221;. He talked about their usage of Eclipse and OSGi to build the map compiler on top of these and explained different benefits and drawbacks in using this technology. Additionally, he talked about Jump and uDig which is used for displaying maps in the Eclipse Map Processing Toolkit. Apart from the technical point of view, the talk gave an interesting little insight how the maps for our beloved navigational systems are created.</p>
<p>The second talk was given by <strong>Gerd Wütherich</strong> (
<a title="http://www.gerd-wuetherich.de/"  href="http://www.gerd-wuetherich.de/" target="_blank" onclick="javascript:pageTracker._trackPageview('/external/www.gerd-wuetherich.de/');" >independant consultant</a>) and was about &#8220;Spring Dynamic Modules for OSGi Service Platforms&#8221;. He demostrated how to use Spring in order to harness the power of OSGis dynamic Java lifecycle in enterprise applications. While presenting he showed some small demos. In his order service example, two persistence services were available and one went &#8220;offline&#8221;, so the other one jumped in to take over. Once the second service went down too, the application was waiting (with a timeout) until some persistence service was available. As a &#8220;a world in a nutshell&#8221; this was a great demo of how to use dynamic modules.</p>
<p>After the second talk was a little break with italian food. (Which I did not try, so I will not comment on it, but it looked delicious.)</p>
<p><strong>Miguel Garcia (
<a title="http://www.sts.tu-harburg.de/~mi.garcia/"  href="http://www.sts.tu-harburg.de/~mi.garcia/" target="_blank" onclick="javascript:pageTracker._trackPageview('/external/www.sts.tu-harburg.de/~mi.garcia/');" >TUHH</a>) and Rakesh Prithiviraj</strong> were talking about &#8220;Rethinking the Architecture of Java ORM in terms of LINQ&#8221;. This session basically covered a &#8220;what we (Java developers) could learn from .NET&#8221; features. As far as I understood, LINQ (Language INtegrated Query) is a query which is translated to a query for a specific natural datasource. Visualö Studio seems to provide good support for these kind of queries including content assist. Java on the other hand seems to struggle to provide as good support. The talk covered ideas of how to get at least close, if not catch up. I honestly do not understand, why such a innovative mechanism as LINQ was not introduced in Java much earlier? (
<a title="http://www.sts.tu-harburg.de/~mi.garcia/slides/ESE20081118LINQ4EMF.pdf"  href="http://www.sts.tu-harburg.de/~mi.garcia/slides/ESE20081118LINQ4EMF.pdf" target="_blank" onclick="javascript:pageTracker._trackPageview('/external/www.sts.tu-harburg.de/~mi.garcia/slides/ESE20081118LINQ4EMF.pdf');" >Slides of the two</a>)</p>
<p>The last talk was given by <strong>Stephan Herrmann</strong> (
<a title="http://www.swt.tu-berlin.de/"  href="http://www.swt.tu-berlin.de/" target="_blank" onclick="javascript:pageTracker._trackPageview('/external/www.swt.tu-berlin.de/');" >TU Berlin</a>) discussed &#8220;Plugin reuse and adaptation with Object Teams: Don&#8217;t settle for a compromise!&#8221;. This was basically an intruduction to Object Teams, a language extension to Java, which was developed over the past seven-eight years at the TU Berlin. This extension does not only cover the fundamental aspects but supports the complete Eclipse tool support: content assist, debugger and finally, compiler. Object Teams provides something, which Stephan explained as inheritence on object level (instead on on the class level). It provides the ability to modify objects (especially class instances, not classes!) with additional behavior. So, it is possible to adapt classes to change their runtime behavior with so-called Role Classes. On method level, the roles can be applied in a call-in or call-out fashion, depending on when they have to be invoked. From the point of view of software engineering and language design this was a very interesting talk. (For more information refer to 
<a title="http://objectteams.org/"  href="http://objectteams.org/" target="_blank" onclick="javascript:pageTracker._trackPageview('/external/objectteams.org/');" >ObjectTeams</a>, Slides are online at 
<a title="http://www.objectteams.org/publications/slides/EclipseDemoCamp_HH08.pdf"  href="http://www.objectteams.org/publications/slides/EclipseDemoCamp_HH08.pdf" target="_blank" onclick="javascript:pageTracker._trackPageview('/external/www.objectteams.org/publications/slides/EclipseDemoCamp_HH08.pdf');" >Slides</a>).</p>
<p>And after the end of this talk, 23:00h had passed (we started at 19:00 o&#8217;clock). However, seeing many familiar faces and having a pleasant conversation, together with great presentations made it worth staying up late.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techjava.de/topics/2008/11/eclipse-democamp-2008-hamburg-november-east-hotel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Productive Java EE 6</title>
		<link>http://www.techjava.de/topics/2008/09/productive-java-ee-6/</link>
		<comments>http://www.techjava.de/topics/2008/09/productive-java-ee-6/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 22:16:53 +0000</pubDate>
		<dc:creator>Simon Zambrovski</dc:creator>
				<category><![CDATA[announce]]></category>
		<category><![CDATA[enterprise systems]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mdsd]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[adam bien]]></category>
		<category><![CDATA[ejb]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Hamburg]]></category>
		<category><![CDATA[jee 6]]></category>
		<category><![CDATA[lehmanns]]></category>

		<guid isPermaLink="false">http://www.techjava.de/?p=129</guid>
		<description><![CDATA[The holiday season is over and we can enjoy an event every week. After 
Maven 2, 
Eclipse Stammtisch and 
reasoning on modularity an event on enterprise systems can be visited. It seems that after the 
last visit on Java EE 5 Hacking Adam want to tell something on Java EE 6 Hacking&#8230;
This session will be [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" style="border: 1px solid black; margin-right: 5px; margin-left: 5px;" src="http://www.techjava.de/wp-content/uploads/javausergrouphh.png" alt="JUGHH" width="132" height="123" />The holiday season is over and we can enjoy an event every week. After 
<a  href="http://www.techjava.de/topics/2008/09/maven-2-a-first-glance/">Maven 2</a>, 
<a  href="http://www.techjava.de/topics/2008/08/upcoming-eclipse-stammtisch-hamburg-v200809/">Eclipse Stammtisch</a> and 
<a  href="http://www.techjava.de/topics/2008/09/osgi-why-modularity-is-important/">reasoning on modularity</a> an event on enterprise systems can be visited. It seems that after the 
<a  href="http://www.techjava.de/topics/2008/05/progmatic-java-ee-5-hacking/">last visit on Java EE 5 Hacking</a> Adam want to tell something on Java EE 6 Hacking&#8230;</p>
<p>This session will be interactive / openspace like. He will walk through the new EJB 3.1 APIs and explain some interesting stuff as well. It is the logical conduction of the first 
<a  href="http://www.techjava.de/topics/2008/05/from-theory-to-practice/">JUG HH session in May 2008.</a></p>
<p><strong>Location:</strong>
<a  href="http://www.lob.de/cgi-bin/work/pages?id=U7HYixW1yHEijwvY&amp;frame=yes&amp;flag=google&amp;menupic=no&amp;page=lfb_hambg_2a" onclick="javascript:pageTracker._trackPageview('/external/www.lob.de/cgi-bin/work/pages');" >Lehmanns Fachbuchhandlung (Hamburg Hauptbahnhof)</a>, Kurze Mühren 6, 20095 Hamburg</p>
<p><strong>Date and Time:</strong> 16.09.2008, 20:00<br />
<strong>Topic:</strong> Productive Java EE 6 &#8211; Rethinking Best Practices And Bashing On Patterns, Cluster One</p>
<p><strong>Abstract: </strong>Java EE 6 is great, but many questions like:</p>
<ul>
<li>Are DAOs dead?</li>
<li>Do JSF really suck?</li>
<li>Are anemic JPA-entities a best practice?</li>
<li>Are XML deployment descriptors legacy?</li>
<li>Are EJBs lightweight?</li>
<li>How to test EJBs?</li>
<li>Is layering an antipattern?</li>
<li>Do we need factories?</li>
<li>How to integrate with RESTFul services?</li>
<li>Is it possible to deploy EJBs into a &#8230;WAR?</li>
<li>Are &#8220;plain old web containers&#8221; dead?</li>
<li>Services or Objects &#8211; what is the way to go?</li>
</ul>
<p>still remain open. These and many other questions will be discussed interactively with &#8230;code.</p>
<p><strong>Speaker:</strong> 
<a  href="http://www.adam-bien.com/" onclick="javascript:pageTracker._trackPageview('/external/www.adam-bien.com/');" ></a>Adam Bien<a></a></p>
<p><strong>About the speaker: </strong> Java Champion 
<a  href="http://www.adam-bien.com/" onclick="javascript:pageTracker._trackPageview('/external/www.adam-bien.com/');" >Adam Bien</a> is a self-employed consultant, lecturer, software architect, developer, and author in the enterprise Java sector in Germany who implements Java technology on a large scale. He is also the author of several books and articles on Java and J2EE technology, as well as distributed Java programming. His books include J2EE Patterns, J2EE HotSpots, Java EE 5 Architectures, Enterprise Architectures, Enterprise Java Frameworks, SOA Expert Knowledge, and Struts, all published in German.</p>
<p>As BEA technical director, Bien is also a member of the NetBeans Dream Team; an Expert Group member of the Java Community Process for EJB 3.1, JPA 2.0, and Java EE 6; and involved in embedded Java, Grid, and P2P technology. He currently works as an architect and developer in several J2EE-Java EE Model-Driven Architecture (MDA) and EAI component architecture projects for the Java EE platform and .NET.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techjava.de/topics/2008/09/productive-java-ee-6/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Multiple HTTP-Header values concatinating</title>
		<link>http://www.techjava.de/topics/2008/02/multi-http-header/</link>
		<comments>http://www.techjava.de/topics/2008/02/multi-http-header/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 15:02:36 +0000</pubDate>
		<dc:creator>Simon Zambrovski</dc:creator>
				<category><![CDATA[enterprise systems]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[multiple header]]></category>
		<category><![CDATA[servlet]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://www.techjava.de/topics/2008/02/multi-http-header/</guid>
		<description><![CDATA[The specification part
We continued the search for the reason of error described in the 
previous post. After some search in HTTP Specification executed by 
Prof. Turau: &#8220;&#8230; Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a [...]]]></description>
			<content:encoded><![CDATA[<h2>The specification part</h2>
<p>We continued the search for the reason of error described in the 
<a  href="http://www.techjava.de/topics/2008/02/using-soap-on-nokia-6131-nfc/">previous post</a>. After some search in HTTP Specification executed by 
<a  href="http://www.ti5.tu-harburg.de/staff/Turau/Default.htm" onclick="javascript:pageTracker._trackPageview('/external/www.ti5.tu-harburg.de/staff/Turau/Default.htm');" >Prof. Turau</a>: &#8220;&#8230; Multiple message-header fields with the same field-name <strong>MAY</strong> be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)]&#8230;&#8221;</p>
<p>For example Accept Header:<br />
Accept         = &#8220;Accept&#8221; &#8220;:&#8221; #( media-range [ accept-params ] ) </p>
<p>But not Content-Type Header:<br />
Content-Type   = &#8220;Content-Type&#8221; &#8220;:&#8221; media-type</p>
<h2>The server-side implementation</h2>
<p>Besides Nokia Bug, putting 
<a  href="http://www.techjava.de/topics/2008/02/using-soap-on-nokia-6131-nfc/">multiple Content-Type headers</a> in one request, there is an additional error server-side. I followed the JBoss call hierarchy which is:</p>
<pre class="brush: java;">
org.jboss.ws.server.StandardEndpointServlet#doPost(HttpServletRequest req, HttpServletResponse res);
org.jboss.ws.server.ServiceEndpointManager#processSOAPRequest();
new org.jboss.ws.server.ServletHeaderSource(HttpServletRequest req, HttpServletResponse res);
org.jboss.ws.server.ServiceEndpoint#handleRequest(HeaderSource headerSource, ServletEndpointContext context, InputStream inputStream);
org.jboss.ws.server.ServletHeaderSource#getMimeHeaders();
</pre>
<p>During the whole processing, the headers are retrieved from the <strong>HttpServletRequest</strong> by the <strong>ServletHeaderSource</strong> which is the only implementation of <strong>HeaderSource</strong>:</p>
<pre class="brush: java;">
public MimeHeaders getMimeHeaders()
{
    Enumeration e = req.getHeaderNames();
    if(e == null)
        return null;
    MimeHeaders headers = new MimeHeaders();
    String name = null;
    for(; e.hasMoreElements(); headers.addHeader(name, req.getHeader(name)))
        name = (String)e.nextElement();

    return headers;
}
</pre>
<p>Afterwards, if you call getHeader on the MimeHeaders object the string array is constructed from the existing data and returned:</p>
<pre class="brush: java;">
public String[] getHeader(String name)
{
    ArrayList tmp = new ArrayList();
    for(int n = 0; n &lt; headers.size(); n++)
    {
        MimeHeader mh = (MimeHeader)headers.get(n);
        if(mh.getName().equalsIgnoreCase(name))
            tmp.add(mh.getValue());
    }

    String values[] = null;
    if(tmp.size() &gt; 0)
    {
        values = new String[tmp.size()];
        tmp.toArray(values);
    }
    return values;
}
</pre>
<p>This means, that the implementation of the HttpServletRequest returns concatinated list of values for the duplicate headers.</p>
<h2>Specifications again</h2>
<p>Now, I looked in Java Servlet Specifications about the getHeader method:</p>
<h3>Servlet 2.1</h3>
<p>Returns the value of the requested header. The match between the given name and the request header is case-insensitive. If the header requested does not exist, this method returns null.</p>
<h3>Servlet 2.2</h3>
<p>The getHeader method allows access to the value of a header given the name of the header. Multiple headers, such as the Cache-Control header, can be present in an HTTP request. If there are multiple headers with the same name in a request, the getHeader method returns the first header contained in the request.</p>
<h3>Servlet 2.3 and 2.4</h3>
<p>The getHeader method returns a header given the name of the header. There can be multiple headers with the same name, e.g. Cache-Control headers, in an HTTP request. If there are multiple headers with the same name, the getHeader method returns the first head in the request. </p>
<h2>Results</h2>
<p>So it seems to be a Tomcat Bug, as long as Tomcat provides the implementation for the HttpServletRequest&#8230; This bug is integrated in JBoss, because they use Tomcat implementation. Never the less, JBoss use the getHeader method relies on the correct implementation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techjava.de/topics/2008/02/multi-http-header/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using SOAP on Nokia 6131 NFC</title>
		<link>http://www.techjava.de/topics/2008/02/using-soap-on-nokia-6131-nfc/</link>
		<comments>http://www.techjava.de/topics/2008/02/using-soap-on-nokia-6131-nfc/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 14:50:38 +0000</pubDate>
		<dc:creator>Simon Zambrovski</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[Content-Type]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[NFC]]></category>
		<category><![CDATA[nokia 6131]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://www.techjava.de/topics/2008/02/using-soap-on-nokia-6131-nfc/</guid>
		<description><![CDATA[Introduction
During some work executed for the proposal to the 
NFC Congress 2008, we introduced a scenario for using the NFC-enabled Nokia 6131 in the industrial environment. The selected use case records some NFC data and uses the Internet to transmit it to the cental server. During the prototype construction, we decided to use Google Maps [...]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>During some work executed for the proposal to the 
<a  href="http://www.nfc-research.at/" onclick="javascript:pageTracker._trackPageview('/external/www.nfc-research.at/');" >NFC Congress 2008</a>, we introduced a scenario for using the NFC-enabled Nokia 6131 in the industrial environment. The selected use case records some NFC data and uses the Internet to transmit it to the cental server. During the prototype construction, we decided to use Google Maps as a framework for location-based display of gathered information. The server has been constructed based on J2EE EJBs and exposes its 
<a  href="http://www.techjava.de/topics/2008/02/ws4j2ee14/">functionality using SOAP-based document-literal Web Serives</a>, as described in one of the privious posts. </p>
<h3>Nokia 6131 NFC</h3>
<p>The 
<a  href="http://europe.nokia.com/A4307095" onclick="javascript:pageTracker._trackPageview('/external/europe.nokia.com/A4307095');" >Nokia 6131 NFC</a> is first NFC-enabled mobile phone. NFC stands for 
<a  href="http://en.wikipedia.org/wiki/Near_Field_Communication" onclick="javascript:pageTracker._trackPageview('/external/en.wikipedia.org/wiki/Near_Field_Communication');" >Near-Field-Communication</a> &#8211; a new evolving wireless technology to interact with RFID tags. It is strongly supported and pushed by several big players. This results in several conferences around this subject all around the world.<br />
The NFC in Java is specified  in 
<a  href="http://jcp.org/en/jsr/detail?id=257" onclick="javascript:pageTracker._trackPageview('/external/jcp.org/en/jsr/detail');" >JSR 257</a>. In addition to that, 6131 seems to support 
<a  href="http://www.forum.nokia.com/info/sw.nokia.com/id/8a5911e5-2631-4b3e-9599-0f8959c2fb43/6131_NFC.html" onclick="javascript:pageTracker._trackPageview('/external/www.forum.nokia.com/info/sw.nokia.com/id/8a5911e5-2631-4b3e-9599-0f8959c2fb43/6131_NFC.html');" >several other JSRs</a>, also including 
<a  href="http://jcp.org/en/jsr/detail?id=172" onclick="javascript:pageTracker._trackPageview('/external/jcp.org/en/jsr/detail');" >JSR 172</a> for Web Services. After having a closer look on the offered API, it cames out, that only the XML-parser part of JSR 172 is supported.</p>
<h3>Sending SOAP Requests without JSR 172</h3>
<p>In order to set the requests to a Web Service from a mobile phone, that does not supprt Web Service JSR 172, a manual creation of request is needed. This results in something like:</p>
<pre class="brush: java;">
public abstract class SoapHandler extends DefaultHandler {

    public static final String SOAP_BEGIN = &quot;&lt;soapenv:Envelope xmlns:soapenv=\&quot;http://schemas.xmlsoap.org/soap/envelope/\&quot; xmlns:q0=\&quot;http://www.techjava.de/2008/nfc/visualizer/types\&quot; xmlns:xsd=\&quot;http://www.w3.org/2001/XMLSchema\&quot; xmlns:xsi=\&quot;http://www.w3.org/2001/XMLSchema-instance\&quot;&gt;&lt;soapenv:Body&gt;&quot;;
    public static final String SOAP_END = &quot;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;&quot;;

    private StringBuffer reqBuf = new StringBuffer(); // Buffer that holds the request message

    ...
    public SoapHandler(String message) {
        reqBuf.append(message);
    }

    public int doHttpRequest(String url, String soapAction) throws IOException {

        reqBuf.insert(0, SOAP_BEGIN);
        reqBuf.append(SOAP_END);

        HttpConnection httpConn = (HttpConnection) Connector.open(url);
        httpConn.setRequestMethod(HttpConnection.POST);
        httpConn.setRequestProperty(&quot;SOAPAction&quot;, soapAction);
        httpConn.setRequestProperty(&quot;Content-Length&quot;, Integer.toString(reqBuf.length()));

        OutputStream os = httpConn.openOutputStream();

        os.write(reqBuf.toString().getBytes());
        os.close(); // Request is sent when output-stream is closed
        return httpConn.getResponseCode();
    }

...
}
</pre>
<p>If you execute the code above, the 6131 device send a HTTP request using Content-Type plain/text, that is automatically inserted and changes the case of <strong>&#8220;SOAPAction&#8221;</strong> to lower. As long as JBoss 4.0.5 GA used in this experiment supports only Content-Types <strong>application/soap+xml</strong> and <strong>text/xml</strong> (as it should according to the specification), it throws a SOAP Exception:</p>
<pre class="brush: java;">
javax.xml.soap.SOAPException: Unsupported content type: text/plain
        at org.jboss.ws.soap.MessageFactoryImpl.createMessageInternal(MessageFactoryImpl.java:138)
        at org.jboss.ws.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:87)
        at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:190)
        at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
        at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        ...
</pre>
<p>The MIME Content-Type can easily be set on any HTTP connection:</p>
<pre class="brush: java;">
        httpConn.setRequestProperty(&quot;Content-Type&quot;, &quot;application/soap+xml&quot;);
</pre>
<p>This works well in the NFC Nokia simulator, part of the Nokia SDK, but breaks down executed from the device. It seems to be a bug in the implementation, or an intended feature of Nokia limiting the usage of the phone for business applications, but the <strong>HTTP-Request contains a duplicate Content-Type entry valued by the &#8220;application/soap+xml&#8221;</strong>. Playing around with the implementation, we found that it put any Content-Type header twice into the request. Decompiling and analyzing of simulator code does not helped at all. Since we don&#8217;t know how to get and patch sources of J2ME port to Nokia 6131, I decided to apply a workaround.</p>
<h3>Server tolerance</h3>
<p>JBoss reacts to this fact of a duplicate Content-Type header by throwing a SOAPFaultException. </p>
<pre class="brush: java;">
javax.xml.rpc.soap.SOAPFaultException: Could not parse content type:javax.mail.internet.ParseException: Expected ';', got &quot;,&quot;
        at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.exceptionToFaultMessage(SOAPFaultExceptionHelper.java:194)
        at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:223)
        at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
        at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        ...
</pre>
<p>We followed the stacktrace, and identified the class that causes the Execption. It is org.jboss.ws.soap.MessageFactoryImpl located in JBOSS_DEPLOY /jbossws14.sar/jbossws14-core.jar. After some source code alanysis, we found several problems in the implementation:</p>
<pre class="brush: java;">
private static ContentType getContentType(MimeHeaders headers) throws SOAPException
{
	ContentType contentType = null;
	try
	{
		String type[] = headers.getHeader(&quot;Content-Type&quot;);
		if (type != null)
		{
			contentType = new ContentType(type[0]);
		} else
		{
			contentType = new ContentType(&quot;text/xml&quot;);
		}
		return contentType;
	} catch (ParseException e)
	{
		String message = (new JBossStringBuilder()).append(&quot;Could not parse content type:&quot;).append(e).toString();
		throw new SOAPException(message);
	}
}
</pre>
<p>First of all, we would expect that the array length is proven, before the first element is accessed. Secondly, if multiple same headers are present in the request, their values are combined using a comma resulting in:</p>
<p>application/soap+xml; charset=utf-8, application/soap+xml; charset=utf-8</p>
<p>This combination could make sence if you put multiple Content-Lang headers in your request, but not for Content-Type. So we fixed the implementation by following code, taking only the first Content-Type value from the list, if present:</p>
<pre class="brush: java;">
...
String type[] = headers.getHeader(&quot;Content-Type&quot;);
if (type != null &amp;&amp; type.length != 0)
{
	int index = type[0].indexOf(',');
	String correctedType = (index != -1) ? type[0].substring(0, index) : type[0];

	contentType = new ContentType(correctedType);
} else
{
	contentType = new ContentType(&quot;text/xml&quot;);
}
return contentType;
...
</pre>
<h3>Summary</h3>
<p>Even if Nokia 6131 NFC offers some functionality for the developer, it does not provide the best platform for use case try-outs. Especially, the lack of supported standard (like full JSR 172) and a low-end OS (Symbian 40-Series), and some bugs / features in implementation of connectivity will lead to problems in prototype implementations of use cases&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techjava.de/topics/2008/02/using-soap-on-nokia-6131-nfc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The PluginLoader &#8211; Applying Java Class loading Concepts</title>
		<link>http://www.techjava.de/topics/2008/02/plugin-class-loader/</link>
		<comments>http://www.techjava.de/topics/2008/02/plugin-class-loader/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 08:29:16 +0000</pubDate>
		<dc:creator>joker</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[class loader]]></category>
		<category><![CDATA[class loading]]></category>
		<category><![CDATA[component]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[JAR]]></category>
		<category><![CDATA[JVM]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.techjava.de/topics/2008/02/plugin-class-loader/</guid>
		<description><![CDATA[Introduction
Many frameworks support plugins for increasing flexibility. They need to be loaded during runtime making it possible to change the supported features used in application without recompiling the framework and application themselves. Loading a plug-in means loading java classes, which is done by a class loader. We want to load the plug-ins from jar files, [...]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>Many frameworks support plugins for increasing flexibility. They need to be loaded during runtime making it possible to change the supported features used in application without recompiling the framework and application themselves. Loading a plug-in means loading java classes, which is done by a class loader. We want to load the plug-ins from jar files, without providing a name for every JAR. Unfortunately, the java standard API does not contain 
<a  href="http://www.techjava.de/topics/tag/class-loading/">a class loader</a> for loading classes from a list of jar files in a directory. We need to provide it ourselves. In addition, the standard class loading mechanism is designed with following idea in mind: in runtime the application accesses the known classname, that is searched for in class path and loaded if found. In our case, we want to force the framework load it extensions, without setting up the class path before applications starts, which is a little different use case.</p>
<h3>Simple JAR class loader</h3>
<p>The first step is loading classes from jar files. For this purpose we create a class named <strong>JarFileClassLoader</strong> which should be able to load a class from a jar file. It inherits from <strong>ClassLoader</strong>, the Java default implementation for a class loader. Loading a class from a jar file means scanning each jar file entries, decide if it is a class then load it. Because we want to be flexible about the criterion we use to select our classes, we introduce an interface <strong>ICriterion</strong>, which decides for a given class if the criterion is fulfilled or not. Using this, the JarFileClassLoader can now scan a single jar file and load every class fulfilling the injected criterion. Loading a class means scanning the caches of the parent class loaders, calling the <strong>loadClass(String)</strong> method of the parents if not found and scanning the jar file afterwards if the class was still not found. This beahviour is described in a previous 
<a  href="http://www.techjava.de/topics/tag/class-loading/">post</a>, introducing the basics of Java Class Loading. </p>
<p>JarFileClassLoader is capable of loading a class if it does not reference other classes. These references have to be resolved during class loading time. Let consider the example of classes A and B where A references B. If A is loaded by a class loader CL, CL is asked for loading B also. This is done by calling the <strong>loadClass(String)</strong> method of CL. If B is contained in the jar file CL loads classes from, CL will find it and return it to the JVM. If B is not contained in CL’s jar file, CL’s parents are asked to load it. Thus the class will be loaded if it is contained in the classpath where one of the java class loaders will find it. If the class is contained in another jar file in the list, but not in the class path it will not be found and the loading will end with a <strong>ClassNotFoundException</strong>.<br />
<img src="http://www.techjava.de/wp-content/uploads/PluginClassLoader/pluginclassloader.png" alt="Plugin Class Loader" style="float:right; margin:5px" /></p>
<h3>Plugin class loader</h3>
<p>To tackle this problem we introduce another class, the <strong>PluginLoader</strong>. It contains a collection of <strong>JarFileClassLoaders</strong> and inherits from ClassLoader, thus is a ClassLoader itself. The <strong>PluginLoader</strong> acts as a parent for all <strong>JarFileClassLoaders</strong> and is therefore asked every time a class has to be loaded. It will then iterate over all <strong>JarFileClassLoaders</strong> calling the <strong>loadClass(String)</strong> method on all of them to find the class it looks for. This way, classes contained in sibling class loaders are found also without violating the rule that a class loader can only see classes of itself or its parents. </p>
<h3>Putting everything together</h3>
<p>Now the structure of our plug-in loader component becomes clear. What we additionally need to do, is get rid of all the stack overflows we produce with the above classes. The problem here is that any <strong>JarFileClassLoader</strong> asks its parent, the <strong>PluginLoader</strong>, to load a class. This will ask all child <strong>JarFileClassLoaders</strong> to load the class including the CL which asked the <strong>PluginLoader</strong> before. The result is an infinite call stack loop &#8211; a stack overflow. Therefore we relax the concept of the java class loading. We introduce a method <strong>loadClassSimple(String)</strong> on the <strong>JarFileClassLoaders</strong> which looks just in its very own jar file. If it does not find the wanted class it just throws an Exception without asking a parent or cache-lookups. This method is called by the <strong>PluginLoader</strong> only, therefore the rest of the class loading is not affected.<br />
<img src="http://www.techjava.de/wp-content/uploads/PluginClassLoader/pluginclassloader_instance.png" alt="Plugin Class Loader at runtime" style="float:right; margin:5px" /><br />
Last but not least we consider some performance issues. If a class is searched in other jar files, those have to be scanned every time again resulting in poor performance. Therefore we introduce a cache in the <strong>JarFileClassLoader</strong> containing every class that was loaded before. Every request is served now by trying to find the class in the cache first. </p>
<h3>Limitations</h3>
<p>Due to the fact, that <strong>PluginLoader</strong> asks its child <strong>JarClassLoaders</strong> to load a class in particuliar order, and the first class found will be taken, the order in which <strong>JarClassLoaders</strong> are asked matters. This issue can cause problems if e.G. different versions of the same library are deployed on location scanned by the <strong>PluginLoader</strong> and should be handled with care.</p>
<h3>References</h3>
<ul>
<li>
<div>[2007,book] 
<a  href="#2007_KRUEGER" class="toggle">bibtex</a>  
<a  href='http://www.javabuch.de/} publisher =	{Addison-Wesley} isbn =	{3-8273-2373-8' title='Go to document' onclick="javascript:pageTracker._trackPageview('/external/www.javabuch.de/} publisher =_{Addison-Wesley} isbn =_{3-8273-2373-8');" ><img src='http://www.techjava.de/wp-content/plugins/bib2html/external.png' width='10' height='10' alt='Go to document' /></a></div>
<div>G. Krueger and T. Stark, <em>Handbuch der Java-Programmierung</em>, , 2007.</div>
<div class="bibtex" id="2007_KRUEGER">
         <code>@book{2007_KRUEGER, <br />
 &nbsp;&nbsp;author =	{Guido Krueger and Thomas Stark}, <br />
 &nbsp; title =	{Handbuch der Java-Programmierung}, <br />
 &nbsp; month =	Nov, year =	{2007}, <br />
 &nbsp; url = {http://www.javabuch.de/} publisher =	{Addison-Wesley} isbn =	{3-8273-2373-8}<br />
}</code>
    </div>
</li>
<li>
<div>[,techreport] 
<a  href="#" class="toggle">bibtex</a>  
<a  href='{http://www.developer.com/java/other/article.php/2248831' title='Go to document' onclick="javascript:pageTracker._trackPageview('/external/{http//www.developer.com/java/other/article.php/2248831');" ><img src='http://www.techjava.de/wp-content/plugins/bib2html/external.png' width='10' height='10' alt='Go to document' /></a></div>
<div>&quot;Java Class Loading: The Basics,&quot;.</div>
<div class="bibtex" id="">
         <code>@techreport{CL_BASICS author =	{Brandon E. Taylor}, <br />
 &nbsp; title =	{Java Class Loading: The Basics}, <br />
 &nbsp; url = {http://www.developer.com/java/other/article.php/2248831}</code>
    </div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.techjava.de/topics/2008/02/plugin-class-loader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exposing functionality using Web Services and J2EE 1.4</title>
		<link>http://www.techjava.de/topics/2008/02/ws4j2ee14/</link>
		<comments>http://www.techjava.de/topics/2008/02/ws4j2ee14/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 16:30:23 +0000</pubDate>
		<dc:creator>Simon Zambrovski</dc:creator>
				<category><![CDATA[enterprise systems]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[ejb]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[server-side]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://www.techjava.de/topics/2008/02/ws4j2ee14/</guid>
		<description><![CDATA[Abstract
In this article we describe how to implement a simple Web Service using old fashioned Java EE 1.4. The dummy functionality is implemented in Session Beans and exposed via document-literal Web Service following the recommendations of W3C and WS-I.
Introduction
Before we get in to technical details about the implementation a short overview of planned is helpful. [...]]]></description>
			<content:encoded><![CDATA[<h3>Abstract</h3>
<p>In this article we describe how to implement a simple Web Service using old fashioned Java EE 1.4. The dummy functionality is implemented in Session Beans and exposed via document-literal Web Service following the recommendations of W3C and WS-I.</p>
<h3>Introduction</h3>
<p>Before we get in to technical details about the implementation a short overview of planned is helpful. The main idea of this article is to show how a web service can be implemented using Java Enterprise Edition. Especially, this article tries to achieve two goals: show how existing EJB functionality can be exposed using Web Service technology and how Web Service technology can be linked to something stable, most of us have experience with. Many people follow the new trend of saying that EJB is ineffective and heavyweight &#8211; we don&#8217;t want to argue about this thesis. In this article we show a progmatic EJB development approach using &#8220;code-by-convention&#8221; combined with 
<a  href="http://www.generative-programming.org/" onclick="javascript:pageTracker._trackPageview('/external/www.generative-programming.org/');" >Generative-Programming</a> techniques. We develop the EJB functionality and Web Service definition independent from each other and link them later together &#8211; we are sure that this is the only approach to keep both parts simple, clean and reusable. During the WSDL design we follow a certain style of type and element selection, that results from some experiences of using generators and integration with non-Java environments. Our use case is a little synthetic in order to show the variety of types and seems to introduce structural complexity, which can be avoided. We implement the examples using open source products only.</p>
<p>The article starts with a short introduction which could look a little lyrical for some technicians of you. Then the requirements to the selected software are listed, followed by the practical use case. Then we jumpstart the EJB development cycle, design the Web Service and finally put both implementations together. In the outline, we discuss the testing possibilities&#8230;</p>
<h3>Requirements</h3>
<p>In order to develop, generate, package and finally deploy and run the component, exposing its functionality we need special software. Following selections has been made:</p>
<ul>
<li>Sun&#8217;s JDK (&gt; 1.4.2)</li>
<li>Apache Ant (&gt; 1.6.5)</li>
<li>XDoclet (1.2.3)</li>
<li>Sun&#8217;s Java Web Service Developer Pack (1.6)</li>
<li>JBoss AS (4.0.5 GA)</li>
<li>Eclipse IDE (&gt; 3.3), recommended WTP installation</li>
</ul>
<p>First of all we need to setup our environment. In order to make development under MS Windows convenient, we used to setup the entire environment variables in a single shell script:</p>
<pre class="brush: xml;">
@echo off
echo ----------------------------------------
echo Project Environment
echo ----------------------------------------
set DEVEL=c:\environment
set ANT_HOME=%DEVEL%\libraries\ant\1.6.5
set JAVA_HOME=%DEVEL%\compiler\j2sdk1.5.0_01
set JAVAC_EXEC=%DEVEL%\compiler\j2sdk1.5.0_01\bin\javac.exe
set JWSDP_HOME=%DEVEL%\compiler\jwsdp-1.6
set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%PATH%;%DEVEL%\bin;%JWSDP_HOME%\jaxrpc\bin
echo Environment variables:
echo ANT home : %ANT_HOME%
echo JAVA home : %JAVA_HOME%
echo PATH set to : echo %PATH%
echo ----------------------------------------
echo CLASSPATH set to : echo %CLASSPATH%
echo ----------------------------------------
cmd
</pre>
<p>For usage under Linux/MacOS the script should be adjusted correspondingly. </p>
<p>Eclipse is used as IDE for the whole development. In order to avoid any dependency to certain Eclipse functionalities we use Apache Ant as a build tool. In order to use the build tools these should be configured. In Preferences of Eclipse we set up Apache Ant and XDoclet. In <strong>Window -&gt; Preferences -&gt; Ant -&gt; Runtime </strong>set up the <strong>Ant Home </strong>pointing to the Ant installation directory. In <strong>Window -&gt; Preferences -&gt; XDoclet </strong>set up <strong>XDoclet Home</strong> to XDoclet installation directory and set the version to 1.2.3.</p>
<h3>Project Setup</h3>
<p>Even if we don&#8217;t want to rely on the build and shortcommings of Eclipse in the area of EJB development, we want to use maximum of support if possible.</p>
<p>Create a new <strong>EJB Project </strong>and select the following Project Facets: <strong>EJB Module 2.1</strong>, <strong>XDoclet 1.2.3</strong> and <strong>Java 1.4</strong>. We use the following project structure: all hand-written Java files go to /java/src directory, all Doclet-generated goes to /java/generated, the compiled files go to /java/class and the resulting archives (jars and ears) go to /java/build. The additional /metadata directory contains source and descriptor files needed for the project. To set all this up go to <strong>Project Properties -&gt; Java Build Path</strong>. As long as we control XDoclet from an Ant script, we deactivate the XDoclet Builder in <strong>Project Preferencies -&gt; XDoclet</strong> and in <strong>Project Preferences -&gt; Builders</strong>. Before we begin with the implementation we have to set up the Ant script, that will build and package our project. The script unifies different tools we use to a single toolchain and contains several targets. These are EJB-Doclet generation target, WS-Compile target, Web-Doclet target, target for compilation of the Java classes and, finally, creation of a JAR and EAR files. In order to hold the build file project independent we use properties files that contain project specific settings. In order to access XDoclet and WSCompile from Ant the corresponding task definitions must be included and the libraries must be put to directories in classpath. For this purpose we used to create a library project in the same workspace, containing the libraries (called <strong>general</strong>).</p>
<pre class="brush: xml;">
...
&lt;path id=&quot;class.path.local&quot;&gt;
  &lt;fileset dir=&quot;../general/lib&quot;&gt;
    &lt;include name=&quot;**/*.jar&quot;&gt;&lt;/include&gt;
    &lt;include name=&quot;**/*.zip&quot;&gt;&lt;/include&gt;
  &lt;/fileset&gt;
&lt;/path&gt;
&lt;path id=&quot;class.path.jwsdp&quot;&gt;
  &lt;path refid=&quot;class.path.local&quot;&gt;&lt;/path&gt;
&lt;/path&gt;
&lt;path id=&quot;class.path.doclet&quot;&gt;
  &lt;path refid=&quot;class.path.ant&quot;&gt;&lt;/path&gt;
&lt;/path&gt;
&lt;taskdef name=&quot;wscompile&quot; classname=&quot;com.sun.xml.rpc.tools.ant.Wscompile&quot; classpathref=&quot;class.path.jwsdp&quot;&gt;&lt;/taskdef&gt;
&lt;taskdef name=&quot;xdoclet&quot; classname=&quot;xdoclet.DocletTask&quot; classpathref=&quot;class.path.doclet&quot;&gt;&lt;/taskdef&gt;
&lt;taskdef name=&quot;ejbdoclet&quot; classname=&quot;xdoclet.modules.ejb.EjbDocletTask&quot; classpathref=&quot;class.path.doclet&quot;&gt;&lt;/taskdef&gt;
&lt;taskdef name=&quot;wseedoclet&quot; classname=&quot;xdoclet.modules.wsee.WseeDocletTask&quot; classpathref=&quot;class.path.doclet&quot;&gt;&lt;/taskdef&gt;
...
</pre>
<p>In order to demonstrate the implementation we introduce a use case. This is sonstructed for the demonstration purposes and shows the usage of different types.</p>
<h3>Use Case</h3>
<p>The constructed system is capable of providing the measurements of some sensors. The sensors are identified by numers and can be queried by the user by providing the timespan of measurements. As a result, the systems delivers the set of measurements for the given timespan with one measurement per minute but at most sixty measurements. Every measurement contain the id of sensor from which it has been recorded, the timestamp, the value as a byte array, the measurement unit and finally the flag if the measurement exceeds the expectation and has alarming values. </p>
<p>We start with typical EJB implementation and then adopt the resulting types to those, that should be used in a Web Service.</p>
<h3>First Session Bean powered by XDoclet</h3>
<p>Following the EJB 2.1 specification the stateless session bean class must implement the <strong>javax.ejb.SessionBean</strong> interface. We follow the 
<a  href="http://en.wikipedia.org/wiki/Adapter_pattern" onclick="javascript:pageTracker._trackPageview('/external/en.wikipedia.org/wiki/Adapter_pattern');" >Class Adapter design pattern</a> and create an abstract session bean that serves as a super class of all session beans.</p>
<pre class="brush: java;">
public abstract class AbstractSessionBean implements SessionBean
{
	/** Logging facility */
	protected static Logger LOG = Logger.getLogger(AbstractSessionBean.class);
	/** Session context */
	protected SessionContext	sessionContext;

	/**
	 * @see javax.ejb.SessionBean#ejbActivate()
	 */
	public void ejbActivate() throws EJBException, RemoteException
	{
	}

	/**
	 * @see javax.ejb.SessionBean#ejbPassivate()
	 */
	public void ejbPassivate() throws EJBException, RemoteException
	{
	}

	/**
	 * @see javax.ejb.SessionBean#ejbRemove()
	 */
	public void ejbRemove() throws EJBException, RemoteException
	{
	}

	/**
	 * @see javax.ejb.SessionBean#setSessionContext(javax.ejb.SessionContext)
	 */
	public void setSessionContext(SessionContext sessionContext) throws EJBException, RemoteException
	{
		this.sessionContext = sessionContext;
	}
}
</pre>
<p>Using such an adapter we can avoid code repetition in functional session beans. It could be also a good idea to put the logging facility into this abstract class. Any functional bean extends AbstractSessionBean and overwrites the ejbCreate() method which is used to setup the working copy of a Bean. Mostly, references to other beans are initialized in this method. Due to the usage of XDoclet, we follow the Factory pattern implemented in the EJB-Util class, which simplifies access to other EJBs.</p>
<p>In our example we flatten the exception handling to the minimum and introduce one exception class for every functional bean, which is thrown by any error during processing. Therefore, any functional methods throw this exception. Usually, exceptions should be topic-related instead of being bean-related.</p>
<p>Information needed for XDoclet generation is stored in the corresponding XDoclet tags inside of the JavaDoc comments. For the full list of XDoclet tag please refer to the 
<a  href="http://xdoclet.sf.net/" target="_blank" onclick="javascript:pageTracker._trackPageview('/external/xdoclet.sf.net/');" >XDoclet site</a>. We only explain the tags, we use. The <strong>ejb.bean</strong> tag indicates that a class is an EJB, providing a <strong>name</strong>, <strong>display-name</strong>, <strong>description</strong> as well as JNDI-Names of LocalHome interface and of the bean itself. The visibility is controlled over the <strong>view-type</strong> tag, the transactionality over <strong>transaction-type</strong> tag. Every business method we want to be included to business interfaces (Remote or Local) should be tagged with <strong>ejb.interface-method</strong> with corresponding <strong>view-type</strong>. Using this simple rule set we can easily implement business logic layer based on the stateless session beans:</p>
<pre class="brush: java;">
/**
 * ...
 * @ejb.bean name=&quot;SensorManager&quot;
 *  description=&quot;A Bean responsible for sensor operations&quot;
 *  display-name=&quot;SensorManagerBean&quot;
 *  jndi-name=&quot;techjava/SensorManagerrBean&quot;
 *  local-jndi-name=&quot;techjava/SensorManagerLocalHome&quot;
 *  type=&quot;Stateless&quot;
 *  transaction-type=&quot;Container&quot;
 *  view-type=&quot;both&quot;
 * ...
 */
public class SensorManagerBean extends AbstractSessionBean
{

	/**
	 * Max number of returned values
	 */
	private static final long MAX_DURATION = 60;

	/**
	 * Retrieves data from sensors
	 * @param sensorId id of sensor to query
	 * @param timespanStart start of the time period
	 * @param timespanEnd end of the time period
	 * @return a collection of Measurement POJOs or an empty collection
	 * @throws SensorManagerException if something goes wrong
	 * @ejb.interface-method view-type=&quot;both&quot;
	 */
	public Collection getSensorData(Long sensorId, Date timespanStart, Date timespanEnd)
          throws SensorManagerException
	{
		Collection ret = new Vector();
		LOG.debug(&quot;Entering getSensorData()&quot;);
		if (sensorId == null || timespanStart == null || timespanEnd == null)
		{
			throw new SensorManagerException(&quot;Missing a mandatory parameter, that was null (not set)&quot;);
		} else if (!timespanStart.before(timespanEnd)) {
			throw new SensorManagerException(&quot;The timespan is defined by the start that should be before end&quot;);
		}

		for (long i = 0; i &lt; getNumberOfElements(timespanStart, timespanEnd); i++)
		{
			Date date = new Date(timespanStart.getTime() + i*1000*60);
			if (date.after(timespanEnd))
			{
				break;
			}

			Measurement measurement = createMeasurement(sensorId, date, i);
			ret.add(measurement);
		}

		LOG.debug(&quot;Leaving getSensorData(). Returning &quot; + ret.size() +&quot; values&quot;);
		return ret;
	}

        /**
	 * retrieves the number of measurements in timespan
	 * @param timespanStart
	 * @param timespanEnd
	 * @return
	 */
	public long getNumberOfElements(Date timespanStart, Date timespanEnd) {	... }

	/**
	 * Creates a measurement instance
	 * @param sensorId
	 * @param timestamp
	 * @param number
	 * @return
	 */
	public Measurement createMeasurement(Long sensorId, Date timestamp, long number) { ... }
}
</pre>
<p>In order to generate the artifacts required by the specification from the written bean, we need to call a corresponding EJBDoclet task. The task itself is configuring only main generation options, during the subtasks are invoked for artifact generation. We used to separate classes of different purpose by packages and massively use the <strong>packageSubstitution</strong> subtask for this purpose. Remote, local, local home and remote home interfaces, util factory class and both EJB and a vendor-specific descriptors are generated using corresponding tasks.</p>
<pre class="brush: xml;">
&lt;ejbdoclet destdir=&quot;${ejb.distdir}&quot; verbose=&quot;true&quot; ejbspec=&quot;2.1&quot;&gt;
	&lt;fileset dir=&quot;${ejb.srcdir}&quot;&gt;
		&lt;include name=&quot;${ejb.include}&quot; /&gt;
	&lt;/fileset&gt;
	&lt;fileset dir=&quot;${ejb.distdir}&quot;&gt;
		&lt;include name=&quot;${ejb.include}&quot; /&gt;
	&lt;/fileset&gt;
	&lt;packageSubstitution packages=&quot;ejb.entity&quot; substituteWith=&quot;interfaces.entity&quot; /&gt;
	&lt;packageSubstitution packages=&quot;ejb.session&quot; substituteWith=&quot;interfaces.session&quot; /&gt;
	&lt;packageSubstitution packages=&quot;ejb.facade&quot; substituteWith=&quot;interfaces.facade&quot; /&gt;

	&lt;remoteinterface pattern=&quot;{0}Remote&quot; /&gt;
	&lt;localinterface pattern=&quot;{0}Local&quot; /&gt;
	&lt;homeinterface pattern=&quot;{0}Home&quot; /&gt;
	&lt;localhomeinterface pattern=&quot;{0}LocalHome&quot; /&gt;

	&lt;utilobject kind=&quot;physical&quot;&gt;
		&lt;packageSubstitution packages=&quot;ejb.session&quot; substituteWith=&quot;util.session&quot; /&gt;
		&lt;packageSubstitution packages=&quot;ejb.facade&quot; substituteWith=&quot;util.facade&quot; /&gt;
	&lt;/utilobject&gt;

	&lt;deploymentdescriptor
               destdir=&quot;${ejb.descriptor.distdir}&quot;
               displayname=&quot;${ejb.modulename}&quot;
               description=&quot;EJB Module ${ejb.modulename}&quot;
        /&gt;

	&lt;jboss
		destdir=&quot;${ejb.descriptor.distdir}&quot;
		version=&quot;4.0&quot;
		mergedir=&quot;metadata/merge&quot;
	/&gt;
&lt;/ejbdoclet&gt;
</pre>
<p>After generation of the classes and descriptors, which will be executed in a separate directory, it is a good idea to copy the descriptors back to the primary source folder, in order to allow for Eclipse to work with generated descriptors. Now we can compile the hand written code, together with generated code, put the results in a Java archive and assembly it to an enterprise archive, which can be deployed on an application server.</p>
<h3>Hands on the Web Service Definition</h3>
<p>The design of the interface definition is in general one of the most important steps in the component development life cycle. Depending on the quality of the interface design the component becomes reuseable or remains in usage only in the application it was initially built for. Therefore, we rely on a human engineering instead of generation.</p>
<p>For the definition of our Web Service, we use a standard language for this purpose, the WSDL. A WSDL file has a following structure:</p>
<ul>
<li>Types</li>
<li>Messages</li>
<li>Operations</li>
<li>Port Type</li>
<li>Bindings</li>
<li>Services</li>
</ul>
<p>As long as we intend to use document-literal, SOAP-style Web Services, the Binding and the Service parts are straight forward. The only thing we should pay attention is the Fault definition. We start from the Port Type definition, which is the equivalence of the business interface. A Port Type has a name and a collection of operation definitions, containing references to incoming, outgoing and fault messages. The Message part defines how XML Schema Types are used in the operations. This means that the most important parts of the WSDL file are the introduced Types, which are defined using XML Schema and the Port Types, which defines Operations, which use the Types.</p>
<p>The main purpose of a WSDL file is to define an interface. In order to distinguish it from the others, the interface is named. As long as WSDL defines a web-accessible resource, we use full qualified names, similar to XML target namespace.</p>
<pre class="brush: xml;">
&lt;wsdl:definitions name=&quot;MeasurementProvider&quot;
	targetNamespace=&quot;http://www.techjava.de/2008/ws4j2ee14/measurement/&quot;
	xmlns:tns=&quot;http://www.techjava.de/2008/ws4j2ee14/measurement/&quot;
	xmlns:types=&quot;http://www.techjava.de/2008/ws4j2ee14/measurement/types/&quot;
	xmlns:soap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot;
	xmlns:wsdl=&quot;http://schemas.xmlsoap.org/wsdl/&quot;
	xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
	&lt;wsdl:types&gt;
		&lt;xsd:schema
			targetNamespace=&quot;http://www.techjava.de/2008/ws4j2ee14/measurement/types/&quot;
			xmlns:types=&quot;http://www.techjava.de/2008/ws4j2ee14/measurement/types/&quot;
			elementFormDefault=&quot;qualified&quot;
		&gt;
			&lt;!--
				ID element for sensor
			--&gt;
			&lt;xsd:simpleType name=&quot;sensor-id&quot;&gt;
				&lt;xsd:restriction base=&quot;xsd:long&quot; /&gt;
			&lt;/xsd:simpleType&gt;
			&lt;!--
				Measurement complex type
			 --&gt;
			&lt;xsd:complexType name=&quot;Measurement&quot;&gt;
				&lt;xsd:sequence&gt;
					&lt;xsd:element name=&quot;sensorid&quot; type=&quot;types:sensor-id&quot; /&gt;
					&lt;xsd:element name=&quot;timestamp&quot; type=&quot;xsd:dateTime&quot; /&gt;
					&lt;xsd:element name=&quot;critical&quot; type=&quot;xsd:boolean&quot; /&gt;
					&lt;xsd:element name=&quot;value&quot; type=&quot;xsd:base64Binary&quot; /&gt;
					&lt;xsd:element name=&quot;unit&quot; type=&quot;xsd:string&quot; /&gt;
				&lt;/xsd:sequence&gt;
			&lt;/xsd:complexType&gt;

			&lt;!--
				Timespan complex type
			 --&gt;
			&lt;xsd:complexType name=&quot;Timespan&quot;&gt;
				&lt;xsd:sequence&gt;
					&lt;xsd:element name=&quot;start&quot; type=&quot;xsd:dateTime&quot;
						minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; /&gt;
					&lt;xsd:element name=&quot;end&quot; type=&quot;xsd:dateTime&quot;
						minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; /&gt;
				&lt;/xsd:sequence&gt;
			&lt;/xsd:complexType&gt;

			&lt;!--
				Operation Types
			--&gt;
			&lt;xsd:element name=&quot;GetSensorData&quot;&gt;
				&lt;xsd:complexType&gt;
					&lt;xsd:sequence&gt;
						&lt;xsd:element name=&quot;sensorid&quot; type=&quot;types:sensor-id&quot;
							minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; /&gt;
						&lt;xsd:element name=&quot;timespan&quot; type=&quot;types:Timespan&quot;
							minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; /&gt;
					&lt;/xsd:sequence&gt;
				&lt;/xsd:complexType&gt;
			&lt;/xsd:element&gt;

			&lt;xsd:element name=&quot;GetSensorDataResponse&quot;&gt;
				&lt;xsd:complexType&gt;
					&lt;xsd:sequence&gt;
						&lt;xsd:element name=&quot;measurements&quot; type=&quot;types:Measurement&quot;
							maxOccurs=&quot;unbounded&quot; /&gt;
					&lt;/xsd:sequence&gt;
				&lt;/xsd:complexType&gt;
			&lt;/xsd:element&gt;
			&lt;xsd:element name=&quot;GetSensorDataFault&quot;&gt;
				&lt;xsd:complexType&gt;
					&lt;xsd:sequence minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;&gt;
						&lt;xsd:element name=&quot;reason&quot; type=&quot;xsd:string&quot;
							minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; /&gt;
					&lt;/xsd:sequence&gt;
				&lt;/xsd:complexType&gt;
			&lt;/xsd:element&gt;

		&lt;/xsd:schema&gt;
	&lt;/wsdl:types&gt;
...
	&lt;!--
		Port Type (interface declaration)
	--&gt;
	&lt;wsdl:portType name=&quot;MeasurementProviderPortType&quot;&gt;
		&lt;wsdl:operation name=&quot;GetSensorData&quot;&gt;
			&lt;wsdl:input message=&quot;tns:GetSensorDataRequest&quot; /&gt;
			&lt;wsdl:output message=&quot;tns:GetSensorDataResponse&quot; /&gt;
			&lt;wsdl:fault message=&quot;tns:GetSensorDataFaultMessage&quot;
				name=&quot;GetSensorDataFault&quot; /&gt;
		&lt;/wsdl:operation&gt;
	&lt;/wsdl:portType&gt;
...
&lt;/wsdl:definitions&gt;
</pre>
<h3>Web Service Implementation</h3>
<p>The created WSDL file is used for further Java code generation. For this purpose we use WSCompile, a tool supplied with Sun&#8217;s Java Web Service Developer Pack. The tool need a configuration file (<strong>wsdl-config.xml</strong>) storing the location of the WSDL file and namespace-to-package mappings. As a result of its execution, the tool generate Java classes for every custom type defined in XML Schema and the descriptor for JAX-RPC mapping required by the container for serialization and deserialization. In addition, it creates a Service interface, that is a interface to the factory of generated Port Type interfaces. The tool also generate implementation stubs for every Port Type, which can be ignored. </p>
<pre class="brush: xml;">
&lt;configuration xmlns=&quot;http://java.sun.com/xml/ns/jax-rpc/ri/config&quot;&gt;
	&lt;wsdl
	    location=&quot;./metadata/MeasurementProviderService.wsdl&quot;
	    packageName=&quot;de.techjava.sensor.interfaces.stubs&quot;
	&gt;
	     &lt;namespaceMappingRegistry&gt;
            &lt;namespaceMapping
            	namespace=&quot;http://www.techjava.de/2008/ws4j2ee14/measurement/types/&quot;
            	packageName=&quot;de.techjava.sensor.valueobjects&quot;
            /&gt;
	     &lt;/namespaceMappingRegistry&gt;
	&lt;/wsdl&gt;
&lt;/configuration&gt;
</pre>
<p>The WS Compile is usually called from the command line, but we use the Ant Task for this. Important are the features passed to the generator: <strong>documentliteral</strong>, <strong>wsi</strong>, <strong>searchschema</strong>, <strong>serializeinterfaces</strong> and <strong>explicitcontext</strong>. The path to the generated JAX-RPC mapping file is provided by the <strong>mapping</strong> attribute. Pay attention on the tool call, because depending on parameters given it generates Java classes from WSDL or vice versa.</p>
<pre class="brush: xml;">
&lt;wscompile fork=&quot;true&quot; import=&quot;true&quot; base=&quot;java/class&quot;
	sourceBase=&quot;java/generated&quot; verbose=&quot;true&quot;
	features=&quot;documentliteral, wsi, searchschema, serializeinterfaces, explicitcontext&quot;
	mapping=&quot;java/generated/META-INF/jaxrpc-mapping.xml&quot;
	config=&quot;metadata/wsdl-config.xml&quot;
	xSerializable=&quot;true&quot;
&gt;
	&lt;classpath&gt;
		&lt;path refid=&quot;class.path.local&quot; /&gt;
		&lt;path refid=&quot;class.path.ant&quot; /&gt;
		&lt;pathelement path=&quot;${java.class.path}&quot; /&gt;
	&lt;/classpath&gt;
&lt;/wscompile&gt;
</pre>
<p>After we generated the Java representation of the Web Service interface, we can integrate it with our EJB implementation. In order to do this, we used to create a 
<a  href="http://en.wikipedia.org/wiki/Fa%C3%A7ade_pattern" onclick="javascript:pageTracker._trackPageview('/external/en.wikipedia.org/wiki/Fa%C3%A7ade_pattern');" >Facade</a> session bean, that implements the Port Type interface. The methods of the facade bean provide some parameter validation, form the values needed for the calculations, invoke the corresponding EJBs, receive results or exceptions and, finally, form the response object or fault. The XDoclet annotation of the facade bean follows the one discussed above, but differs from it slightly. The <strong>view-type</strong> attribute of the <strong>ejb.bean</strong> tag should hold the value <strong>remote-service-endpoint</strong>. In addition, the <strong>ejb.interface</strong> tag provide information about the Java Port Type interface and about the special Endpoint interface, that is required for the container. In order to generate the Endpoint interface, we add the <strong>service-endpoint</strong> subtask to the ejbdoclet task.</p>
<pre class="brush: java;">
...
/**
 * @ejb.interface
 *  service-endpoint-class=&quot;de.techjava.sensor.interfaces.session.MeasurementProviderFacadeConnectorEndpoint&quot;
 *  service-endpoint-extends=&quot;de.techjava.sensor.interfaces.stubs.MeasurementProviderPortType&quot;
 * @wsee.port-component
 * 	name=&quot;MeasurementProviderService&quot;
 * 	local-part=&quot;MeasurementProviderService&quot;
 * 	display-name=&quot;MeasurementProviderService&quot;
 * 	description=&quot;MeasurementProvider Bean exposed as a web service&quot;
 */
public class MeasurementProviderFacadeBean
	extends AbstractSessionBean
	implements MeasurementProviderPortType
{
	private SensorManagerLocal sensorManagerLocal = null;

	/**
	 * Creates a link to SensorManager
	 * @see de.techjava.sensor.ejb.session.AbstractSessionBean#ejbCreate()
	 */
	public void ejbCreate()
		throws EJBException
	{
		try
		{
			sensorManagerLocal = SensorManagerUtil.getLocalHome().create();
		} catch (CreateException e)
		{
			throw new EJBException(&quot;Error creating new Session Manager instance&quot;);
		} catch (NamingException e)
		{
			throw new EJBException(&quot;Session Manager Local Home could not be found in JNDI&quot;);
		}
	}

	/**
         * Method called on web service message receipt
	 * @ejb.interface-method view-type=&quot;remote-service-endpoint&quot;
	 */
	public GetSensorDataResponse getSensorData(GetSensorData parameters)
		throws GetSensorDataFault
	{
		LOG.debug(&quot;Received a web service request getSensorData()&quot;);
		if (parameters == null
                  || parameters.getTimespan() == null
                  || parameters.getTimespan().getEnd() == null
                  || parameters.getTimespan().getStart() == null)
		{
			LOG.debug(&quot;Leaving getSensorData() with error&quot;);
			throw new GetSensorDataFault(&quot;Wrong request, check mandatory parameters&quot;);
		}
		if (sensorManagerLocal == null)
		{
			LOG.debug(&quot;Leaving getSensorData() with error&quot;);
			throw new GetSensorDataFault(&quot;Sensor Manager is not available&quot;);
		}

		Long sensorId = new Long(parameters.getSensorid());
		Date timespanStart = parameters.getTimespan().getStart().getTime();
		Date timespanEnd = parameters.getTimespan().getEnd().getTime();

		try
		{
			Collection simpleMeasurements = sensorManagerLocal.getSensorData(sensorId, timespanStart, timespanEnd);
			Vector measurements = new Vector(simpleMeasurements.size());
			Iterator simpleMeasurementI = simpleMeasurements.iterator();

			// convert types from EJB to generated XSD representations
			while(simpleMeasurementI.hasNext())
			{
				SimpleMeasurement sm = (SimpleMeasurement) simpleMeasurementI.next();
				Measurement measurement = convertMeasurement(sm);
				measurements.add(measurement);
			}

			GetSensorDataResponse response = new GetSensorDataResponse();
			response.setMeasurements((Measurement[]) measurements.toArray(new Measurement[measurements.size()]));
			LOG.debug(&quot;Leaving getSensorData().&quot;);
			return response;

		} catch (SensorManagerException e)
		{
			LOG.debug(&quot;Leaving getSensorData() with error&quot;);
			throw new GetSensorDataFault(e.getMessage());
		}
	}

}
</pre>
<p>In addition, the special J2EE Web Service descriptor webservices.xml needs to be created. For this purpose we use WSEE-Doclet, that introduces its own tags. The <strong>wsee-port-component</strong> provides display-name, web-service-description-name and port-component-name in the attributes <strong>name</strong>, <strong>local-part</strong> and <strong>display-name</strong>. The WSEE-Doclet is started from an Ant task and has one subtask <strong>wsee-deploymentdescriptor</strong> which is used to generate the required webservice.xml file.</p>
<pre class="brush: xml;">
...
&lt;wseedoclet destDir=&quot;${ejb.descriptor.distdir}&quot; jaxrpcMappingFile=&quot;jaxrpc-mapping.xml&quot; wseeSpec=&quot;1.1&quot; force=&quot;true&quot; verbose=&quot;true&quot;&gt;
	&lt;fileset dir=&quot;${ejb.srcdir}&quot;&gt;
		&lt;include name=&quot;**/*.java&quot; /&gt;
	&lt;/fileset&gt;
	&lt;wsee-deploymentdescriptor /&gt;
&lt;/wseedoclet&gt;
...
</pre>
<h3>Outline</h3>
<p>For testing of Web Services is an important step of development. Especially, the resulting SOAP messages should be reviewed at least once, to ensure that the  description is completed correctly, and no malformed XML structures are used. In order to play around with fresh-deployed Web Service open a browser of you choice and enter the URL of  the web service overview of your application server. If JBoss (>4.0.5) runs locally, this will be http://localhost:8080/jbossws/. You should see a list of deployed web services. By clicking on a wsdl-button you can retrieve the version of WSDL after deployment (containing the target URL of the endpoint interface). Using this WSDL you can run tests of your web service. We use Eclipse&#8217;s Web Service Explorer to run developer tests (WTP installation needed). You can access it under <strong>Run -> Launch the Web Service Explorer</strong>. Switsch to <strong>WSDL-Page</strong> by clicking on the second button from right, in the upper right corner, enter the URL and hit <strong>Go</strong>. Fill the form generated for each method, send the request and analsye the response. If you want to create more advanced tests (and test suites) please refer to 
<a  href="http://www.soapui.com/" onclick="javascript:pageTracker._trackPageview('/external/www.soapui.com/');" >SOAP-UI Project</a>.<br />
<img src="http://www.techjava.de/wp-content/uploads/WS4J2EE14/wsexplorer.png" alt="Eclipse's Web Service Explorer" /></p>
<h3>Resources</h3>
<p>You can download the zip file (
<a  href="http://www.techjava.de/wp-content/uploads/WS4J2EE14/detechjavaws4j2ee14sensor_20080219_src.zip" onclick="javascript:pageTracker._trackPageview('/downloads/wp-content/uploads/WS4J2EE14/detechjavaws4j2ee14sensor_20080219_src.zip');" >de.techjava.ws4j2ee14.sensor_20080219_src.zip</a>) containing the example above. </p>
<h3>References</h3>
<ul>
<li>
<div>[2004,techreport] 
<a  href="#SUN_2004_JWSTUTORIAL" class="toggle">bibtex</a>  
<a  href='http://java.sun.com/webservices/docs/1.4/tutorial/doc/index.html' title='Go to document' onclick="javascript:pageTracker._trackPageview('/external/java.sun.com/webservices/docs/1.4/tutorial/doc/index.html');" ><img src='http://www.techjava.de/wp-content/plugins/bib2html/external.png' width='10' height='10' alt='Go to document' /></a></div>
<div>S. Microsystems, &quot;The Java Web Services Tutorial,&quot; 2004.</div>
<div class="bibtex" id="SUN_2004_JWSTUTORIAL">
         <code>@techreport{SUN_2004_JWSTUTORIAL, <br />
 &nbsp;&nbsp;author =	{Sun Microsystems}, <br />
 &nbsp; title =	{The Java Web Services Tutorial}, <br />
 &nbsp; month =	Jun, year =	{2004}, <br />
 &nbsp; url = {http://java.sun.com/webservices/docs/1.4/tutorial/doc/index.html}<br />
}</code>
    </div>
</li>
<li>
<div>[2003,book] 
<a  href="#IHNS_2003" class="toggle">bibtex</a>  
<a  href='http://www.ejbkomplett.de/' title='Go to document' onclick="javascript:pageTracker._trackPageview('/external/www.ejbkomplett.de/');" ><img src='http://www.techjava.de/wp-content/plugins/bib2html/external.png' width='10' height='10' alt='Go to document' /></a></div>
<div>O. Ihns, S. M. Heldt, R. Wirdemann, and H. Zuzmann, <em>Enterprise JavaBeans komplett, publisher	Oldenburg</em>, , 2003.</div>
<div class="bibtex" id="IHNS_2003">
         <code>@Book{IHNS_2003, <br />
 &nbsp;&nbsp;author =	{Oliver Ihns and Stefan M. Heldt and Ralf Wirdemann and Henning Zuzmann}, <br />
 &nbsp; title =	{Enterprise JavaBeans komplett}, <br />
 &nbsp; publisher	{Oldenburg}, <br />
 &nbsp; year =	{2003}, <br />
 &nbsp; month =	{Oct}, <br />
 &nbsp; url = {http://www.ejbkomplett.de/}<br />
}</code>
    </div>
</li>
<li>
<div>[2000,book] 
<a  href="#CZARNECKI_2003" class="toggle">bibtex</a> </div>
<div>K. Czarnecki and U. W. Eisenecker, <em>Generative Programming, publisher	Addison-Wesley</em>, , 2000.</div>
<div class="bibtex" id="CZARNECKI_2003">
         <code>@Book{CZARNECKI_2003, <br />
 &nbsp;&nbsp;author =	{Krzysztof Czarnecki and Ulrich W. Eisenecker}, <br />
 &nbsp; title =	{Generative Programming}, <br />
 &nbsp; publisher	{Addison-Wesley}, <br />
 &nbsp; year =	{2000}, <br />
 &nbsp; month =	{May}, <br />
 &nbsp; }</code>
    </div>
</li>
<li>
<div>[1994,book] 
<a  href="#GAMMA_1994" class="toggle">bibtex</a> </div>
<div>E. Gamma, R. Helm, R. Johnson, and J. Vlissides, <em>Design Patterns: Elements of Reusable Object-Oriented Software</em>, , 1994.</div>
<div class="bibtex" id="GAMMA_1994">
         <code>@Book{GAMMA_1994, <br />
 &nbsp;&nbsp;author = {Erich Gamma and Richard Helm and Ralph Johnson and John Vlissides}, <br />
 &nbsp; title = {Design Patterns: Elements of Reusable Object-Oriented Software}, <br />
 &nbsp; year = {1994}<br />
}</code>
    </div>
</li>
<li>
<div>[,techreport] 
<a  href="#XDOCLET" class="toggle">bibtex</a>  
<a  href='http://xdoclet.sourceforge.net/xdoclet/index.html' title='Go to document' onclick="javascript:pageTracker._trackPageview('/external/xdoclet.sourceforge.net/xdoclet/index.html');" ><img src='http://www.techjava.de/wp-content/plugins/bib2html/external.png' width='10' height='10' alt='Go to document' /></a></div>
<div>&quot;XDoclet Project,&quot;.</div>
<div class="bibtex" id="XDOCLET">
         <code>@techreport{XDOCLET, <br />
 &nbsp;&nbsp;author =	{}, <br />
 &nbsp; title =	{XDoclet Project}, <br />
 &nbsp; url = {http://xdoclet.sourceforge.net/xdoclet/index.html}<br />
}</code>
    </div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.techjava.de/topics/2008/02/ws4j2ee14/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
