<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Adam Wojtuniak&#039;s Blog</title>
	<atom:link href="http://adamwojtuniak.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://adamwojtuniak.wordpress.com</link>
	<description>OSGI, Java blog</description>
	<lastBuildDate>Thu, 30 Sep 2010 09:54:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='adamwojtuniak.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Adam Wojtuniak&#039;s Blog</title>
		<link>http://adamwojtuniak.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://adamwojtuniak.wordpress.com/osd.xml" title="Adam Wojtuniak&#039;s Blog" />
	<atom:link rel='hub' href='http://adamwojtuniak.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Scala breakOut and toMap</title>
		<link>http://adamwojtuniak.wordpress.com/2010/09/28/scala-breakout-and-tomap/</link>
		<comments>http://adamwojtuniak.wordpress.com/2010/09/28/scala-breakout-and-tomap/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 21:29:36 +0000</pubDate>
		<dc:creator>adamwojtuniak</dc:creator>
				<category><![CDATA[Scala]]></category>
		<category><![CDATA[Scala breakOut]]></category>
		<category><![CDATA[Scala convert collection to map]]></category>
		<category><![CDATA[Scala toMap]]></category>

		<guid isPermaLink="false">http://adamwojtuniak.wordpress.com/?p=139</guid>
		<description><![CDATA[In Scala 2.8.0 there are two new functions: toMap ( def toMap[T, U](implicit ev: &#60;:&#60;[A, (T, U)]): Map[T, U] ) added to a template trait for traversable collections: TraversableLike and scala.collection.breakOut. They both could be use to convert collections to the map. Example: scala&#62; val list = List(&#34;a&#34;-&#62;1,&#34;b&#34;-&#62;2,&#34;c&#34;-&#62;3) list: List[(java.lang.String, Int)] = List((a,1), (b,2), (c,3)) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adamwojtuniak.wordpress.com&amp;blog=9581854&amp;post=139&amp;subd=adamwojtuniak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In Scala 2.8.0 there are two new functions: toMap ( def   toMap[T, U](implicit ev: &lt;:&lt;[A, (T, U)]): Map[T, U]   ) added to a template trait for traversable collections: TraversableLike  and scala.collection.breakOut. They both could be use to convert collections to the map.</p>
<p><strong>Example:</strong></p>
<pre class="brush: java;">
scala&gt; val list = List(&quot;a&quot;-&gt;1,&quot;b&quot;-&gt;2,&quot;c&quot;-&gt;3)
list: List[(java.lang.String, Int)] = List((a,1), (b,2), (c,3))

scala&gt; val map = list.toMap
map: scala.collection.immutable.Map[java.lang.String,Int] = Map((a,1), (b,2), (c,3))

scala&gt; val m: Map[Int,String] = (for{ (k,v) &lt;- list; t=(v,k) } yield t)(breakOut)
m: Map[Int,String] = Map((1,a), (2,b), (3,c))
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adamwojtuniak.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adamwojtuniak.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adamwojtuniak.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adamwojtuniak.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/adamwojtuniak.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/adamwojtuniak.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/adamwojtuniak.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/adamwojtuniak.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adamwojtuniak.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adamwojtuniak.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adamwojtuniak.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adamwojtuniak.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adamwojtuniak.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adamwojtuniak.wordpress.com/139/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adamwojtuniak.wordpress.com&amp;blog=9581854&amp;post=139&amp;subd=adamwojtuniak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://adamwojtuniak.wordpress.com/2010/09/28/scala-breakout-and-tomap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd3409316b6a952f223ae9f61a7ea54a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">adamwojtuniak</media:title>
		</media:content>
	</item>
		<item>
		<title>Scala named and default arguments</title>
		<link>http://adamwojtuniak.wordpress.com/2010/09/27/scala-named-and-default-arguments/</link>
		<comments>http://adamwojtuniak.wordpress.com/2010/09/27/scala-named-and-default-arguments/#comments</comments>
		<pubDate>Mon, 27 Sep 2010 11:12:12 +0000</pubDate>
		<dc:creator>adamwojtuniak</dc:creator>
				<category><![CDATA[Scala]]></category>
		<category><![CDATA[case class copy]]></category>
		<category><![CDATA[case class copy method]]></category>
		<category><![CDATA[scala default arguments]]></category>
		<category><![CDATA[scala named and default arguments]]></category>
		<category><![CDATA[scala named arguments]]></category>

		<guid isPermaLink="false">http://adamwojtuniak.wordpress.com/?p=133</guid>
		<description><![CDATA[Since Scala 2.8.0 we can use name arguments. Instead of parameter postions we can call methods based on parameter names. Example scala&#62; def divide(dividend: Double, divisor: Double) = dividend/divisor divide: (dividend: Double,divisor: Double)Double scala&#62; divide(divisor=2,dividend=10) res7: Double = 5.0 In Scala 2.8.0 we can use default arguments as well. Example scala&#62; def divide(dividend: Double, divisor: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adamwojtuniak.wordpress.com&amp;blog=9581854&amp;post=133&amp;subd=adamwojtuniak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since Scala 2.8.0 we can use name arguments. Instead of parameter postions we can call<br />
methods based on parameter names.</p>
<p><strong>Example</strong></p>
<pre class="brush: java;">
scala&gt; def divide(dividend: Double, divisor: Double) = dividend/divisor
divide: (dividend: Double,divisor: Double)Double

scala&gt; divide(divisor=2,dividend=10)
res7: Double = 5.0
</pre>
<p>In Scala 2.8.0 we can use default arguments as well.</p>
<p><strong>Example</strong></p>
<pre class="brush: java;">
scala&gt; def divide(dividend: Double, divisor: Double = 2) = dividend/divisor
divide: (dividend: Double,divisor: Double)Double

scala&gt; divide(10)
res7: Double = 5.0
</pre>
<p>Named and default arguments are used  in the compiler-generated &#8220;copy&#8221; methods in case classes, which takes same parameter types as<br />
primary constructor and its arguments are treated as a default values.</p>
<p><strong>Example</strong></p>
<pre class="brush: java;">
scala&gt; case class C (s: String, i: Int)
defined class C
scala&gt; val c1 = C(&quot;some&quot;,1)
c1: C = C(some,1)
scala&gt; val c2 = c1.copy(i=2)
c2: C = C(some,2)
</pre>
<p>For futher information please visit <a href="http://www.scala-lang.org/node/2075">http://www.scala-lang.org/node/2075</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adamwojtuniak.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adamwojtuniak.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adamwojtuniak.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adamwojtuniak.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/adamwojtuniak.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/adamwojtuniak.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/adamwojtuniak.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/adamwojtuniak.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adamwojtuniak.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adamwojtuniak.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adamwojtuniak.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adamwojtuniak.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adamwojtuniak.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adamwojtuniak.wordpress.com/133/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adamwojtuniak.wordpress.com&amp;blog=9581854&amp;post=133&amp;subd=adamwojtuniak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://adamwojtuniak.wordpress.com/2010/09/27/scala-named-and-default-arguments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd3409316b6a952f223ae9f61a7ea54a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">adamwojtuniak</media:title>
		</media:content>
	</item>
		<item>
		<title>Scala for comprehensions</title>
		<link>http://adamwojtuniak.wordpress.com/2010/09/24/scala-for-comprehensions/</link>
		<comments>http://adamwojtuniak.wordpress.com/2010/09/24/scala-for-comprehensions/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 20:20:27 +0000</pubDate>
		<dc:creator>adamwojtuniak</dc:creator>
				<category><![CDATA[Scala]]></category>
		<category><![CDATA[for comprehension]]></category>
		<category><![CDATA[Scala for comprehension]]></category>

		<guid isPermaLink="false">http://adamwojtuniak.wordpress.com/?p=77</guid>
		<description><![CDATA[In this post I am going to write about one of the most powerful feature in Scala a for comprehension. Syntax from Scala 2.8.0 Spec: Expr1 ::= ‘for’ (‘(’ Enumerators ‘)’ &#124; ‘{’ Enumerators ‘}’) {nl} [‘yield’] Expr Enumerators ::= Generator {semi Enumerator} Enumerator ::= Generator &#124; Guard &#124; ‘val’ Pattern1 ‘=’ Expr Generator ::= [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adamwojtuniak.wordpress.com&amp;blog=9581854&amp;post=77&amp;subd=adamwojtuniak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this post I am going to write about one of the most powerful feature in Scala a for comprehension.<br />
Syntax from Scala 2.8.0 Spec:</p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<li>Expr1 ::= ‘<strong>for</strong>’ (‘(’ Enumerators ‘)’ | ‘{’ Enumerators ‘}’) {nl} [‘<strong>yield</strong>’] Expr</li>
<li>Enumerators ::= Generator {semi Enumerator}</li>
<li>Enumerator ::= Generator | Guard | ‘<strong>val</strong>’ Pattern1 ‘=’ Expr</li>
<li>Generator ::= Pattern1 ‘&lt;-&#8217; Expr [Guard]</li>
<li>Guard ::= ‘<strong>if</strong>’ PostfixExpr</li>
<p>For comprehension is evaluating all bindings for each bindings generated by enumerators. For comprehension with yield evaluates each bindings and collect result. What is the enumerator? It could be a generator, which produces values like an iterator: &#8216;a &lt;- list&#8217;. Then it could be a guard (filter) &#8216;a&gt;1&#8242; and finally could be a value definition &#8216;val&#8217; pattern &#8216;=’ expression: val x=a+1.<br />
For comprehension always starts with generator and could be followed by other generators, value definition and then guards.<br />
Generators and guards are translated to map,withFilter,flatmap and foreach.<br />
Here is a quote from Scala 2.8.0 Spec (page 89/90 &#8211; For Comprehensions and For Loops) about translation rules:</p>
<p>The translation scheme is as follows. In a first step, every generator p &lt;-e,                                                                                                                                                                                                                     where p is not irrefutable (§8.1) for the type of e is replaced by<br />
p &lt;- e.withFilter { <strong>case</strong> p =&gt;  true; <strong>case</strong> _ =&gt; false }</p>
<p>Then, the following rules are applied repeatedly until all comprehensions have been<br />
eliminated.</p>
<div id="_mcePaste">• A for comprehension <strong>for</strong> (p &lt;-e) <strong>yield</strong> e0 is translated to</div>
<div>e.map { <strong>case</strong> p =&gt; e0 }.</div>
<div id="_mcePaste">• A for loop <strong>for </strong>(p &lt;-e) e0 is translated to</div>
<div>e.foreach { <strong>case</strong> p =&gt; e0 }.</div>
<div id="_mcePaste">• A for comprehension <strong>for</strong> (p &lt;-e;p0 &lt;-e0 . . .) <strong>yield</strong> e00 ,</div>
<div id="_mcePaste">where . . . is a (possibly empty) sequence of generators, definitions, or guards,</div>
<div id="_mcePaste">is translated to</div>
<div>e.flatMap { <strong>case</strong> p =&gt; <strong>for</strong> (p0 &lt;-e0 . . .) <strong>yield</strong> e00 } .</div>
<div id="_mcePaste">• A for loop for (p &lt;-e;p0 &lt;-e0 . . .) e00 .</div>
<div id="_mcePaste">where . . . is a (possibly empty) sequence of generators, definitions, or guards,</div>
<div id="_mcePaste">is translated to</div>
<div>e.foreach { <strong>case</strong> p =&gt; <strong>for</strong> (p0 &lt;-e0 . . .) e00 } .</div>
<div id="_mcePaste">• A generator p &lt;-e followed by a guard if g is translated to a single generator</div>
<div id="_mcePaste">p &lt;-e.withFilter((x1, . . . , xn) =&gt; g ) where x1, . . . , xn are the free</div>
<div id="_mcePaste">variables of p.</div>
<div id="_mcePaste">• A generator p &lt;-e followed by a value definition p0 = e0 is translated to the</div>
<div id="_mcePaste">following generator of pairs of values, where x and x0 are fresh names:</div>
<div id="_mcePaste">(p, p0) &lt;-<strong>for</strong> (x@p &lt;-e) <strong>yield</strong> { <strong>val</strong> x0@p0 = e0; (x, x0) }</div>
<p><strong>Example:</strong></p>
<pre class="brush: java;">private def loadDescriptors(bundle: Bundle): Array[URL] = {
	val descriptorLocations = bundle.getHeaders().get( &quot;Service-Component&quot; ).asInstanceOf[String]
	val entries = for(descriptor &lt;-descriptorLocations.split(&quot;,&quot;); val entry = descriptor.split(&quot;/&quot;) ) yield (entry(0),entry(1))
	for((path, filen) &lt;- entries; url &lt;- bundle.findEntries(path,filen,false).toTraversable) yield url.asInstanceOf[URL]
}</pre>
<p>In the example I am reading the header &#8220;Service-Component&#8221; and I have to find service descriptor URL.<br />
In the first for comprehension first enum is an Array[String] generator then for each element in the array value definition enum is evaluated and finally yield collects values from each evaluation and every result I am collecting as a tuple of file path and file name.<br />
Second for comprehension is pretty same, two generators and collecting values as URL objects.</p>
<p><strong>Example with a guard</strong>:</p>
<pre class="brush: java;">private def readFromURL(url: URL): Iterator[String] = {
    for (line &lt;- Source.fromURL(url).getLines() if ((line.length &gt; 0) &amp;&amp; (line.charAt(0) != '#')))
    yield line
  }
 </pre>
<p>The for comprehension is translated to:</p>
<pre class="brush: java;">
Source.fromURL(url).getLines.
  		withFilter { line =&gt; ((line.length &gt; 0) &amp;&amp; (line.charAt(0) != '#'))}.map { case line =&gt; line }
</pre>
<p>For more information please have a look at Scala 2.8.0 Specification. It&#8217;s included in Scala distribution.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adamwojtuniak.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adamwojtuniak.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adamwojtuniak.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adamwojtuniak.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/adamwojtuniak.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/adamwojtuniak.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/adamwojtuniak.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/adamwojtuniak.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adamwojtuniak.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adamwojtuniak.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adamwojtuniak.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adamwojtuniak.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adamwojtuniak.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adamwojtuniak.wordpress.com/77/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adamwojtuniak.wordpress.com&amp;blog=9581854&amp;post=77&amp;subd=adamwojtuniak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://adamwojtuniak.wordpress.com/2010/09/24/scala-for-comprehensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd3409316b6a952f223ae9f61a7ea54a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">adamwojtuniak</media:title>
		</media:content>
	</item>
		<item>
		<title>Interoperability between Scala and Java collections</title>
		<link>http://adamwojtuniak.wordpress.com/2010/09/14/interoperability-between-scala-and-java-collections/</link>
		<comments>http://adamwojtuniak.wordpress.com/2010/09/14/interoperability-between-scala-and-java-collections/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 21:09:16 +0000</pubDate>
		<dc:creator>adamwojtuniak</dc:creator>
				<category><![CDATA[Scala]]></category>
		<category><![CDATA[Interoperability between Scala and Java collections]]></category>
		<category><![CDATA[Iterating over Java collection in Scala]]></category>
		<category><![CDATA[Scala and Java]]></category>
		<category><![CDATA[scala.collection.JavaConversions]]></category>

		<guid isPermaLink="false">http://adamwojtuniak.wordpress.com/?p=35</guid>
		<description><![CDATA[Since 2.8.0 Scala has been providing implicit conversion between Scala and Java collections. JavaConversions object must be imported. Here is an example: import scala.collection.JavaConversions._ implicit def toComponentPropertySet(props: Properties): scala.collection.mutable.Set[ComponentProperty] = for(entry &#60;- props.entrySet) yield ComponentProperty(entry.getKey.asInstanceOf[String], entry.getValue.asInstanceOf[String]) In my SMojuru declarative services project I have to load properties for some inputstream and convert them to some [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adamwojtuniak.wordpress.com&amp;blog=9581854&amp;post=35&amp;subd=adamwojtuniak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">Since 2.8.0 Scala has been providing implicit conversion between Scala and Java collections.</div>
<div id="_mcePaste">JavaConversions object must be imported.</div>
<div>Here is an example:</div>
<div id="_mcePaste">
<pre class="brush: java;">
import scala.collection.JavaConversions._
implicit def toComponentPropertySet(props: Properties):
    scala.collection.mutable.Set[ComponentProperty] =
    for(entry &lt;- props.entrySet) yield
       ComponentProperty(entry.getKey.asInstanceOf[String],
             entry.getValue.asInstanceOf[String])
</pre>
</div>
<div>In my SMojuru declarative services project I have to load properties for some inputstream and convert them to some property description. Without implicit  conversion of scala.collection.mutable.Set &lt;=&gt; java.util.Set I can&#8217;t do iteration with for and foreach. Obviously there is no foreach method on java.util.Set.</div>
<div>
<p><span style="font-family:sans-serif;line-height:13px;"> </span></p>
<p style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;border:0 initial initial;margin:.4em 0;padding:0;">The following conversions are supported:</p>
<ul style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;display:block;list-style-type:circle;list-style-position:initial;list-style-image:initial;border:0 initial initial;margin:0;padding:0 0 0 20px;">
<li style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;display:list-item;border:0 initial initial;margin:0;padding:0;"><code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">scala.collection.Iterable</code> &lt;=&gt; <code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">java.lang.Iterable</code></li>
<li style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;display:list-item;border:0 initial initial;margin:0;padding:0;"><code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">scala.collection.Iterable</code> &lt;=&gt; <code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">java.util.Collection</code></li>
<li style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;display:list-item;border:0 initial initial;margin:0;padding:0;"><code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">scala.collection.Iterator</code> &lt;=&gt; <code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">java.util.{Iterator, Enumeration}</code></li>
<li style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;display:list-item;border:0 initial initial;margin:0;padding:0;"><code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">scala.collection.mutable.Buffer</code> &lt;=&gt; <code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">java.util.List</code></li>
<li style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;display:list-item;border:0 initial initial;margin:0;padding:0;"><code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">scala.collection.mutable.Set</code> &lt;=&gt; <code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">java.util.Set</code></li>
<li style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;display:list-item;border:0 initial initial;margin:0;padding:0;"><code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">scala.collection.mutable.Map</code> &lt;=&gt; <code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">java.util.{Map, Dictionary}</code></li>
<li style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;display:list-item;border:0 initial initial;margin:0;padding:0;"><code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">scala.collection.mutable.ConcurrentMap</code> &lt;=&gt; <code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">java.util.concurrent.ConcurrentMap</code></li>
</ul>
<p style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;border:0 initial initial;margin:.4em 0;padding:0;">
<p style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;border:0 initial initial;margin:.4em 0;padding:0;">In addition, the following one way conversions are provided:</p>
<ul style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;display:block;list-style-type:circle;list-style-position:initial;list-style-image:initial;border:0 initial initial;margin:0;padding:0 0 0 20px;">
<li style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;display:list-item;border:0 initial initial;margin:0;padding:0;"><code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">scala.collection.Seq =&gt; <code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">java.util.List </code></code></li>
<p><code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;"></p>
<li style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;display:list-item;border:0 initial initial;margin:0;padding:0;"><code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">scala.collection.mutable.Seq =&gt; <code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">java.util.List</code></code></li>
<p><code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;"></p>
<li style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;display:list-item;border:0 initial initial;margin:0;padding:0;"><code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">scala.collection.Set</code> =&gt; <code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">java.util.Set</code></li>
<li style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:inherit;vertical-align:baseline;display:list-item;border:0 initial initial;margin:0;padding:0;"><code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">scala.collection.Map</code> =&gt; <code style="font-weight:inherit;font-style:inherit;font-size:13px;font-family:monospace;vertical-align:baseline;border:0 initial initial;margin:0;padding:0;">java.util.Map</code></li>
<p></code></code></ul>
</div>
<div id="_mcePaste">Below is a link to JavaConversion doc.</div>
<div id="_mcePaste"><a title="JavaConversions doc" href="http://www.scala-lang.org/archives/downloads/distrib/files/nightly/docs/library/scala/collection/JavaConversions$.html" target="_blank">http://www.scala-lang.org/archives/downloads/</a></div>
<div><a title="JavaConversions doc" href="http://www.scala-lang.org/archives/downloads/distrib/files/nightly/docs/library/scala/collection/JavaConversions$.html" target="_blank">distrib/files/nightly/docs/library/scala/collection/JavaConversions$.html</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adamwojtuniak.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adamwojtuniak.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adamwojtuniak.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adamwojtuniak.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/adamwojtuniak.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/adamwojtuniak.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/adamwojtuniak.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/adamwojtuniak.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adamwojtuniak.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adamwojtuniak.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adamwojtuniak.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adamwojtuniak.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adamwojtuniak.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adamwojtuniak.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adamwojtuniak.wordpress.com&amp;blog=9581854&amp;post=35&amp;subd=adamwojtuniak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://adamwojtuniak.wordpress.com/2010/09/14/interoperability-between-scala-and-java-collections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd3409316b6a952f223ae9f61a7ea54a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">adamwojtuniak</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Google Guice in OSGi environment</title>
		<link>http://adamwojtuniak.wordpress.com/2009/09/21/google-guice-in-osgi-environment/</link>
		<comments>http://adamwojtuniak.wordpress.com/2009/09/21/google-guice-in-osgi-environment/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 12:39:09 +0000</pubDate>
		<dc:creator>adamwojtuniak</dc:creator>
				<category><![CDATA[OSGi]]></category>
		<category><![CDATA[Google Guice]]></category>
		<category><![CDATA[Guice and OSGI]]></category>
		<category><![CDATA[Peaberry]]></category>

		<guid isPermaLink="false">http://adamwojtuniak.wordpress.com/?p=3</guid>
		<description><![CDATA[In this post I will try to describe ease of use lightweight dependency injection framework Google Guice in OSGi environment. There are two possibilities to use Guice in OSGi environment. We can use Google Guice without any extensions just take guice.jar and its dependency aopalliance.jar from project website http://code.google.com/p/google-guice/downloads/list. Second choice is to use Peaberry [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adamwojtuniak.wordpress.com&amp;blog=9581854&amp;post=3&amp;subd=adamwojtuniak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this post I will try to describe ease of use lightweight dependency injection framework Google Guice in OSGi environment.<br />
There are two possibilities to use Guice in OSGi environment. We can use Google Guice without any extensions just take guice.jar and its dependency aopalliance.jar from project website http://code.google.com/p/google-guice/downloads/list.<br />
Second choice is to use Peaberry project which is an extension library for Google-Guice that supports dependency injection of dynamic services.</p>
<p>First I will describe usage of Guice without any extensions.<br />
Google Juice dependency is mainly provided by using annotations, xml is not used for any configuration.<br />
The only dependencies for using Google Guice without any extensions in OSGi bundles:</p>
<pre class="brush: java;">

1    ACTIVE      com.google.inject_2.0.0
3    ACTIVE      com.springsource.org.aopalliance_1.0.0
</pre>
<p>In compare to spring it is big difference only 2 extra bundles to have automatically managed dependency injection in our bundle!<br />
In order to use Guice first we have to define a module which will describe our bindings.<br />
Our module must extend AbstractModule class and implement configure method.<br />
In my example I&#8217;m using binding of interfaces to concrete implementation classes and interceptor which will intercept all methods with Intercept annotation. Binding to instance could be used as well.</p>
<pre class="brush: java;">
package guice_test.module;

import com.google.inject.AbstractModule;
import com.google.inject.matcher.Matchers;
import com.labs.interceptor.Intercept;
import com.labs.interceptor.ParserInterceptor;
import com.labs.parser.IParser;
import com.labs.parser.Parser;
import com.labs.provider.IProvider;
import com.labs.provider.Provider;

public class TestModule extends AbstractModule {

@Override
protected void configure() {
bind(IParser.class).to(Parser.class);
bind(IProvider.class).to(Provider.class);
bindInterceptor(Matchers.any(), Matchers.annotatedWith(Intercept.class),
new ParserInterceptor());

}

}
</pre>
<p>In the example we have Parser which is used by Provider and should be injected using its constructor.To use automatic injection we have to annotate method with com.google.inject.Inject annotation. Parser method will be intercepted by ParserInterceptor. With one line in the module we can define and use advantages of AOP language.</p>
<pre class="brush: java;">

package com.labs.provider;

import com.google.inject.Inject;
import com.labs.parser.IParser;

public class Provider implements IProvider {

private IParser parser;

@Inject
public Provider(IParser parser){
this.parser = parser;
}

public String process(String name){
return this.parser.parse(name);
}

}

package com.labs.parser;

import com.labs.interceptor.Intercept;

public class Parser implements IParser {

@Intercept
public String parse(String input){

return &quot;output&quot; + input;

}
}

package com.labs.interceptor;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class ParserInterceptor implements MethodInterceptor{

public Object invoke(MethodInvocation invocation) throws Throwable {

System.out.println(&quot;Invocation intercepted : &quot; + invocation.getMethod().getName());

return invocation.proceed();
}

}
</pre>
<p>The last thing is our Activator which will be used to start our code managed by Guice. In the start method Injector is created and from injector we can get an instance of provider which will have injected Parser by Guice framework.</p>
<pre class="brush: java;">

import guice_test.module.TestModule;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

import com.google.inject.Guice;
import com.google.inject.Injector;
import com.labs.provider.Provider;

public class Activator implements BundleActivator {

public void start(BundleContext context) throws Exception {
Injector injector = Guice.createInjector(new TestModule());
Provider provider = injector.getInstance(Provider.class);
String res = provider.process(&quot;hello&quot;);
System.out.println(&quot;Result =&quot; + res);

}

public void stop(BundleContext context) throws Exception {

}

}
</pre>
<p>Mainfest of our guice_test bundle looks:</p>
<pre class="brush: java;">

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Guice_test
Bundle-SymbolicName: guice_test
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: guice_test.Activator
Import-Package: com.google.inject;version=&quot;1.2.0&quot;,
com.google.inject.binder;version=&quot;1.2.0&quot;,
com.google.inject.matcher;version=&quot;1.2.0&quot;,
org.aopalliance.intercept;version=&quot;1.0.0&quot;,
org.osgi.framework;version=&quot;1.3.0&quot;
Bundle-RequiredExecutionEnvironment: J2SE-1.5
</pre>
<p>In the first example we didn&#8217;t register or use any service. We can still do this using OSGI API like context.registerService(…). Output of starting the bundle should be as follow:</p>
<pre class="brush: java;">

osgi&amp;amp;amp;amp;gt; Invocation intercepted : parse
Result =outputhello
</pre>
<p>In the second example we will concentrate on usage of Peaberry project to expose IProvider as a OSGI service.<br />
Peaberry allows us to inject dynamic service to our code or to expose our component as a service.<br />
We will change the previous example to use the Peaberry extension.</p>
<p>First we need to add to the manifest three packages:</p>
<pre class="brush: java;">

org.ops4j.peaberry;version=&quot;1.0.0&quot;,
org.ops4j.peaberry.builders;version=&quot;1.0.0&quot;,
org.ops4j.peaberry.util;version=&quot;1.0.0&quot;
</pre>
<p>When we start our container and list bundles with command ss we should have five following bundles:</p>
<pre class="brush: java;">

id    State       Bundle
0    ACTIVE      org.eclipse.osgi_3.5.0.v20090520
1    ACTIVE      com.google.inject_2.0.0
3    ACTIVE      com.springsource.org.aopalliance_1.0.0
5    ACTIVE      guice_test_1.0.0.qualifier
6    ACTIVE      org.ops4j.peaberry_1.0.0
</pre>
<p>We want to expose IProvider implementation as a service. To do that we need to bind IProvider interface to service instance represent by Provider class.</p>
<p>We can use following API to export the service:</p>
<pre class="brush: java;">

bind(TypeLiterals.export(A.class)).
toProvider(Peaberry.service(new A()).export());
</pre>
<p>At the same time we also import single instance of IProvider service using API:</p>
<pre class="brush: java;">

bind(A.class).toProvider(Peaberry.service(A.class).single());
</pre>
<p>Here is a code snippet of TestModule..</p>
<pre class="brush: java;">

@Override
protected void configure() {
bind(IParser.class).to(Parser.class);
//exporting service
bind(TypeLiterals.export(IProvider.class)).
toProvider(Peaberry.service(new Provider()).export());

bindInterceptor(Matchers.any(),
Matchers.annotatedWith(Intercept.class), new ParserInterceptor());

//importing service
bind(IProvider.class).
toProvider(Peaberry.service(IProvider.class).single());

bind(IServiceUser.class).to(ServiceUser.class);

}
</pre>
<p>Provider instance will be registered as a service and new class ServiceUser will<br />
use Provider service.</p>
<pre class="brush: java;">

public class ServiceUser implements IServiceUser {

private IProvider provider;

@Inject
public ServiceUser(IProvider provider){
this.provider = provider;
}

public String processRequest(String name){
return provider.process(name);
}

}
</pre>
<p>Then we need to add org.ops4j.peaberry.Peaberry.osgiModule to createInjector method.<br />
We are also injecting IProvider service using a handle for export of a service org.ops4j.peaberry.Export. Using a handle we can unregister the service when the bundle is stopped. The Peaberry is providing handle for import as well which can be used to unget the service.</p>
<p>Here is how Activator looks now.</p>
<pre class="brush: java;">

package guice_test;

import guice_test.module.TestModule;

import org.ops4j.peaberry.Export;
import org.ops4j.peaberry.Peaberry;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.Injector;
import com.labs.provider.IProvider;
import com.labs.user.IServiceUser;

public class Activator implements BundleActivator {

//injecting a handle to IProvider service can be used to unregister
// service when bundle is stopped
@Inject
private Export&amp;amp;amp;amp;lt;IProvider&amp;amp;amp;amp;gt; providerProxy;

public void start(BundleContext context) throws Exception {
Injector injector = Guice.createInjector(Peaberry.osgiModule(context),
new TestModule());
injector.injectMembers(this);

IServiceUser user = injector.getInstance(IServiceUser.class);
String res = user.processRequest(&quot;hello&quot;);
System.out.println(&quot;Result =&quot; + res);

}

public void stop(BundleContext context) throws Exception {
this.providerProxy.unput();
}

}
</pre>
<p>When the bundle is started ServiceUser will use Provider service and execute process method. Output of the execution should be:</p>
<pre class="brush: java;">

osgi&amp;amp;amp;amp;gt; Invocation intercepted : parse
Result =outputhello
</pre>
<p>API for import multiple services:</p>
<pre class="brush: java;">

Import org.ops4j.peaberry.Peaberry.service;
Import org.ops4j.peaberry.util.TypeLiterals.iterable;

@Inject
Iterable&amp;amp;amp;amp;lt;A&amp;amp;amp;amp;gt; services;
bind(iterable(A.class)).toProvider(service(A.class).multiple());
</pre>
<p>API for service binding:</p>
<pre class="brush: java;">

service(A.class).filter(/* apply a filter */)...
service(A.class).in(/* query a specific registry */)...
service(A.class).out(/* watch for service changes - act like ServiceTracker*/)...
service(A.class).decoratedWith(/* apply decoration */)...
</pre>
<p>Exporting service with service properties:</p>
<pre class="brush: java;">

service(AImpl).attributes(names(&quot;serviceName=A&quot;)).export();
</pre>
<p>Instead of using dynamic proxy you can use direct binding</p>
<pre class="brush: java;">

service(A.class).single().direct();
</pre>
<p>Conclusion:<br />
The Peaberry project looks quite good I don&#8217;t see any big tricks (hacks) done to support OSGi capabilities on Guice. It&#8217;s very lightweight only couple bundles which you have to include in your runtime. No xml to configure dependency and very nice API to handle dynamic nature of OSGi services.<br />
Both examples were tested on Eclipse 3.5.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adamwojtuniak.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adamwojtuniak.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adamwojtuniak.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adamwojtuniak.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/adamwojtuniak.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/adamwojtuniak.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/adamwojtuniak.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/adamwojtuniak.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adamwojtuniak.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adamwojtuniak.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adamwojtuniak.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adamwojtuniak.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adamwojtuniak.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adamwojtuniak.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adamwojtuniak.wordpress.com&amp;blog=9581854&amp;post=3&amp;subd=adamwojtuniak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://adamwojtuniak.wordpress.com/2009/09/21/google-guice-in-osgi-environment/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd3409316b6a952f223ae9f61a7ea54a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">adamwojtuniak</media:title>
		</media:content>
	</item>
	</channel>
</rss>
