<?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>Yakafokon's Blog</title>
	<atom:link href="http://yakafokon.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://yakafokon.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Wed, 27 Apr 2011 22:03:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='yakafokon.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Yakafokon's Blog</title>
		<link>http://yakafokon.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://yakafokon.wordpress.com/osd.xml" title="Yakafokon&#039;s Blog" />
	<atom:link rel='hub' href='http://yakafokon.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Thought about ideas</title>
		<link>http://yakafokon.wordpress.com/2010/03/20/thought-about-ideas/</link>
		<comments>http://yakafokon.wordpress.com/2010/03/20/thought-about-ideas/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 14:53:09 +0000</pubDate>
		<dc:creator>yakafokon</dc:creator>
				<category><![CDATA[opinion]]></category>
		<category><![CDATA[ideas]]></category>
		<category><![CDATA[thought]]></category>

		<guid isPermaLink="false">http://yakafokon.wordpress.com/?p=259</guid>
		<description><![CDATA[Have you ever had an idea about creating a web site and of course being pretty much excited about it so you start presenting it to some friends ? But &#8230; Well &#8230; yes your friends aren&#8217;t as much excited as you are ! It looks like they are trying to find what is wrong [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=259&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Have you ever had an idea about creating a web site and of course being pretty much excited about it so you start presenting it to some friends ?</p>
<p>But &#8230;</p>
<p>Well &#8230; yes your friends aren&#8217;t as much excited as you are !</p>
<p>It looks like they are trying to find what is wrong with your idea  !</p>
<p>And that&#8217;s pretty much anoying rights ?  <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Here are some examples of what most of your friends start saying  :</p>
<p>&#8220;I think I&#8217;ve already seen that somewhere &#8220;</p>
<p>&#8220;Did you look if that doesn&#8217;t exist yet ?&#8221;</p>
<p>&#8220;Are you sure someone didn&#8217;t already make it yet ?&#8221;</p>
<p>&#8220;But what is the business model anyway, &#8230; I don&#8217;t understand &#8230; ?&#8221;</p>
<p>&#8220;Be aware because it can be anoying if one of your user start [replace here with something that should not be done by a user with your web site]&#8220;</p>
<p>And you know what ? yes they&#8217;re right ! the idea already exists but not exactly the same way your are seeing and planning it to be, yes it&#8217;s true that someone could use your web site a misappropiate way !</p>
<p>For the misappropriate use there is nothing to do either way : there will always exist people trying to pervert your idea.</p>
<p>Now for the point about having a real original idea I think that&#8217;s impossible. Even if someone has never already make it on the web, the idea was already there : having an idea is not that difficult by the way and I think that even ordinary ideas can be successfull.</p>
<p>About the business model : I don&#8217;t think that&#8217;s the most important when  starting building a web site ! What I mean here is that you should not  anticipate how you&#8217;re going to win money with your site, but you should  let your users take the control I bet that you have much to learn about  how they are actually using it over the first place :  this is why even an ordinary idea could have a chance to succeed, letting the user taking control of an idea is the best way to transform an ordinary idea to a great one !</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yakafokon.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yakafokon.wordpress.com/259/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yakafokon.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yakafokon.wordpress.com/259/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yakafokon.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yakafokon.wordpress.com/259/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yakafokon.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yakafokon.wordpress.com/259/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yakafokon.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yakafokon.wordpress.com/259/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yakafokon.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yakafokon.wordpress.com/259/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yakafokon.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yakafokon.wordpress.com/259/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=259&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yakafokon.wordpress.com/2010/03/20/thought-about-ideas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/012a9490e754ad268a8f5d805eb52c0c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yakafokon</media:title>
		</media:content>
	</item>
		<item>
		<title>Using DAO with ORM</title>
		<link>http://yakafokon.wordpress.com/2009/03/11/using-dao-with-orm/</link>
		<comments>http://yakafokon.wordpress.com/2009/03/11/using-dao-with-orm/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 11:16:44 +0000</pubDate>
		<dc:creator>yakafokon</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[DAO]]></category>
		<category><![CDATA[JPA]]></category>

		<guid isPermaLink="false">http://yakafokon.wordpress.com/?p=229</guid>
		<description><![CDATA[I&#8217;m using iBatis in the application I&#8217;m currently working on. And since we try to create a well designed code, we are using the DAO design pattern to call the iBatis&#8217;s api. Recently I started using JPA and so I&#8217;ve quiclky start creating DAO to put my JPA code in it. My service layer calls [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=229&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m using iBatis in the application I&#8217;m currently working on. And since we try to create a well designed code, we are using the DAO design pattern to call the iBatis&#8217;s api.</p>
<p>Recently I started using JPA and so I&#8217;ve quiclky start creating DAO to put my JPA code in it.</p>
<p>My service layer calls my DAOs and that&#8217;s great, but &#8230;</p>
<p>When you use JPA or any ORM tools there is many things that will be done out of the scope of your code.</p>
<p>Lets take the OneToMany association for example and say that you have set a transitive persistence.</p>
<pre>
<pre class="brush: java;">
@Entity
@Table(name=&quot;USER&quot;)
public class User implements Serializable {
private static final long serialVersionUID = 1L;

@OneToMany (cascade=CascadeType.PERSIST)
private List&lt;span&gt;&lt;/span&gt; storeCollection;

...
</pre>
</pre>
<p>To persist a new user you call the persist method in the UserDAO :</p>
<pre>
<pre class="brush: java;">
public class UserDAO {

  @PersistenceContext
  private EntityManager em;

  public void save(User user{
    em.persist(user);
  }
}

public class CoreServiceImpl implements CoreService {

  @Autowired
  private UserDAO userDAO;

  public void saveUser() {
    User user = new User();
    user.getStoreCollection().add(new Store());
    userDAO.save(user);
  }
}
</pre>
</pre>
<p>Since we have set cascade=CascadeType.PERSIST in our annotation, the new store object will be automatically inserted in database.</p>
<p>This is a great feature but when using it you must be aware that your are going to lose the control of a part of your application code : you should have created a StoreDAO with a save method to explicitly persist Store object.</p>
<p>The way I see DAO is that it&#8217;s allow you be loosely coupled with your data access api : you don&#8217;t need to know that it&#8217;s using iBatis, direct JDBC, etc &#8230; and another promise is to potentially allow you to switch from an implementation to another without having to change the code of your service layer.</p>
<p>This is this last promise which is not true any more if you start using the transitive persistence feature given by JPA and many others ORM framework.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yakafokon.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yakafokon.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yakafokon.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yakafokon.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yakafokon.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yakafokon.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yakafokon.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yakafokon.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yakafokon.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yakafokon.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yakafokon.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yakafokon.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yakafokon.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yakafokon.wordpress.com/229/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=229&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yakafokon.wordpress.com/2009/03/11/using-dao-with-orm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/012a9490e754ad268a8f5d805eb52c0c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yakafokon</media:title>
		</media:content>
	</item>
		<item>
		<title>Converting XML data to strongly typed AS3 Object</title>
		<link>http://yakafokon.wordpress.com/2009/02/18/converting-xml-data-to-strongly-typed-as3-object/</link>
		<comments>http://yakafokon.wordpress.com/2009/02/18/converting-xml-data-to-strongly-typed-as3-object/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 10:44:08 +0000</pubDate>
		<dc:creator>yakafokon</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://yakafokon.wordpress.com/?p=152</guid>
		<description><![CDATA[Context / Problem : The Use of the HttpService gives us the opportunity to retreive XML data from a server. But &#8230; the problem starts when we receive these data : how could we manipulate these data from a strongly typed manner ? Let&#8217;s take an example to illustrate the issue : The following code [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=152&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Context / Problem :</strong></p>
<p>The Use of the HttpService gives us the opportunity to retreive XML data from a server.<br />
But &#8230; the problem starts when we receive these data : how could we manipulate these data from a strongly typed manner ?<br />
Let&#8217;s take an example to illustrate the issue :</p>
<p>The following code retrieves xml data and registers a callback to parse the result :</p>
<pre class="brush: jscript;">
var httpService:HTTPService = new HTTPService();
httpService.addEventListener(ResultEvent.RESULT, onLoadListResult);
httpService.url=&quot;TodoItems.xml&quot;;
httpService.resultFormat=HTTPService.RESULT_FORMAT_OBJECT;
httpService.send();

private function onLoadListResult(e:ResultEvent):void {
	var resultList:ArrayCollection = new ArrayCollection();
	for each (var o:ObjectProxy in  ArrayCollection(e.result.List.TodoItemVO)) {
		trace(o.title);
	}
}
</pre>
<p>The content of TodoItems.xml is the following :</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;List&gt;
	&lt;TodoItemVO&gt;
		&lt;id&gt;1&lt;/id&gt;
		&lt;title&gt;Simple title&lt;/title&gt;
		&lt;detail&gt;detail&lt;/detail&gt;
	&lt;/TodoItemVO&gt;
	&lt;TodoItemVO&gt;
		&lt;id&gt;2&lt;/id&gt;
		&lt;title&gt;another Title&lt;/title&gt;
		&lt;detail&gt;detail2&lt;/detail&gt;
	&lt;/TodoItemVO&gt;
&lt;/List&gt;
</pre>
<p>So the output for this will be the following :</p>
<pre class="brush: jscript;">
Simple title
another Title
</pre>
<p>It works &#8230; so where is the issue ?<br />
Well what I would like is to cast the result in strongly type object.<br />
The direct solution would be to create my typed object and copy each attribut in it.<br />
My callback function would be something like this :</p>
<pre class="brush: jscript;">
private function onLoadListResult(e:ResultEvent):void {
	var resultList:ArrayCollection = new ArrayCollection();
	for each (var o:ObjectProxy in  ArrayCollection(e.result.List.TodoItemVO)) {
		var todoItemVO:TodoItemVO = new TodoItemVO();
		todoItemVO.id = o.valueOf().id;
		todoItemVO.title = o.valueOf().title;
		todoItemVO.detail = o.valueOf().detail;
		resultList.addItem(todoItemVO);
	}
}
</pre>
<p>But what if I have more than 3 attributes to copy ?</p>
<p><strong>Solution :</strong></p>
<p>I&#8217;ve found this solution from the <a href="http://www.darronschall.com/weblog/">Darron Schall blog&#8217;s</a> in <a href="http://www.darronschall.com/weblog/2006/10/convert-generic-objects-into-class-instances.cfm">this blog entry</a> :</p>
<p>He has developped an utility object (ObjectTranslator) that will copy your data in the strongly typed object with only one line of code :</p>
<blockquote><p>ObjectTranslator : converts a plain vanilla object to be an instance of the class passed as the second variable.  This is not a recursive funtion and will only work for the first level of nesting.  When you have deeply nested objects, you first need to convert the nested objects to class instances, and then convert the top level object.</p></blockquote>
<p>My code will then look like this :</p>
<pre class="brush: jscript;">
private function onLoadListResult(e:ResultEvent):void {
	var resultList:ArrayCollection = new ArrayCollection();
	for each (var o:ObjectProxy in  ArrayCollection(e.result.List.TodoItemVO)) {           
		resultList.addItem(ObjectTranslator.objectToInstance(o.valueOf(), TodoItemVO) as TodoItemVO);
	}
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yakafokon.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yakafokon.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yakafokon.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yakafokon.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yakafokon.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yakafokon.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yakafokon.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yakafokon.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yakafokon.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yakafokon.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yakafokon.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yakafokon.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yakafokon.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yakafokon.wordpress.com/152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=152&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yakafokon.wordpress.com/2009/02/18/converting-xml-data-to-strongly-typed-as3-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/012a9490e754ad268a8f5d805eb52c0c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yakafokon</media:title>
		</media:content>
	</item>
		<item>
		<title>Yoxos eclipse distrib</title>
		<link>http://yakafokon.wordpress.com/2009/02/14/yoxos-eclipse-distrib/</link>
		<comments>http://yakafokon.wordpress.com/2009/02/14/yoxos-eclipse-distrib/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 14:03:57 +0000</pubDate>
		<dc:creator>yakafokon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[eclipse]]></category>

		<guid isPermaLink="false">http://yakafokon.wordpress.com/?p=179</guid>
		<description><![CDATA[Just a quick entry to tell how exited I&#8217;am with the Yoxos &#8220;Eclipse on demand&#8221; Creating your initial Eclipse distrib install has never been so easy with this tool : First step : in their web application you just select all the plugins you need then click on &#8220;Start Download&#8221; and that&#8217;s it ! you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=179&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just a quick entry to tell how exited I&#8217;am with the<a href="http://www.yoxos.com/ondemand/"> Yoxos &#8220;Eclipse on demand&#8221;</a><br />
Creating your initial Eclipse distrib install has never been so easy with this tool :</p>
<p>First step : in their web application you just select all the plugins you need then click on &#8220;Start Download&#8221; and that&#8217;s it ! you are downloading your own eclipse distrib in a minute !<br />
When I think how painfull it is without this great tools to get each plugin separatly, having to check that you have the needed dependencies &#8230;</p>
<p><a href="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_02.png"><img class="aligncenter size-medium wp-image-182" title="yoxos_screenshot_02" src="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_02.png?w=300&#038;h=230" alt="yoxos_screenshot_02" width="300" height="230" /></a></p>
<p>But wait there&#8217;s more ! Once you are using the yoxos distrib their is a yoxos plugin embeded in eclipse which add a new perspective. From this perspective you can choose to add new plugins and yoxos will check for you all the needed dependencies and download them !</p>
<p style="text-align:center;"><a href="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_1.png"><img class="size-medium wp-image-184 aligncenter" title="Yoxos eclipse perspective" src="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_1.png?w=300&#038;h=225" alt="Yoxos eclipse perspective" width="300" height="225" /></a></p>
<p>Adding new plugins has never been so easy!</p>
<p> <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_2.png"><img class="alignleft size-medium wp-image-185" title="Yoxos finding dependencies" src="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_2.png?w=300&#038;h=226" alt="Yoxos finding dependencies" width="300" height="226" /></a><a href="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_3.png"><img class="aligncenter size-medium wp-image-186" title="Yoxos dependencies found" src="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_3.png?w=300&#038;h=225" alt="Yoxos dependencies found" width="300" height="225" /></a></p>
<p><a href="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_4.png"><img class="alignleft size-medium wp-image-187" title="Yoxos features that will be installed" src="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_4.png?w=300&#038;h=225" alt="Yoxos features that will be installed" width="300" height="225" /></a><a href="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_5.png"><img class="aligncenter size-medium wp-image-188" title="Yoxos installing features" src="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_5.png?w=300&#038;h=226" alt="Yoxos installing features" width="300" height="226" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yakafokon.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yakafokon.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yakafokon.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yakafokon.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yakafokon.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yakafokon.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yakafokon.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yakafokon.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yakafokon.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yakafokon.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yakafokon.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yakafokon.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yakafokon.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yakafokon.wordpress.com/179/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=179&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yakafokon.wordpress.com/2009/02/14/yoxos-eclipse-distrib/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/012a9490e754ad268a8f5d805eb52c0c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yakafokon</media:title>
		</media:content>

		<media:content url="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_02.png?w=300" medium="image">
			<media:title type="html">yoxos_screenshot_02</media:title>
		</media:content>

		<media:content url="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_1.png?w=300" medium="image">
			<media:title type="html">Yoxos eclipse perspective</media:title>
		</media:content>

		<media:content url="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_2.png?w=300" medium="image">
			<media:title type="html">Yoxos finding dependencies</media:title>
		</media:content>

		<media:content url="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_3.png?w=300" medium="image">
			<media:title type="html">Yoxos dependencies found</media:title>
		</media:content>

		<media:content url="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_4.png?w=300" medium="image">
			<media:title type="html">Yoxos features that will be installed</media:title>
		</media:content>

		<media:content url="http://yakafokon.files.wordpress.com/2009/02/yoxos_screenshot_5.png?w=300" medium="image">
			<media:title type="html">Yoxos installing features</media:title>
		</media:content>
	</item>
		<item>
		<title>Two way binding with Flex</title>
		<link>http://yakafokon.wordpress.com/2009/01/28/two-way-binding-with-flex/</link>
		<comments>http://yakafokon.wordpress.com/2009/01/28/two-way-binding-with-flex/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 10:22:36 +0000</pubDate>
		<dc:creator>yakafokon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://yakafokon.wordpress.com/?p=138</guid>
		<description><![CDATA[Having a good api for binding ui components to the data model has became a must have feature. Since I&#8217;m playing with Flex lately I&#8217;ve quickly test how to use its binding feature. Let say you have a VO object like this one : package org.test.vo {     [Bindable]     public class PersonVO  {         [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=138&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Having a good api for binding ui components to the data model has became a must have feature. Since I&#8217;m playing with Flex lately I&#8217;ve quickly test how to use its binding feature.</p>
<p>Let say you have a VO object like this one :</p>
<pre class="brush: jscript;">

package org.test.vo {

    [Bindable]
    public class PersonVO  {

        public var age:int;
        public var firstName:String;
        public var lastName:String;
    }
}
</pre>
<p>Notice the [Bindable] annotation added before the class definition, this is telling the compiler that all the public attribut inside the class should be able to dispatch an event when their value are changed so that they can be used as the source of data binding.</p>
<p><strong>Solution 1 :</strong></p>
<p>The following Flex code can be used to display the PersonVO data :</p>
<pre class="brush: xml;">

    &lt;mx:Form&gt;
        &lt;mx:FormItem label=&quot;First Name&quot;&gt;
            &lt;mx:TextInput id=&quot;firstNameId&quot;/&gt;
        &lt;/mx:FormItem&gt;       
        &lt;mx:FormItem label=&quot;Last Name&quot;&gt;
            &lt;mx:TextInput id=&quot;lastNameId&quot;/&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label=&quot;Age&quot;&gt;
            &lt;mx:TextInput id=&quot;ageId&quot;/&gt;
        &lt;/mx:FormItem&gt;
    &lt;/mx:Form&gt;
</pre>
<p>If you want a &#8220;two way&#8221; binding between the UI and the model you need to write the following</p>
<pre class="brush: xml;">

    &lt;mx:Binding source=&quot;personVO.firstName&quot; destination=&quot;firstNameId.text&quot; /&gt;
    &lt;mx:Binding source=&quot;firstNameId.text&quot; destination=&quot;personVO.firstName&quot; /&gt;

    &lt;mx:Binding source=&quot;personVO.lastName&quot; destination=&quot;lastNameId.text&quot; /&gt;
    &lt;mx:Binding source=&quot;lastNameId.text&quot; destination=&quot;personVO.lastName&quot; /&gt;

    &lt;mx:Binding source=&quot;personVO.age.toString()&quot; destination=&quot;ageId.text&quot; /&gt;
    &lt;mx:Binding source=&quot;int(ageId.text)&quot; destination=&quot;personVO.age&quot; /&gt;
</pre>
<p>Note : since age is an int type we need to write some extra code to tell flex how to cast from String to int and vice versa.</p>
<p><strong>Solution 2 :</strong></p>
<p>The binding can also be described the following way :<strong><br />
</strong></p>
<pre class="brush: xml;">

&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;vertical&quot; xmlns:local=&quot;*&quot;&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.controls.Alert;
            private function showPersonValue():void {
                Alert.show(    &quot;firstName = &quot; + aPerson.firstName + &quot;\n&quot; +
                             &quot;lastName = &quot; + aPerson.lastName + &quot;\n&quot;+
                             &quot;age = &quot; + aPerson.age , &quot;Info&quot;);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;local:PersonVO id=&quot;aPerson&quot;&gt;
        &lt;local:firstName&gt;{firstNameId.text}&lt;/local:firstName&gt;
        &lt;local:lastName&gt;{lastNameId.text}&lt;/local:lastName&gt;
        &lt;local:age&gt;{int(ageId.text)}&lt;/local:age&gt;
    &lt;/local:PersonVO&gt;

    &lt;mx:Form&gt;
        &lt;mx:FormItem label=&quot;First Name&quot;&gt;
            &lt;mx:TextInput id=&quot;firstNameId&quot; text=&quot;{aPerson.firstName}&quot;/&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label=&quot;Last Name&quot;&gt;
            &lt;mx:TextInput id=&quot;lastNameId&quot; text=&quot;{aPerson.lastName}&quot;/&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label=&quot;Age&quot;&gt;
            &lt;mx:TextInput id=&quot;ageId&quot; text=&quot;{aPerson.age}&quot;/&gt;
        &lt;/mx:FormItem&gt;
    &lt;/mx:Form&gt;

    &lt;mx:Button label=&quot;Show Person Value&quot; click=&quot;showPersonValue()&quot;/&gt;

&lt;/mx:Application&gt;
</pre>
<p><a href="http://yakafokon.files.wordpress.com/2009/01/twowaysmappingsolution2.png"><img class="aligncenter size-full wp-image-166" title="twowaysmappingsolution2" src="http://yakafokon.files.wordpress.com/2009/01/twowaysmappingsolution2.png?w=357&#038;h=322" alt="twowaysmappingsolution2" width="357" height="322" /></a></p>
<p><strong>Another solution for creating a two way binding using a &#8220;in-house utility api&#8221; found <a href="http://clockobj.co.uk/2008/10/20/creating-a-two-way-binding-between-model-and-form-in-flex/">here</a></strong></p>
<p>This solution gives the following to describe the two way binding :</p>
<pre class="brush: xml;">
...
&lt;mx:Script&gt;
	&lt;![CDATA[
		public var userModel : UserModel;
	]]&gt;
&lt;/mx:Script&gt;
&lt;mx:Form&gt;
	&lt;mx:FormItem label=&quot;First Name&quot;&gt;
		&lt;mx:TextInput id=&quot;txtFirstName&quot;/&gt;
	&lt;/mx:FormItem&gt;
&lt;/mx:Form&gt;
&lt;ModelBinding model=&quot;{userModel}&quot; field=&quot;firstName&quot; target=&quot;{txtFirstName}&quot;/&gt;
...
</pre>
<p>In my opinion the main drawback for this solution is that we are losing the error warning during compilation time : if you change field name from &#8220;firstname&#8221; to &#8220;fname&#8221; for example you won&#8217;t be informed of this error.<br />
<strong>Finally</strong><br />
I would like to point out <a href="http://bugs.adobe.com/jira/browse/SDK-11193">this feature request posted at adobe</a> asking for indicating two way binding in mx:binding tag and the following solution :  <a href="http://opensource.adobe.com/wiki/display/flexsdk/Two-way+Data+Binding">Two-way Data Binding &#8211; Functional and Design Specification</a>.</p>
<p><img src="/DOCUME%7E1/CLARAM%7E1/LOCALS%7E1/Temp/moz-screenshot-1.jpg" alt="" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yakafokon.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yakafokon.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yakafokon.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yakafokon.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yakafokon.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yakafokon.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yakafokon.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yakafokon.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yakafokon.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yakafokon.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yakafokon.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yakafokon.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yakafokon.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yakafokon.wordpress.com/138/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=138&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yakafokon.wordpress.com/2009/01/28/two-way-binding-with-flex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/012a9490e754ad268a8f5d805eb52c0c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yakafokon</media:title>
		</media:content>

		<media:content url="http://yakafokon.files.wordpress.com/2009/01/twowaysmappingsolution2.png" medium="image">
			<media:title type="html">twowaysmappingsolution2</media:title>
		</media:content>

		<media:content url="/DOCUME%7E1/CLARAM%7E1/LOCALS%7E1/Temp/moz-screenshot-1.jpg" medium="image" />
	</item>
		<item>
		<title>Ponzi scheme</title>
		<link>http://yakafokon.wordpress.com/2008/12/17/ponzi-scheme/</link>
		<comments>http://yakafokon.wordpress.com/2008/12/17/ponzi-scheme/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 16:53:38 +0000</pubDate>
		<dc:creator>yakafokon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://yakafokon.wordpress.com/?p=106</guid>
		<description><![CDATA[Following the Bernard Madoff case I&#8217;ve been told that what he has done is called a Ponzi scheme. A Ponzi scheme is a fraudulent investment operation that involves paying abnormally high returns to investors out of the money paid in by subsequent investors, rather than from the profit from any real business.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=106&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Following the Bernard Madoff case I&#8217;ve been told that what he has done is called a <a title="Ponzi Scheme" href="http://en.wikipedia.org/wiki/Ponzi_scheme" target="_blank">Ponzi scheme</a>.</p>
<blockquote><p>A Ponzi scheme is a fraudulent investment operation that involves paying abnormally high returns to investors out of the money paid in by subsequent investors, rather than from the profit from any real business.</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yakafokon.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yakafokon.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yakafokon.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yakafokon.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yakafokon.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yakafokon.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yakafokon.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yakafokon.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yakafokon.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yakafokon.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yakafokon.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yakafokon.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yakafokon.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yakafokon.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=106&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yakafokon.wordpress.com/2008/12/17/ponzi-scheme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/012a9490e754ad268a8f5d805eb52c0c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yakafokon</media:title>
		</media:content>
	</item>
		<item>
		<title>Testing JPA, Hibernate, JoSQL and Lucene</title>
		<link>http://yakafokon.wordpress.com/2008/12/17/testing-jpa-hibernate-josql-and-lucene/</link>
		<comments>http://yakafokon.wordpress.com/2008/12/17/testing-jpa-hibernate-josql-and-lucene/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 16:29:05 +0000</pubDate>
		<dc:creator>yakafokon</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[JoSQL]]></category>
		<category><![CDATA[JPA]]></category>
		<category><![CDATA[Lucene]]></category>

		<guid isPermaLink="false">http://yakafokon.wordpress.com/?p=95</guid>
		<description><![CDATA[(download the project file : change to .zip before opening) This a just for showing some different way of making a simple query. By the way I know that these simple tests can&#8217;t be seen seen as serious bencharking but at least it shows that using JoSQL on in memory data can enhance performance, if [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=95&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>(download the project file : change to .zip before opening)</p>
<p>This a just for showing some different way of making a simple query.</p>
<p>By the way I know that these simple tests can&#8217;t be seen seen as serious bencharking but at least it shows that using JoSQL on in memory data can enhance performance, if this make sens in your app to keep the data in memory. These are the results from the JoSQL test :</p>
<pre>items count : 1680
JoSQL query run total time = 15 ms
JPA query run total time = 609 ms</pre>
<p>Queries with Hibernate :</p>
<pre class="brush: java;">
    /**
     * Simple Hibernate examples with queries
     *
     * Output :
     *
     * Hibernate: select fund0_.FUND_ID as FUND1_0_, fund0_.ADMINISTRATOR_ID as ADMINIST2_0_, fund0_.ADVISORY_NAME as ADVISORY3_0_, fund0_.ANNUAL_AUDIT as ANNUAL4_0_, fund0_.AUDIT_FIRM as AUDIT5_0_, fund0_.auditor as auditor0_, fund0_.banker as banker0_, fund0_.CLASSIFICATION_ID as CLASSIFI8_0_, fund0_.codification as codifica9_0_, fund0_.COMM_STATUS as COMM10_0_, fund0_.COUNTRY_OF_DOMICILE_ID as COUNTRY11_0_, fund0_.DATA_VENDOR_FUND_ID as DATA12_0_, fund0_.DATA_VENDOR_ID as DATA13_0_, fund0_.deleted as deleted0_, fund0_.DISCLOSURE_ID as DISCLOSURE15_0_, fund0_.EXTCOM_AGREEMENT as EXTCOM16_0_, fund0_.FINANCIAL_AUTHORITY_ID1 as FINANCIAL17_0_, fund0_.FINANCIAL_AUTHORITY_ID2 as FINANCIAL18_0_, fund0_.FINANCIAL_AUTHORITY_ID3 as FINANCIAL19_0_, fund0_.FISCAL_YEAR_END as FISCAL20_0_, fund0_.FUND_CAPACITY as FUND21_0_, fund0_.FUND_DESCRIPTION as FUND22_0_, fund0_.FUND_NAME as FUND23_0_, fund0_.FUND_REDEMPTION_GATE_FUND_LVL as FUND24_0_, fund0_.FUND_REDEMPTION_GATE_IND_LVL as FUND25_0_, fund0_.GEOGRAPHICAL_FOCUS_ID as GEOGRAP26_0_, fund0_.inception as inception0_, fund0_.instruments as instrum28_0_, fund0_.internal as internal0_, fund0_.INVESTMENT_RESTRICTIONS as INVESTMENT30_0_, fund0_.INVESTMENT_STATUS_ID as INVESTMENT31_0_, fund0_.INVESTMENT_STRATEGY as INVESTMENT32_0_, fund0_.INVESTMENT_SUB_STATUS_ID as INVESTMENT33_0_, fund0_.ISO_CODE as ISO34_0_, fund0_.IVT_MANAGEMENT_FIRM_ID as IVT35_0_, fund0_.LAST_AUDIT as LAST36_0_, fund0_.LAST_DUE_DILIGENCE as LAST37_0_, fund0_.LEGAL_ADVISOR_ID1 as LEGAL38_0_, fund0_.LEGAL_ADVISOR_ID2 as LEGAL39_0_, fund0_.LEGAL_ADVISOR_ID3 as LEGAL40_0_, fund0_.LEGAL_ADVISOR_OFFSHORE as LEGAL41_0_, fund0_.LEGAL_COUNSEL as LEGAL42_0_, fund0_.LEGAL_DESCRIPTION as LEGAL43_0_, fund0_.LEGAL_DESCRIPTION_ID as LEGAL44_0_, fund0_.LISTED_ON_A_STOCK_EXCHANGE as LISTED45_0_, fund0_.MANAGED_ACCOUNT as MANAGED46_0_, fund0_.MANAGEMENT_FIRM_ID as MANAGEMENT47_0_, fund0_.MARKETING_NAME as MARKETING48_0_, fund0_.MASTER_FUND_ID as MASTER49_0_, fund0_.MASTER_FUND_NAME as MASTER50_0_, fund0_.OFFSHORE_NAME as OFFSHORE51_0_, fund0_.OFFSHORE_VEHICLE as OFFSHORE52_0_, fund0_.PLACEMENT_AGENT as PLACEMENT53_0_, fund0_.PRIMARY_SHARE as PRIMARY71_0_, fund0_.PTF_MANAGEMENT_FIRM_ID as PTF54_0_, fund0_.ranking as ranking0_, fund0_.REPORTING_FREQUENCY_ID as REPORTING56_0_, fund0_.REPORTING_FREQUENCY_OTHER as REPORTING57_0_, fund0_.RISK_POLICY as RISK58_0_, fund0_.SECTOR_FOCUS_ID as SECTOR59_0_, fund0_.SIDE_POCKET_ALLOWABLE as SIDE60_0_, fund0_.source as source0_, fund0_.SS_CLASSIFICATION_ID as SS62_0_, fund0_.SS_FOF_CLASSIFICATION_ID as SS63_0_, fund0_.SS_MS_CLASSIFICATION_ID as SS64_0_, fund0_.stage as stage0_, fund0_.status as status0_, fund0_.STATUS_ID as STATUS67_0_, fund0_.SUB_STRATEGY as SUB68_0_, fund0_.updated as updated0_, fund0_.updater as updater0_ from Fund fund0_
     * fund list size = 1680
     * Hibernate: select count(fund0_.FUND_ID) as col_0_0_ from Fund fund0_
     * fund list size = 1680
     * Hibernate: select fundshare0_.SHARE_ID as SHARE1_1_, fundshare0_.ACCESS_RIGHT as ACCESS2_1_, fundshare0_.active as active1_, fundshare0_.CODE_BB as CODE4_1_, fundshare0_.deleted as deleted1_, fundshare0_.FUND_ID as FUND35_1_, fundshare0_.inception as inception1_, fundshare0_.INTERNAL_CODE as INTERNAL7_1_, fundshare0_.INTERNAL_SHARE as INTERNAL8_1_, fundshare0_.isin as isin1_, fundshare0_.ISO_CODE as ISO10_1_, fundshare0_.isprimary as isprimary1_, fundshare0_.LAST_PERF_AUDIT as LAST12_1_, fundshare0_.LIMIT_PERF_AUDIT as LIMIT13_1_, fundshare0_.LIQUIDITY_ID as LIQUIDITY14_1_, fundshare0_.MINIMUM_ADDITIONAL_INVEST as MINIMUM15_1_, fundshare0_.MINIMUM_INVESTMENT as MINIMUM16_1_, fundshare0_.NAV_MONITORING as NAV17_1_, fundshare0_.nominal as nominal1_, fundshare0_.OPEN_CLOSE_NAV as OPEN19_1_, fundshare0_.REFERENCE_SHARE as REFERENCE20_1_, fundshare0_.REPORTING_FREQUENCY_ID as REPORTING21_1_, fundshare0_.REPORTING_FREQUENCY_OTHER as REPORTING22_1_, fundshare0_.SERIE_ID as SERIE36_1_, fundshare0_.SHARE_CAPACITY as SHARE23_1_, fundshare0_.SHARE_CLASS as SHARE24_1_, fundshare0_.SHARE_NAME as SHARE25_1_, fundshare0_.SHARE_TYPE_ID as SHARE26_1_, fundshare0_.SHARE_TYPE_OTHER as SHARE27_1_, fundshare0_.SIDE_LETTER as SIDE28_1_, fundshare0_.STATS_START_DATE as STATS29_1_, fundshare0_.TRACK_START_DATE as TRACK30_1_, fundshare0_.updated as updated1_, fundshare0_.updater as updater1_, fundshare0_.whendeleted as whendel33_1_, fundshare0_.whodeleted as whodeleted1_ from FUND_SHARE fundshare0_
     * share list size = 21698
     * fund name = TOTO Fund
     *
     */
    public static void main(String[] args) {
        Session session = HibernateUtil.getSession();

        List lf = session.createQuery(&quot;from Fund&quot;).list();
        System.out.println(&quot;fund list size = &quot; + lf.size());

        Long fundCount = (Long)session.createQuery(&quot;select count(fund) from Fund fund&quot;).uniqueResult();
        System.out.println(&quot;fund list size = &quot; + fundCount);

        List ls = session.createQuery(&quot;from FundShare&quot;).list();
        System.out.println(&quot;share list size = &quot; + ls.size());

        Fund fund = (Fund)session.get(Fund.class, new Long(1));
        System.out.println(&quot;fund name = &quot; + fund.getFundName());
    }&lt;/pre&gt;
</pre>
<p>Queries with JPA :</p>
<pre class="brush: java;">
&lt;pre&gt;
    /**
     * JPA sample with queries
     *
     *    Output :
     *
     * Hibernate: select fund0_.FUND_ID as FUND1_1_, fund0_.ADMINISTRATOR_ID as ADMINIST2_1_, fund0_.ADVISORY_NAME as ADVISORY3_1_, fund0_.ANNUAL_AUDIT as ANNUAL4_1_, fund0_.AUDIT_FIRM as AUDIT5_1_, fund0_.auditor as auditor1_, fund0_.banker as banker1_, fund0_.CLASSIFICATION_ID as CLASSIFI8_1_, fund0_.codification as codifica9_1_, fund0_.COMM_STATUS as COMM10_1_, fund0_.COUNTRY_OF_DOMICILE_ID as COUNTRY11_1_, fund0_.DATA_VENDOR_FUND_ID as DATA12_1_, fund0_.DATA_VENDOR_ID as DATA13_1_, fund0_.deleted as deleted1_, fund0_.DISCLOSURE_ID as DISCLOSURE15_1_, fund0_.EXTCOM_AGREEMENT as EXTCOM16_1_, fund0_.FINANCIAL_AUTHORITY_ID1 as FINANCIAL17_1_, fund0_.FINANCIAL_AUTHORITY_ID2 as FINANCIAL18_1_, fund0_.FINANCIAL_AUTHORITY_ID3 as FINANCIAL19_1_, fund0_.FISCAL_YEAR_END as FISCAL20_1_, fund0_.FUND_CAPACITY as FUND21_1_, fund0_.FUND_DESCRIPTION as FUND22_1_, fund0_.FUND_NAME as FUND23_1_, fund0_.FUND_REDEMPTION_GATE_FUND_LVL as FUND24_1_, fund0_.FUND_REDEMPTION_GATE_IND_LVL as FUND25_1_, fund0_.GEOGRAPHICAL_FOCUS_ID as GEOGRAP26_1_, fund0_.inception as inception1_, fund0_.instruments as instrum28_1_, fund0_.internal as internal1_, fund0_.INVESTMENT_RESTRICTIONS as INVESTMENT30_1_, fund0_.INVESTMENT_STATUS_ID as INVESTMENT31_1_, fund0_.INVESTMENT_STRATEGY as INVESTMENT32_1_, fund0_.INVESTMENT_SUB_STATUS_ID as INVESTMENT33_1_, fund0_.ISO_CODE as ISO34_1_, fund0_.IVT_MANAGEMENT_FIRM_ID as IVT35_1_, fund0_.LAST_AUDIT as LAST36_1_, fund0_.LAST_DUE_DILIGENCE as LAST37_1_, fund0_.LEGAL_ADVISOR_ID1 as LEGAL38_1_, fund0_.LEGAL_ADVISOR_ID2 as LEGAL39_1_, fund0_.LEGAL_ADVISOR_ID3 as LEGAL40_1_, fund0_.LEGAL_ADVISOR_OFFSHORE as LEGAL41_1_, fund0_.LEGAL_COUNSEL as LEGAL42_1_, fund0_.LEGAL_DESCRIPTION as LEGAL43_1_, fund0_.LEGAL_DESCRIPTION_ID as LEGAL44_1_, fund0_.LISTED_ON_A_STOCK_EXCHANGE as LISTED45_1_, fund0_.MANAGED_ACCOUNT as MANAGED46_1_, fund0_.MANAGEMENT_FIRM_ID as MANAGEMENT47_1_, fund0_.MARKETING_NAME as MARKETING48_1_, fund0_.MASTER_FUND_ID as MASTER49_1_, fund0_.MASTER_FUND_NAME as MASTER50_1_, fund0_.OFFSHORE_NAME as OFFSHORE51_1_, fund0_.OFFSHORE_VEHICLE as OFFSHORE52_1_, fund0_.PLACEMENT_AGENT as PLACEMENT53_1_, fund0_.PRIMARY_SHARE as PRIMARY71_1_, fund0_.PTF_MANAGEMENT_FIRM_ID as PTF54_1_, fund0_.ranking as ranking1_, fund0_.REPORTING_FREQUENCY_ID as REPORTING56_1_, fund0_.REPORTING_FREQUENCY_OTHER as REPORTING57_1_, fund0_.RISK_POLICY as RISK58_1_, fund0_.SECTOR_FOCUS_ID as SECTOR59_1_, fund0_.SIDE_POCKET_ALLOWABLE as SIDE60_1_, fund0_.source as source1_, fund0_.SS_CLASSIFICATION_ID as SS62_1_, fund0_.SS_FOF_CLASSIFICATION_ID as SS63_1_, fund0_.SS_MS_CLASSIFICATION_ID as SS64_1_, fund0_.stage as stage1_, fund0_.status as status1_, fund0_.STATUS_ID as STATUS67_1_, fund0_.SUB_STRATEGY as SUB68_1_, fund0_.updated as updated1_, fund0_.updater as updater1_ from Fund fund0_
     * 1680
     * Hibernate: select * from ( select count(fund0_.FUND_ID) as col_0_0_ from Fund fund0_ ) where rownum &lt;= ?
     * 1680
     * Hibernate: select fundview0_.FUND_ID as FUND1_2_, fundview0_.FUND_NAME as FUND2_2_ from TANIS.V_TNS_FUND fundview0_
     * FundView size = 1680
     * Hibernate: select * from ( select count(*) from FUND ) where rownum &lt;= ?
     * 1680
     * Hibernate: select fund0_.FUND_ID as FUND1_1_, fund0_.ADMINISTRATOR_ID as ADMINIST2_1_, fund0_.ADVISORY_NAME as ADVISORY3_1_, fund0_.ANNUAL_AUDIT as ANNUAL4_1_, fund0_.AUDIT_FIRM as AUDIT5_1_, fund0_.auditor as auditor1_, fund0_.banker as banker1_, fund0_.CLASSIFICATION_ID as CLASSIFI8_1_, fund0_.codification as codifica9_1_, fund0_.COMM_STATUS as COMM10_1_, fund0_.COUNTRY_OF_DOMICILE_ID as COUNTRY11_1_, fund0_.DATA_VENDOR_FUND_ID as DATA12_1_, fund0_.DATA_VENDOR_ID as DATA13_1_, fund0_.deleted as deleted1_, fund0_.DISCLOSURE_ID as DISCLOSURE15_1_, fund0_.EXTCOM_AGREEMENT as EXTCOM16_1_, fund0_.FINANCIAL_AUTHORITY_ID1 as FINANCIAL17_1_, fund0_.FINANCIAL_AUTHORITY_ID2 as FINANCIAL18_1_, fund0_.FINANCIAL_AUTHORITY_ID3 as FINANCIAL19_1_, fund0_.FISCAL_YEAR_END as FISCAL20_1_, fund0_.FUND_CAPACITY as FUND21_1_, fund0_.FUND_DESCRIPTION as FUND22_1_, fund0_.FUND_NAME as FUND23_1_, fund0_.FUND_REDEMPTION_GATE_FUND_LVL as FUND24_1_, fund0_.FUND_REDEMPTION_GATE_IND_LVL as FUND25_1_, fund0_.GEOGRAPHICAL_FOCUS_ID as GEOGRAP26_1_, fund0_.inception as inception1_, fund0_.instruments as instrum28_1_, fund0_.internal as internal1_, fund0_.INVESTMENT_RESTRICTIONS as INVESTMENT30_1_, fund0_.INVESTMENT_STATUS_ID as INVESTMENT31_1_, fund0_.INVESTMENT_STRATEGY as INVESTMENT32_1_, fund0_.INVESTMENT_SUB_STATUS_ID as INVESTMENT33_1_, fund0_.ISO_CODE as ISO34_1_, fund0_.IVT_MANAGEMENT_FIRM_ID as IVT35_1_, fund0_.LAST_AUDIT as LAST36_1_, fund0_.LAST_DUE_DILIGENCE as LAST37_1_, fund0_.LEGAL_ADVISOR_ID1 as LEGAL38_1_, fund0_.LEGAL_ADVISOR_ID2 as LEGAL39_1_, fund0_.LEGAL_ADVISOR_ID3 as LEGAL40_1_, fund0_.LEGAL_ADVISOR_OFFSHORE as LEGAL41_1_, fund0_.LEGAL_COUNSEL as LEGAL42_1_, fund0_.LEGAL_DESCRIPTION as LEGAL43_1_, fund0_.LEGAL_DESCRIPTION_ID as LEGAL44_1_, fund0_.LISTED_ON_A_STOCK_EXCHANGE as LISTED45_1_, fund0_.MANAGED_ACCOUNT as MANAGED46_1_, fund0_.MANAGEMENT_FIRM_ID as MANAGEMENT47_1_, fund0_.MARKETING_NAME as MARKETING48_1_, fund0_.MASTER_FUND_ID as MASTER49_1_, fund0_.MASTER_FUND_NAME as MASTER50_1_, fund0_.OFFSHORE_NAME as OFFSHORE51_1_, fund0_.OFFSHORE_VEHICLE as OFFSHORE52_1_, fund0_.PLACEMENT_AGENT as PLACEMENT53_1_, fund0_.PRIMARY_SHARE as PRIMARY71_1_, fund0_.PTF_MANAGEMENT_FIRM_ID as PTF54_1_, fund0_.ranking as ranking1_, fund0_.REPORTING_FREQUENCY_ID as REPORTING56_1_, fund0_.REPORTING_FREQUENCY_OTHER as REPORTING57_1_, fund0_.RISK_POLICY as RISK58_1_, fund0_.SECTOR_FOCUS_ID as SECTOR59_1_, fund0_.SIDE_POCKET_ALLOWABLE as SIDE60_1_, fund0_.source as source1_, fund0_.SS_CLASSIFICATION_ID as SS62_1_, fund0_.SS_FOF_CLASSIFICATION_ID as SS63_1_, fund0_.SS_MS_CLASSIFICATION_ID as SS64_1_, fund0_.stage as stage1_, fund0_.status as status1_, fund0_.STATUS_ID as STATUS67_1_, fund0_.SUB_STRATEGY as SUB68_1_, fund0_.updated as updated1_, fund0_.updater as updater1_ from Fund fund0_ inner join FUND_SHARE fundsharec1_ on fund0_.FUND_ID=fundsharec1_.FUND_ID
     * 4396
     * Hibernate: select fund0_.FUND_ID as FUND1_1_, fund0_.ADMINISTRATOR_ID as ADMINIST2_1_, fund0_.ADVISORY_NAME as ADVISORY3_1_, fund0_.ANNUAL_AUDIT as ANNUAL4_1_, fund0_.AUDIT_FIRM as AUDIT5_1_, fund0_.auditor as auditor1_, fund0_.banker as banker1_, fund0_.CLASSIFICATION_ID as CLASSIFI8_1_, fund0_.codification as codifica9_1_, fund0_.COMM_STATUS as COMM10_1_, fund0_.COUNTRY_OF_DOMICILE_ID as COUNTRY11_1_, fund0_.DATA_VENDOR_FUND_ID as DATA12_1_, fund0_.DATA_VENDOR_ID as DATA13_1_, fund0_.deleted as deleted1_, fund0_.DISCLOSURE_ID as DISCLOSURE15_1_, fund0_.EXTCOM_AGREEMENT as EXTCOM16_1_, fund0_.FINANCIAL_AUTHORITY_ID1 as FINANCIAL17_1_, fund0_.FINANCIAL_AUTHORITY_ID2 as FINANCIAL18_1_, fund0_.FINANCIAL_AUTHORITY_ID3 as FINANCIAL19_1_, fund0_.FISCAL_YEAR_END as FISCAL20_1_, fund0_.FUND_CAPACITY as FUND21_1_, fund0_.FUND_DESCRIPTION as FUND22_1_, fund0_.FUND_NAME as FUND23_1_, fund0_.FUND_REDEMPTION_GATE_FUND_LVL as FUND24_1_, fund0_.FUND_REDEMPTION_GATE_IND_LVL as FUND25_1_, fund0_.GEOGRAPHICAL_FOCUS_ID as GEOGRAP26_1_, fund0_.inception as inception1_, fund0_.instruments as instrum28_1_, fund0_.internal as internal1_, fund0_.INVESTMENT_RESTRICTIONS as INVESTMENT30_1_, fund0_.INVESTMENT_STATUS_ID as INVESTMENT31_1_, fund0_.INVESTMENT_STRATEGY as INVESTMENT32_1_, fund0_.INVESTMENT_SUB_STATUS_ID as INVESTMENT33_1_, fund0_.ISO_CODE as ISO34_1_, fund0_.IVT_MANAGEMENT_FIRM_ID as IVT35_1_, fund0_.LAST_AUDIT as LAST36_1_, fund0_.LAST_DUE_DILIGENCE as LAST37_1_, fund0_.LEGAL_ADVISOR_ID1 as LEGAL38_1_, fund0_.LEGAL_ADVISOR_ID2 as LEGAL39_1_, fund0_.LEGAL_ADVISOR_ID3 as LEGAL40_1_, fund0_.LEGAL_ADVISOR_OFFSHORE as LEGAL41_1_, fund0_.LEGAL_COUNSEL as LEGAL42_1_, fund0_.LEGAL_DESCRIPTION as LEGAL43_1_, fund0_.LEGAL_DESCRIPTION_ID as LEGAL44_1_, fund0_.LISTED_ON_A_STOCK_EXCHANGE as LISTED45_1_, fund0_.MANAGED_ACCOUNT as MANAGED46_1_, fund0_.MANAGEMENT_FIRM_ID as MANAGEMENT47_1_, fund0_.MARKETING_NAME as MARKETING48_1_, fund0_.MASTER_FUND_ID as MASTER49_1_, fund0_.MASTER_FUND_NAME as MASTER50_1_, fund0_.OFFSHORE_NAME as OFFSHORE51_1_, fund0_.OFFSHORE_VEHICLE as OFFSHORE52_1_, fund0_.PLACEMENT_AGENT as PLACEMENT53_1_, fund0_.PRIMARY_SHARE as PRIMARY71_1_, fund0_.PTF_MANAGEMENT_FIRM_ID as PTF54_1_, fund0_.ranking as ranking1_, fund0_.REPORTING_FREQUENCY_ID as REPORTING56_1_, fund0_.REPORTING_FREQUENCY_OTHER as REPORTING57_1_, fund0_.RISK_POLICY as RISK58_1_, fund0_.SECTOR_FOCUS_ID as SECTOR59_1_, fund0_.SIDE_POCKET_ALLOWABLE as SIDE60_1_, fund0_.source as source1_, fund0_.SS_CLASSIFICATION_ID as SS62_1_, fund0_.SS_FOF_CLASSIFICATION_ID as SS63_1_, fund0_.SS_MS_CLASSIFICATION_ID as SS64_1_, fund0_.stage as stage1_, fund0_.status as status1_, fund0_.STATUS_ID as STATUS67_1_, fund0_.SUB_STRATEGY as SUB68_1_, fund0_.updated as updated1_, fund0_.updater as updater1_ from Fund fund0_ left outer join FUND_SHARE fundsharec1_ on fund0_.FUND_ID=fundsharec1_.FUND_ID
     * 4526
     */
    public static void main(String[] args) {
        EntityManagerFactory factory = Persistence.createEntityManagerFactory(null);
        EntityManager em = factory.createEntityManager();
        em.getTransaction().begin();

        try {
            //
            List funds = em.createQuery(&quot;from Fund&quot;).getResultList();
            System.out.println(funds.size());

            Object result = em.createQuery(&quot;select count(fund) from Fund fund&quot;).getSingleResult();
            System.out.println(result);

            List fundsView = em.createQuery(&quot;from FundView&quot;).getResultList();
            System.out.println(&quot;FundView size = &quot; + fundsView.size());            

            Object o = em.createNativeQuery(&quot;select count(*) from FUND&quot;).getSingleResult();
            System.out.println(o);

            List fundsInnerJoin = em.createQuery(&quot;select fund from Fund as fund inner join fund.fundShareCollection as share&quot;).getResultList();
            System.out.println(fundsInnerJoin.size());

            List fundsOuterJoin = em.createQuery(&quot;select fund from Fund as fund left join fund.fundShareCollection as share&quot;).getResultList();
            System.out.println(fundsOuterJoin.size());

        } catch(Exception e) {
            e.printStackTrace();
        } finally {
            em.getTransaction().commit();
            em.close();
        }
</pre>
<p>In memory query with JoSQL :</p>
<pre class="brush: java;">
    /**
     * JPA example with a JoSQL query on in memory data retrived with JPA
     *
     * Output :
     *
     * Hibernate: select fund0_.FUND_ID as FUND1_1_, fund0_.ADMINISTRATOR_ID as ADMINIST2_1_, fund0_.ADVISORY_NAME as ADVISORY3_1_, fund0_.ANNUAL_AUDIT as ANNUAL4_1_, fund0_.AUDIT_FIRM as AUDIT5_1_, fund0_.auditor as auditor1_, fund0_.banker as banker1_, fund0_.CLASSIFICATION_ID as CLASSIFI8_1_, fund0_.codification as codifica9_1_, fund0_.COMM_STATUS as COMM10_1_, fund0_.COUNTRY_OF_DOMICILE_ID as COUNTRY11_1_, fund0_.DATA_VENDOR_FUND_ID as DATA12_1_, fund0_.DATA_VENDOR_ID as DATA13_1_, fund0_.deleted as deleted1_, fund0_.DISCLOSURE_ID as DISCLOSURE15_1_, fund0_.EXTCOM_AGREEMENT as EXTCOM16_1_, fund0_.FINANCIAL_AUTHORITY_ID1 as FINANCIAL17_1_, fund0_.FINANCIAL_AUTHORITY_ID2 as FINANCIAL18_1_, fund0_.FINANCIAL_AUTHORITY_ID3 as FINANCIAL19_1_, fund0_.FISCAL_YEAR_END as FISCAL20_1_, fund0_.FUND_CAPACITY as FUND21_1_, fund0_.FUND_DESCRIPTION as FUND22_1_, fund0_.FUND_NAME as FUND23_1_, fund0_.FUND_REDEMPTION_GATE_FUND_LVL as FUND24_1_, fund0_.FUND_REDEMPTION_GATE_IND_LVL as FUND25_1_, fund0_.GEOGRAPHICAL_FOCUS_ID as GEOGRAP26_1_, fund0_.inception as inception1_, fund0_.instruments as instrum28_1_, fund0_.internal as internal1_, fund0_.INVESTMENT_RESTRICTIONS as INVESTMENT30_1_, fund0_.INVESTMENT_STATUS_ID as INVESTMENT31_1_, fund0_.INVESTMENT_STRATEGY as INVESTMENT32_1_, fund0_.INVESTMENT_SUB_STATUS_ID as INVESTMENT33_1_, fund0_.ISO_CODE as ISO34_1_, fund0_.IVT_MANAGEMENT_FIRM_ID as IVT35_1_, fund0_.LAST_AUDIT as LAST36_1_, fund0_.LAST_DUE_DILIGENCE as LAST37_1_, fund0_.LEGAL_ADVISOR_ID1 as LEGAL38_1_, fund0_.LEGAL_ADVISOR_ID2 as LEGAL39_1_, fund0_.LEGAL_ADVISOR_ID3 as LEGAL40_1_, fund0_.LEGAL_ADVISOR_OFFSHORE as LEGAL41_1_, fund0_.LEGAL_COUNSEL as LEGAL42_1_, fund0_.LEGAL_DESCRIPTION as LEGAL43_1_, fund0_.LEGAL_DESCRIPTION_ID as LEGAL44_1_, fund0_.LISTED_ON_A_STOCK_EXCHANGE as LISTED45_1_, fund0_.MANAGED_ACCOUNT as MANAGED46_1_, fund0_.MANAGEMENT_FIRM_ID as MANAGEMENT47_1_, fund0_.MARKETING_NAME as MARKETING48_1_, fund0_.MASTER_FUND_ID as MASTER49_1_, fund0_.MASTER_FUND_NAME as MASTER50_1_, fund0_.OFFSHORE_NAME as OFFSHORE51_1_, fund0_.OFFSHORE_VEHICLE as OFFSHORE52_1_, fund0_.PLACEMENT_AGENT as PLACEMENT53_1_, fund0_.PRIMARY_SHARE as PRIMARY71_1_, fund0_.PTF_MANAGEMENT_FIRM_ID as PTF54_1_, fund0_.ranking as ranking1_, fund0_.REPORTING_FREQUENCY_ID as REPORTING56_1_, fund0_.REPORTING_FREQUENCY_OTHER as REPORTING57_1_, fund0_.RISK_POLICY as RISK58_1_, fund0_.SECTOR_FOCUS_ID as SECTOR59_1_, fund0_.SIDE_POCKET_ALLOWABLE as SIDE60_1_, fund0_.source as source1_, fund0_.SS_CLASSIFICATION_ID as SS62_1_, fund0_.SS_FOF_CLASSIFICATION_ID as SS63_1_, fund0_.SS_MS_CLASSIFICATION_ID as SS64_1_, fund0_.stage as stage1_, fund0_.status as status1_, fund0_.STATUS_ID as STATUS67_1_, fund0_.SUB_STRATEGY as SUB68_1_, fund0_.updated as updated1_, fund0_.updater as updater1_ from Fund fund0_
     * 1680
     * JoSQL query run total time = 15
     * JoSQL result count = 233
     * Hibernate: select fund0_.FUND_ID as FUND1_1_, fund0_.ADMINISTRATOR_ID as ADMINIST2_1_, fund0_.ADVISORY_NAME as ADVISORY3_1_, fund0_.ANNUAL_AUDIT as ANNUAL4_1_, fund0_.AUDIT_FIRM as AUDIT5_1_, fund0_.auditor as auditor1_, fund0_.banker as banker1_, fund0_.CLASSIFICATION_ID as CLASSIFI8_1_, fund0_.codification as codifica9_1_, fund0_.COMM_STATUS as COMM10_1_, fund0_.COUNTRY_OF_DOMICILE_ID as COUNTRY11_1_, fund0_.DATA_VENDOR_FUND_ID as DATA12_1_, fund0_.DATA_VENDOR_ID as DATA13_1_, fund0_.deleted as deleted1_, fund0_.DISCLOSURE_ID as DISCLOSURE15_1_, fund0_.EXTCOM_AGREEMENT as EXTCOM16_1_, fund0_.FINANCIAL_AUTHORITY_ID1 as FINANCIAL17_1_, fund0_.FINANCIAL_AUTHORITY_ID2 as FINANCIAL18_1_, fund0_.FINANCIAL_AUTHORITY_ID3 as FINANCIAL19_1_, fund0_.FISCAL_YEAR_END as FISCAL20_1_, fund0_.FUND_CAPACITY as FUND21_1_, fund0_.FUND_DESCRIPTION as FUND22_1_, fund0_.FUND_NAME as FUND23_1_, fund0_.FUND_REDEMPTION_GATE_FUND_LVL as FUND24_1_, fund0_.FUND_REDEMPTION_GATE_IND_LVL as FUND25_1_, fund0_.GEOGRAPHICAL_FOCUS_ID as GEOGRAP26_1_, fund0_.inception as inception1_, fund0_.instruments as instrum28_1_, fund0_.internal as internal1_, fund0_.INVESTMENT_RESTRICTIONS as INVESTMENT30_1_, fund0_.INVESTMENT_STATUS_ID as INVESTMENT31_1_, fund0_.INVESTMENT_STRATEGY as INVESTMENT32_1_, fund0_.INVESTMENT_SUB_STATUS_ID as INVESTMENT33_1_, fund0_.ISO_CODE as ISO34_1_, fund0_.IVT_MANAGEMENT_FIRM_ID as IVT35_1_, fund0_.LAST_AUDIT as LAST36_1_, fund0_.LAST_DUE_DILIGENCE as LAST37_1_, fund0_.LEGAL_ADVISOR_ID1 as LEGAL38_1_, fund0_.LEGAL_ADVISOR_ID2 as LEGAL39_1_, fund0_.LEGAL_ADVISOR_ID3 as LEGAL40_1_, fund0_.LEGAL_ADVISOR_OFFSHORE as LEGAL41_1_, fund0_.LEGAL_COUNSEL as LEGAL42_1_, fund0_.LEGAL_DESCRIPTION as LEGAL43_1_, fund0_.LEGAL_DESCRIPTION_ID as LEGAL44_1_, fund0_.LISTED_ON_A_STOCK_EXCHANGE as LISTED45_1_, fund0_.MANAGED_ACCOUNT as MANAGED46_1_, fund0_.MANAGEMENT_FIRM_ID as MANAGEMENT47_1_, fund0_.MARKETING_NAME as MARKETING48_1_, fund0_.MASTER_FUND_ID as MASTER49_1_, fund0_.MASTER_FUND_NAME as MASTER50_1_, fund0_.OFFSHORE_NAME as OFFSHORE51_1_, fund0_.OFFSHORE_VEHICLE as OFFSHORE52_1_, fund0_.PLACEMENT_AGENT as PLACEMENT53_1_, fund0_.PRIMARY_SHARE as PRIMARY71_1_, fund0_.PTF_MANAGEMENT_FIRM_ID as PTF54_1_, fund0_.ranking as ranking1_, fund0_.REPORTING_FREQUENCY_ID as REPORTING56_1_, fund0_.REPORTING_FREQUENCY_OTHER as REPORTING57_1_, fund0_.RISK_POLICY as RISK58_1_, fund0_.SECTOR_FOCUS_ID as SECTOR59_1_, fund0_.SIDE_POCKET_ALLOWABLE as SIDE60_1_, fund0_.source as source1_, fund0_.SS_CLASSIFICATION_ID as SS62_1_, fund0_.SS_FOF_CLASSIFICATION_ID as SS63_1_, fund0_.SS_MS_CLASSIFICATION_ID as SS64_1_, fund0_.stage as stage1_, fund0_.status as status1_, fund0_.STATUS_ID as STATUS67_1_, fund0_.SUB_STRATEGY as SUB68_1_, fund0_.updated as updated1_, fund0_.updater as updater1_ from Fund fund0_ where fund0_.FUND_NAME like '%SGAM%'
     * JPA query run total time = 609
     * JPA result count = 233
     */
    public static void main(String[] args) {
        EntityManagerFactory factory = Persistence.createEntityManagerFactory(null);
        EntityManager em = factory.createEntityManager();
        em.getTransaction().begin();

        try {
            Query query = em.createQuery(&quot;from Fund&quot;);
            List funds = query.getResultList();
            System.out.println(funds.size());

            // prepare and run the JoSQL Query :
            org.josql.Query josqlQuery = new org.josql.Query();
            josqlQuery.parse(&quot;select * from models.generated.Fund where fundName like '%SGAM%'&quot;);
            long start = System.currentTimeMillis();
            QueryResults qr = josqlQuery.execute(funds);
            List&lt;Fund&gt; fundsResult = qr.getResults();
            System.out.println(&quot;JoSQL query run total time = &quot; + (System.currentTimeMillis() - start));
            System.out.println( &quot;JoSQL result count = &quot; + fundsResult.size() );

            // query to check that the result size found with JoSQL is ok :
            Query query2 = em.createQuery(&quot;select fund from Fund fund where fund.fundName like '%SGAM%'&quot;);
            start = System.currentTimeMillis();
            List count = query2.getResultList();
            System.out.println(&quot;JPA query run total time = &quot; + (System.currentTimeMillis() - start));
            System.out.println(&quot;JPA result count = &quot; + count.size());            

            // Display result
            int i=0;
            for (Fund f:fundsResult)
                System.out.println(i++ + &quot; = &quot; + f.getFundName());

        } catch(Exception e) {
            e.printStackTrace();
        } finally {
            em.getTransaction().commit();
            em.close();
        }

    }
</pre>
<p>In memory query with Lucene :</p>
<pre class="brush: java;">
&lt;pre&gt;    /**
     * Simple example with Lucene indexing and querying
     *
     * Output :
     *
     * Hibernate: select fund0_.FUND_ID as FUND1_1_, fund0_.ADMINISTRATOR_ID as ADMINIST2_1_, fund0_.ADVISORY_NAME as ADVISORY3_1_, fund0_.ANNUAL_AUDIT as ANNUAL4_1_, fund0_.AUDIT_FIRM as AUDIT5_1_, fund0_.auditor as auditor1_, fund0_.banker as banker1_, fund0_.CLASSIFICATION_ID as CLASSIFI8_1_, fund0_.codification as codifica9_1_, fund0_.COMM_STATUS as COMM10_1_, fund0_.COUNTRY_OF_DOMICILE_ID as COUNTRY11_1_, fund0_.DATA_VENDOR_FUND_ID as DATA12_1_, fund0_.DATA_VENDOR_ID as DATA13_1_, fund0_.deleted as deleted1_, fund0_.DISCLOSURE_ID as DISCLOSURE15_1_, fund0_.EXTCOM_AGREEMENT as EXTCOM16_1_, fund0_.FINANCIAL_AUTHORITY_ID1 as FINANCIAL17_1_, fund0_.FINANCIAL_AUTHORITY_ID2 as FINANCIAL18_1_, fund0_.FINANCIAL_AUTHORITY_ID3 as FINANCIAL19_1_, fund0_.FISCAL_YEAR_END as FISCAL20_1_, fund0_.FUND_CAPACITY as FUND21_1_, fund0_.FUND_DESCRIPTION as FUND22_1_, fund0_.FUND_NAME as FUND23_1_, fund0_.FUND_REDEMPTION_GATE_FUND_LVL as FUND24_1_, fund0_.FUND_REDEMPTION_GATE_IND_LVL as FUND25_1_, fund0_.GEOGRAPHICAL_FOCUS_ID as GEOGRAP26_1_, fund0_.inception as inception1_, fund0_.instruments as instrum28_1_, fund0_.internal as internal1_, fund0_.INVESTMENT_RESTRICTIONS as INVESTMENT30_1_, fund0_.INVESTMENT_STATUS_ID as INVESTMENT31_1_, fund0_.INVESTMENT_STRATEGY as INVESTMENT32_1_, fund0_.INVESTMENT_SUB_STATUS_ID as INVESTMENT33_1_, fund0_.ISO_CODE as ISO34_1_, fund0_.IVT_MANAGEMENT_FIRM_ID as IVT35_1_, fund0_.LAST_AUDIT as LAST36_1_, fund0_.LAST_DUE_DILIGENCE as LAST37_1_, fund0_.LEGAL_ADVISOR_ID1 as LEGAL38_1_, fund0_.LEGAL_ADVISOR_ID2 as LEGAL39_1_, fund0_.LEGAL_ADVISOR_ID3 as LEGAL40_1_, fund0_.LEGAL_ADVISOR_OFFSHORE as LEGAL41_1_, fund0_.LEGAL_COUNSEL as LEGAL42_1_, fund0_.LEGAL_DESCRIPTION as LEGAL43_1_, fund0_.LEGAL_DESCRIPTION_ID as LEGAL44_1_, fund0_.LISTED_ON_A_STOCK_EXCHANGE as LISTED45_1_, fund0_.MANAGED_ACCOUNT as MANAGED46_1_, fund0_.MANAGEMENT_FIRM_ID as MANAGEMENT47_1_, fund0_.MARKETING_NAME as MARKETING48_1_, fund0_.MASTER_FUND_ID as MASTER49_1_, fund0_.MASTER_FUND_NAME as MASTER50_1_, fund0_.OFFSHORE_NAME as OFFSHORE51_1_, fund0_.OFFSHORE_VEHICLE as OFFSHORE52_1_, fund0_.PLACEMENT_AGENT as PLACEMENT53_1_, fund0_.PRIMARY_SHARE as PRIMARY71_1_, fund0_.PTF_MANAGEMENT_FIRM_ID as PTF54_1_, fund0_.ranking as ranking1_, fund0_.REPORTING_FREQUENCY_ID as REPORTING56_1_, fund0_.REPORTING_FREQUENCY_OTHER as REPORTING57_1_, fund0_.RISK_POLICY as RISK58_1_, fund0_.SECTOR_FOCUS_ID as SECTOR59_1_, fund0_.SIDE_POCKET_ALLOWABLE as SIDE60_1_, fund0_.source as source1_, fund0_.SS_CLASSIFICATION_ID as SS62_1_, fund0_.SS_FOF_CLASSIFICATION_ID as SS63_1_, fund0_.SS_MS_CLASSIFICATION_ID as SS64_1_, fund0_.stage as stage1_, fund0_.status as status1_, fund0_.STATUS_ID as STATUS67_1_, fund0_.SUB_STRATEGY as SUB68_1_, fund0_.updated as updated1_, fund0_.updater as updater1_ from Fund fund0_
     * Collection size = 1680
     * Hibernate: select this_.FUND_ID as FUND1_1_0_, this_.ADMINISTRATOR_ID as ADMINIST2_1_0_, this_.ADVISORY_NAME as ADVISORY3_1_0_, this_.ANNUAL_AUDIT as ANNUAL4_1_0_, this_.AUDIT_FIRM as AUDIT5_1_0_, this_.auditor as auditor1_0_, this_.banker as banker1_0_, this_.CLASSIFICATION_ID as CLASSIFI8_1_0_, this_.codification as codifica9_1_0_, this_.COMM_STATUS as COMM10_1_0_, this_.COUNTRY_OF_DOMICILE_ID as COUNTRY11_1_0_, this_.DATA_VENDOR_FUND_ID as DATA12_1_0_, this_.DATA_VENDOR_ID as DATA13_1_0_, this_.deleted as deleted1_0_, this_.DISCLOSURE_ID as DISCLOSURE15_1_0_, this_.EXTCOM_AGREEMENT as EXTCOM16_1_0_, this_.FINANCIAL_AUTHORITY_ID1 as FINANCIAL17_1_0_, this_.FINANCIAL_AUTHORITY_ID2 as FINANCIAL18_1_0_, this_.FINANCIAL_AUTHORITY_ID3 as FINANCIAL19_1_0_, this_.FISCAL_YEAR_END as FISCAL20_1_0_, this_.FUND_CAPACITY as FUND21_1_0_, this_.FUND_DESCRIPTION as FUND22_1_0_, this_.FUND_NAME as FUND23_1_0_, this_.FUND_REDEMPTION_GATE_FUND_LVL as FUND24_1_0_, this_.FUND_REDEMPTION_GATE_IND_LVL as FUND25_1_0_, this_.GEOGRAPHICAL_FOCUS_ID as GEOGRAP26_1_0_, this_.inception as inception1_0_, this_.instruments as instrum28_1_0_, this_.internal as internal1_0_, this_.INVESTMENT_RESTRICTIONS as INVESTMENT30_1_0_, this_.INVESTMENT_STATUS_ID as INVESTMENT31_1_0_, this_.INVESTMENT_STRATEGY as INVESTMENT32_1_0_, this_.INVESTMENT_SUB_STATUS_ID as INVESTMENT33_1_0_, this_.ISO_CODE as ISO34_1_0_, this_.IVT_MANAGEMENT_FIRM_ID as IVT35_1_0_, this_.LAST_AUDIT as LAST36_1_0_, this_.LAST_DUE_DILIGENCE as LAST37_1_0_, this_.LEGAL_ADVISOR_ID1 as LEGAL38_1_0_, this_.LEGAL_ADVISOR_ID2 as LEGAL39_1_0_, this_.LEGAL_ADVISOR_ID3 as LEGAL40_1_0_, this_.LEGAL_ADVISOR_OFFSHORE as LEGAL41_1_0_, this_.LEGAL_COUNSEL as LEGAL42_1_0_, this_.LEGAL_DESCRIPTION as LEGAL43_1_0_, this_.LEGAL_DESCRIPTION_ID as LEGAL44_1_0_, this_.LISTED_ON_A_STOCK_EXCHANGE as LISTED45_1_0_, this_.MANAGED_ACCOUNT as MANAGED46_1_0_, this_.MANAGEMENT_FIRM_ID as MANAGEMENT47_1_0_, this_.MARKETING_NAME as MARKETING48_1_0_, this_.MASTER_FUND_ID as MASTER49_1_0_, this_.MASTER_FUND_NAME as MASTER50_1_0_, this_.OFFSHORE_NAME as OFFSHORE51_1_0_, this_.OFFSHORE_VEHICLE as OFFSHORE52_1_0_, this_.PLACEMENT_AGENT as PLACEMENT53_1_0_, this_.PRIMARY_SHARE as PRIMARY71_1_0_, this_.PTF_MANAGEMENT_FIRM_ID as PTF54_1_0_, this_.ranking as ranking1_0_, this_.REPORTING_FREQUENCY_ID as REPORTING56_1_0_, this_.REPORTING_FREQUENCY_OTHER as REPORTING57_1_0_, this_.RISK_POLICY as RISK58_1_0_, this_.SECTOR_FOCUS_ID as SECTOR59_1_0_, this_.SIDE_POCKET_ALLOWABLE as SIDE60_1_0_, this_.source as source1_0_, this_.SS_CLASSIFICATION_ID as SS62_1_0_, this_.SS_FOF_CLASSIFICATION_ID as SS63_1_0_, this_.SS_MS_CLASSIFICATION_ID as SS64_1_0_, this_.stage as stage1_0_, this_.status as status1_0_, this_.STATUS_ID as STATUS67_1_0_, this_.SUB_STRATEGY as SUB68_1_0_, this_.updated as updated1_0_, this_.updater as updater1_0_ from Fund this_ where (this_.FUND_ID in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))
     * Lucene query time = 703
     * Lucene query result size = 234
     *
     */
    public static void main(String[] args) {
        EntityManagerFactory factory = Persistence.createEntityManagerFactory(null);

        EntityManager em = factory.createEntityManager();

        em.getTransaction().begin();

        try {
            // Get all the data
            List&lt;Fund&gt; funds = em.createQuery(&quot;from Fund&quot;).getResultList();
            System.out.println(&quot;Collection size = &quot; + funds.size());

            // index fields for each fund (in our case we are just indexing the fundName field)
            FullTextEntityManager fullTextEntityManager = Search.getFullTextEntityManager(em);
            for(Fund fund : funds)
                fullTextEntityManager.index(fund);

            // Create a Lucene request to get all the funds with SGAM in its name
            MultiFieldQueryParser parser = new MultiFieldQueryParser(new String[]{&quot;fundName&quot;}, new StandardAnalyzer());
            org.apache.lucene.search.Query luceneQuery = parser.parse(&quot;SGAM&quot;);
            FullTextQuery query = fullTextEntityManager.createFullTextQuery(luceneQuery, Fund.class);

            long start = System.currentTimeMillis();
            List&lt;Fund&gt; list = query.getResultList();
            System.out.println(&quot;Lucene query time = &quot; + (System.currentTimeMillis() - start));
            System.out.println(&quot;Lucene query result size = &quot; + list.size());

            // Display result
            int i=0;
            for (Fund f:list) {
                System.out.println(i++ + &quot; = &quot; + f.getFundName());
            }

        } catch(Exception e) {
            e.printStackTrace();
        } finally {
            em.getTransaction().commit();
            em.close();
        }

    }
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yakafokon.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yakafokon.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yakafokon.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yakafokon.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yakafokon.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yakafokon.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yakafokon.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yakafokon.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yakafokon.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yakafokon.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yakafokon.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yakafokon.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yakafokon.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yakafokon.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=95&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yakafokon.wordpress.com/2008/12/17/testing-jpa-hibernate-josql-and-lucene/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/012a9490e754ad268a8f5d805eb52c0c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yakafokon</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple call to a Web Service with Excel</title>
		<link>http://yakafokon.wordpress.com/2008/12/17/simple-call-to-a-web-service-with-excel/</link>
		<comments>http://yakafokon.wordpress.com/2008/12/17/simple-call-to-a-web-service-with-excel/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 14:10:17 +0000</pubDate>
		<dc:creator>yakafokon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[vba]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://yakafokon.wordpress.com/?p=71</guid>
		<description><![CDATA[I've made a basic test calling a web service using excel vba. The xml data sent by the service is the following : &#60;Toto&#62; &#60;Titi val='2'/&#62; &#60;/Toto&#62; Looking on the net for some examples I've found this first one : Public Sub wsCall_test1() Dim objIE As Object Dim Anymore As Boolean Dim Found As Boolean [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=71&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>I've made a basic test calling a web service using excel vba.
The xml data sent by the service is the following :
<pre class="brush: xml;">
&lt;Toto&gt;
  &lt;Titi val='2'/&gt;
&lt;/Toto&gt;
</pre>
<p>Looking on the net for some examples I've found this first one :</p>
<pre class="brush: vb;">
Public Sub wsCall_test1()

Dim objIE As Object
Dim Anymore As Boolean
Dim Found As Boolean

Set objIE = CreateObject(&quot;InternetExplorer.Application&quot;)
objIE.Visible = False
objIE.Navigate &quot;http://localhost:8182/&quot;
Do While objIE.Busy: DoEvents: Loop
Do While objIE.readystate &lt;&gt; 4: DoEvents: Loop

MsgBox objIE.document.documentElement.innerText

Dim docXML As String
docXML = objIE.document.documentElement.innerText

Dim doc As DOMDocument
Set doc = New DOMDocument
MsgBox doc.loadXML(docXML)

MsgBox doc.selectSingleNode(&quot;Toto/Titi&quot;).Attributes(0).Text

End Sub
</pre>
<p>Finally it has turn out that it can be simplified to this :</p>
<pre class="brush: vb;">&lt;/pre&gt;
Public Sub wscall_test2()

Dim doc As DOMDocument
Set doc = New DOMDocument

MsgBox doc.Load(&quot;http://localhost:8182/&quot;)

MsgBox doc.XML

MsgBox doc.selectSingleNode(&quot;Toto/Titi&quot;).Attributes(0).Text

End Sub
</pre>
<p>In both test the msgbox used to output information are the following :</p>
<p><img class="aligncenter size-full wp-image-83" title="excelvba1" src="http://yakafokon.files.wordpress.com/2008/12/excelvba1.png?w=177&#038;h=107" alt="excelvba1" width="177" height="107" /></p>
<p><img class="aligncenter size-full wp-image-84" title="excelvba2" src="http://yakafokon.files.wordpress.com/2008/12/excelvba2.png?w=135&#038;h=107" alt="excelvba2" width="135" height="107" /><img class="aligncenter size-full wp-image-85" title="excelvba3" src="http://yakafokon.files.wordpress.com/2008/12/excelvba3.png?w=135&#038;h=107" alt="excelvba3" width="135" height="107" /></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yakafokon.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yakafokon.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yakafokon.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yakafokon.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yakafokon.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yakafokon.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yakafokon.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yakafokon.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yakafokon.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yakafokon.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yakafokon.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yakafokon.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yakafokon.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yakafokon.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=71&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yakafokon.wordpress.com/2008/12/17/simple-call-to-a-web-service-with-excel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/012a9490e754ad268a8f5d805eb52c0c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yakafokon</media:title>
		</media:content>

		<media:content url="http://yakafokon.files.wordpress.com/2008/12/excelvba1.png" medium="image">
			<media:title type="html">excelvba1</media:title>
		</media:content>

		<media:content url="http://yakafokon.files.wordpress.com/2008/12/excelvba2.png" medium="image">
			<media:title type="html">excelvba2</media:title>
		</media:content>

		<media:content url="http://yakafokon.files.wordpress.com/2008/12/excelvba3.png" medium="image">
			<media:title type="html">excelvba3</media:title>
		</media:content>
	</item>
		<item>
		<title>Synchronizing threads</title>
		<link>http://yakafokon.wordpress.com/2008/12/10/synchronizing-threads/</link>
		<comments>http://yakafokon.wordpress.com/2008/12/10/synchronizing-threads/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 16:21:19 +0000</pubDate>
		<dc:creator>yakafokon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[thread]]></category>

		<guid isPermaLink="false">http://yakafokon.wordpress.com/?p=47</guid>
		<description><![CDATA[To synchronize thread, use the monitoring methods. Warning : the monitoring methods are available on all the java classes in any conditions albeit calling these method outside synchronied code will throw an exception. The following example describes it : public static void main(String[] args) throws InterruptedException { Object lock = new Object(); synchronized (lock) { [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=47&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To synchronize thread, use the monitoring methods.</p>
<p>Warning : the monitoring methods are available on all the java classes in any conditions albeit calling these method outside synchronied code will throw an exception. The following example describes it :</p>
<pre class="brush: java;">
public static void main(String[] args) throws InterruptedException {
  Object lock = new Object();

  synchronized (lock) {
    System.out.println(&quot;calling a monitor method inside a synchronized block&quot;);
    lock.wait(1000);
  }

  System.out.println(&quot;calling a monitor method outside a synchronized block&quot;);
  lock.wait(1000);
}
</pre>
<p>This will lead to the following output :</p>
<p>calling a monitor method inside a synchronized block<br />
calling a monitor method outside a synchronized block<br />
Exception in thread &#8220;main&#8221; java.lang.IllegalMonitorStateException: current thread not owner<br />
at java.lang.Object.wait(Native Method)<br />
at TestThreadMonitor.main(TestThreadMonitor.java:15)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yakafokon.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yakafokon.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yakafokon.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yakafokon.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yakafokon.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yakafokon.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yakafokon.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yakafokon.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yakafokon.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yakafokon.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yakafokon.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yakafokon.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yakafokon.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yakafokon.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=47&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yakafokon.wordpress.com/2008/12/10/synchronizing-threads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/012a9490e754ad268a8f5d805eb52c0c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yakafokon</media:title>
		</media:content>
	</item>
		<item>
		<title>Thread basics</title>
		<link>http://yakafokon.wordpress.com/2008/12/10/thread-basics/</link>
		<comments>http://yakafokon.wordpress.com/2008/12/10/thread-basics/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 16:20:54 +0000</pubDate>
		<dc:creator>yakafokon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[thread]]></category>

		<guid isPermaLink="false">http://yakafokon.wordpress.com/?p=27</guid>
		<description><![CDATA[First of all the thread life cycle : (Source reference: http://www.witscale.com/scjp_studynotes/chapter8.html) There is two wayq to create a thread an run it : Directly by extending the Thread class: public class MyThread extends Thread {   @Override   public void run() {   // do some stuff here   } } To call it somewhere [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=27&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>First of all the thread life cycle :</p>
<div id="attachment_36" class="wp-caption aligncenter" style="width: 560px"><img class="size-full wp-image-36" title="threads" src="http://yakafokon.files.wordpress.com/2008/12/threads.gif?w=550&#038;h=330" alt="Thread Life Cycle" width="550" height="330" /><p class="wp-caption-text">Thread Life Cycle</p></div>
<p>(Source reference: http://www.witscale.com/scjp_studynotes/chapter8.html)</p>
<p>There is two wayq to create a thread an run it :</p>
<p>Directly by extending the Thread class:</p>
<pre class="brush: java;">
public class MyThread extends Thread {
  @Override
  public void run() {
  // do some stuff here
  }
}
</pre>
<p>To call it somewhere in you java code :</p>
<pre class="brush: java;">
new MyThread().start();
</pre>
<p>Or by implementing the Runnable interface:</p>
<pre class="brush: java;">
public class MyRunnable implements Runnable {
  Public void run() {
  // do some stuff here
  }
}
</pre>
<p>To call it somewhere in you java code :</p>
<pre class="brush: java;">
new Thread(new MyRunnable()).start();
</pre>
<p>The best practice is to use the Runnable interface, this allows you to extends a business class or other if needed and its offers a better separation (than being stuck with the Thread class).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yakafokon.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yakafokon.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yakafokon.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yakafokon.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yakafokon.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yakafokon.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yakafokon.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yakafokon.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yakafokon.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yakafokon.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yakafokon.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yakafokon.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yakafokon.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yakafokon.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yakafokon.wordpress.com&amp;blog=5703588&amp;post=27&amp;subd=yakafokon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yakafokon.wordpress.com/2008/12/10/thread-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/012a9490e754ad268a8f5d805eb52c0c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yakafokon</media:title>
		</media:content>

		<media:content url="http://yakafokon.files.wordpress.com/2008/12/threads.gif" medium="image">
			<media:title type="html">threads</media:title>
		</media:content>
	</item>
	</channel>
</rss>
