




<?xml version="1.0" encoding="UTF-8"?><feed
	xmlns="http://www.w3.org/2005/Atom"
	xmlns:thr="http://purl.org/syndication/thread/1.0"
	xml:lang="en-US"
	>
	<title type="text">jensjaeger.com</title>
	<subtitle type="text">Development on the Java platform</subtitle>

	<updated>2022-11-22T09:45:15Z</updated>

	<link rel="alternate" type="text/html" href="https://jensjaeger.com" />
	<id>https://jensjaeger.com/feed/atom/</id>
	<link rel="self" type="application/atom+xml" href="https://jensjaeger.com/feed/atom/" />

	<generator uri="https://wordpress.org/" version="6.9.4">WordPress</generator>
<icon>https://jensjaeger.com/dateien/2020/07/jens_jaeger_favicon.png</icon>
	<entry>
		<author>
			<name>Jens Jäger</name>
					</author>

		<title type="html"><![CDATA[Blog url changed to https]]></title>
		<link rel="alternate" type="text/html" href="https://jensjaeger.com/2018/05/blog-url-changed-to-https/" />

		<id>http://jensjaeger.com/?p=2034</id>
		<updated>2022-11-22T09:45:15Z</updated>
		<published>2018-05-04T14:55:47Z</published>
		<category scheme="https://jensjaeger.com" term="News" /><category scheme="https://jensjaeger.com" term="letsencrypt" /><category scheme="https://jensjaeger.com" term="security" /><category scheme="https://jensjaeger.com" term="ssl" /><category scheme="https://jensjaeger.com" term="tls" />
		<summary type="html"><![CDATA[<p>I just changed the url of this blog to https://jensjaeger.com. TLS encryption is now the default for all request to this page. It might be possible that some image links on some articles are hard coded http. If you find such an error it would be nice if you leave me comment so i can [&#8230;]</p>
The post <a href="https://jensjaeger.com/2018/05/blog-url-changed-to-https/">Blog url changed to https</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></summary>

					<content type="html" xml:base="https://jensjaeger.com/2018/05/blog-url-changed-to-https/"><![CDATA[<p>I just changed the url of this blog to https://jensjaeger.com. <a href="https://de.wikipedia.org/wiki/Transport_Layer_Security">TLS</a> encryption is now the default for all request to this page.</p>
<p>It might be possible that some image links on some articles are hard coded http. If you find such an error it would be nice if you leave me comment so i can fix it.</p>
<p>I use a free certificate from <a href="https://letsencrypt.org">Let&#8217;s Encrypt</a> to encrypt the site.</p>The post <a href="https://jensjaeger.com/2018/05/blog-url-changed-to-https/">Blog url changed to https</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></content>
		
					<link rel="replies" type="text/html" href="https://jensjaeger.com/2018/05/blog-url-changed-to-https/#comments" thr:count="4" />
			<link rel="replies" type="application/atom+xml" href="https://jensjaeger.com/2018/05/blog-url-changed-to-https/feed/atom/" thr:count="4" />
			<thr:total>4</thr:total>
			</entry>
		<entry>
		<author>
			<name>Jens Jäger</name>
					</author>

		<title type="html"><![CDATA[Format date and time in java with prettytime]]></title>
		<link rel="alternate" type="text/html" href="https://jensjaeger.com/2015/11/format-date-and-time-in-java-with-prettytime/" />

		<id>http://www.jensjaeger.com/?p=2007</id>
		<updated>2015-11-14T14:38:33Z</updated>
		<published>2015-11-14T14:38:33Z</published>
		<category scheme="https://jensjaeger.com" term="English" /><category scheme="https://jensjaeger.com" term="Java" /><category scheme="https://jensjaeger.com" term="agohumanized" /><category scheme="https://jensjaeger.com" term="date format" /><category scheme="https://jensjaeger.com" term="maven" /><category scheme="https://jensjaeger.com" term="prettytime" /><category scheme="https://jensjaeger.com" term="sbt" />
		<summary type="html"><![CDATA[<p>Prettytime is a nice java library to format a java Date()s in a nice humanized ago format, like: moments ago 2 minutes ago 13 hours ago 7 months ago 2 years ago Prettytime is localized in over 30 languages. It&#8217;s super simple to use Add the dependency to your maven pom: org.ocpsoft.prettytime prettytime 3.2.7.Final or [&#8230;]</p>
The post <a href="https://jensjaeger.com/2015/11/format-date-and-time-in-java-with-prettytime/">Format date and time in java with prettytime</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></summary>

					<content type="html" xml:base="https://jensjaeger.com/2015/11/format-date-and-time-in-java-with-prettytime/"><![CDATA[<p>Prettytime is a nice java library to format a java Date()s in a nice humanized ago format, like: </p>
<ul>
<li>moments ago</li>
<li>2 minutes ago</li>
<li>13 hours ago</li>
<li>7 months ago</li>
<li>2 years ago</li>
</ul>
<p>Prettytime is localized in <a target="_blank" href="http://www.ocpsoft.org/prettytime/#i18n">over 30 languages</a>.</p>
<h3>It&#8217;s super simple to use</h3>
<p>Add the dependency to your maven pom:</p>
<pre lang="xml">
<dependency>
   <groupid>org.ocpsoft.prettytime</groupid>
   <artifactid>prettytime</artifactid>
   <version>3.2.7.Final</version>
</dependency>
</pre>
<p>or an sbt dependency if you use an activator project like <a href="https://www.playframework.com/">play framework</a>.</p>
<pre lang="scala">
libraryDependencies += "org.ocpsoft.prettytime" % "prettytime" % "3.2.7.Final"
</pre>
<p>Then add the following static method to a helper class and call it from your json processor or your template engine.</p>
<pre lang="java">
public static String agoHumanized(final Date date, Locale locale){
   PrettyTime p = new PrettyTime(locale);
   return p.format(date);
}
</pre>
<p>Thats it!</p>
<p>You can find the code on <a target="_blank" href="https://github.com/ocpsoft/prettytime/">github</a> and the documentation on the <a href="http://www.ocpsoft.org/prettytime/">ocpsoft page</a>. Happy coding.</p>The post <a href="https://jensjaeger.com/2015/11/format-date-and-time-in-java-with-prettytime/">Format date and time in java with prettytime</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></content>
		
					<link rel="replies" type="text/html" href="https://jensjaeger.com/2015/11/format-date-and-time-in-java-with-prettytime/#comments" thr:count="0" />
			<link rel="replies" type="application/atom+xml" href="https://jensjaeger.com/2015/11/format-date-and-time-in-java-with-prettytime/feed/atom/" thr:count="0" />
			<thr:total>0</thr:total>
			</entry>
		<entry>
		<author>
			<name>Jens Jäger</name>
					</author>

		<title type="html"><![CDATA[Good-by journizer.com]]></title>
		<link rel="alternate" type="text/html" href="https://jensjaeger.com/2014/11/good-by-journizer-com/" />

		<id>http://www.jensjaeger.com/?p=1992</id>
		<updated>2014-11-03T22:19:28Z</updated>
		<published>2014-11-03T22:19:28Z</published>
		<category scheme="https://jensjaeger.com" term="English" /><category scheme="https://jensjaeger.com" term="journizer.com" /><category scheme="https://jensjaeger.com" term="startup" />
		<summary type="html"><![CDATA[<p>In 2006 I startet a travel website called journizer.com with some friends. The goal was to build the ultimative website for individual travelers. The side has some successes but never get the momentum to grow this thing to a successful startup. Our biggest problem was the vision to build the ultimative site for everything about [&#8230;]</p>
The post <a href="https://jensjaeger.com/2014/11/good-by-journizer-com/">Good-by journizer.com</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></summary>

					<content type="html" xml:base="https://jensjaeger.com/2014/11/good-by-journizer-com/"><![CDATA[<p>In 2006 I startet a travel website called journizer.com with some friends. The goal was to build the ultimative website for individual travelers. The side has some successes but never get the momentum to grow this thing to a successful startup.</p>
<p>Our biggest problem was the vision to build the ultimative site for everything about travel (Blogging, picture sharing, social network, hostel search,&#8230;) instead of doing one thing really well. If you want to start any kind of startup make sure you have the one thing in mind you wan&#8217;t to really solve for your customers. Don&#8217;t try to make everything for everybody. </p>
<p>We learned a lot and had a lot of fun with the site. But finally it&#8217;s time to say good-by</p>
<p><img fetchpriority="high" decoding="async" src="http://www.jensjaeger.com/dateien/2014/11/Bildschirmfoto-2014-11-03-um-22.53.45-620x482.png" alt="journizer.com screenshot" width="620" height="482" class="alignnone size-large wp-image-1993" srcset="https://jensjaeger.com/dateien/2014/11/Bildschirmfoto-2014-11-03-um-22.53.45-620x482.png 620w, https://jensjaeger.com/dateien/2014/11/Bildschirmfoto-2014-11-03-um-22.53.45-300x233.png 300w, https://jensjaeger.com/dateien/2014/11/Bildschirmfoto-2014-11-03-um-22.53.45.png 1582w" sizes="(max-width: 620px) 100vw, 620px" /></p>The post <a href="https://jensjaeger.com/2014/11/good-by-journizer-com/">Good-by journizer.com</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></content>
		
					<link rel="replies" type="text/html" href="https://jensjaeger.com/2014/11/good-by-journizer-com/#comments" thr:count="2" />
			<link rel="replies" type="application/atom+xml" href="https://jensjaeger.com/2014/11/good-by-journizer-com/feed/atom/" thr:count="2" />
			<thr:total>2</thr:total>
			</entry>
		<entry>
		<author>
			<name>Jens Jäger</name>
					</author>

		<title type="html"><![CDATA[Blog split]]></title>
		<link rel="alternate" type="text/html" href="https://jensjaeger.com/2014/08/blog-split/" />

		<id>http://www.jensjaeger.com/?p=1972</id>
		<updated>2014-08-27T20:53:13Z</updated>
		<published>2014-08-27T20:53:13Z</published>
		<category scheme="https://jensjaeger.com" term="News" /><category scheme="https://jensjaeger.com" term="blog" /><category scheme="https://jensjaeger.com" term="business" /><category scheme="https://jensjaeger.com" term="german" /><category scheme="https://jensjaeger.com" term="investment" />
		<summary type="html"><![CDATA[<p>This blog will be splitted into two blogs. Here (jensjaeger.com) I will keep posting technical stuff about developing web applications with Java, Scala, Ruby, Javascript and Playframework. Some other geeky stuff might come along. My new blog (jensjaeger.de) will be in german about business and investment. I also removed the german stuff from here and [&#8230;]</p>
The post <a href="https://jensjaeger.com/2014/08/blog-split/">Blog split</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></summary>

					<content type="html" xml:base="https://jensjaeger.com/2014/08/blog-split/"><![CDATA[<p>This blog will be splitted into two blogs. Here (<a href="http://www.jensjaeger.com">jensjaeger.com</a>) I will keep posting technical stuff about developing web applications with Java, Scala, Ruby, Javascript and Playframework. Some other geeky stuff might come along.</p>
<p>My new blog (<a href="http://jensjaeger.de">jensjaeger.de</a>) will be in german about business and investment. </p>
<p>I also removed the german stuff from here and moved all the old german posts to <a href="http://jensjaeger.de">jensjaeger.de</a>. If you click on a link to a german post, you might be redirected to jensjaeger.de.</p>
<p>If you speek german you&#8217;re welcome to have a look at the all new <a href="http://jensjaeger.de">jensjaeger.de</a>. You might also want to follow my german <a href="http://jensjaeger.de/feed">Rss-feed</a> or sign up for my shiny new <a href="http://jensjaeger.de/anmelden/">newsletter</a>.</p>
<h3>Why two blogs?</h3>
<p>When I started blogging I started in german. After some time I realized software development stuff is easier written in english. This is because allmost all resources are already in english and programming code has english keywords anyway. </p>
<p>Then I switched to write blogposts in english. That was fine. But having two languages in one blog is kind of ugly. I never cared much until I decided to write more about business an investing topics. The problem with this topics is, some parts like tax or law stuff is really country specific. A lot of investment or business advise I can give works only in germany. So I makes perfectly sense to write those posts in german.</p>
<p>This was the point I decided to split my blog into two and make this one english only.</p>The post <a href="https://jensjaeger.com/2014/08/blog-split/">Blog split</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></content>
		
					<link rel="replies" type="text/html" href="https://jensjaeger.com/2014/08/blog-split/#comments" thr:count="0" />
			<link rel="replies" type="application/atom+xml" href="https://jensjaeger.com/2014/08/blog-split/feed/atom/" thr:count="0" />
			<thr:total>0</thr:total>
			</entry>
		<entry>
		<author>
			<name>Jens Jäger</name>
					</author>

		<title type="html"><![CDATA[New page for my consulting company]]></title>
		<link rel="alternate" type="text/html" href="https://jensjaeger.com/2014/01/new-page-for-my-consulting-company/" />

		<id>http://www.jensjaeger.com/?p=1864</id>
		<updated>2014-01-22T21:21:29Z</updated>
		<published>2014-01-22T21:21:29Z</published>
		<category scheme="https://jensjaeger.com" term="English" /><category scheme="https://jensjaeger.com" term="bootstrap" /><category scheme="https://jensjaeger.com" term="company" /><category scheme="https://jensjaeger.com" term="consulting" /><category scheme="https://jensjaeger.com" term="jensjaeger consulting" /><category scheme="https://jensjaeger.com" term="responsive" />
		<summary type="html"><![CDATA[<p>I just build a new german marketing page for my consulting company. It&#8217;s build with bootstrap and is much nicer than the old one, and has a full responsive design. Here is the before and after comparison:</p>
The post <a href="https://jensjaeger.com/2014/01/new-page-for-my-consulting-company/">New page for my consulting company</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></summary>

					<content type="html" xml:base="https://jensjaeger.com/2014/01/new-page-for-my-consulting-company/"><![CDATA[<p>I just build a new german marketing page for <a href="http://jensjaegerconsulting.com">my consulting company</a>. It&#8217;s build with <a href="http://getbootstrap.com">bootstrap</a> and is much nicer than the old one, and has a full responsive design. Here is the before and after comparison:</p>
<p><a href="http://www.jensjaeger.com/dateien/2011/06/after.png" target="_blank"><img decoding="async" src="http://www.jensjaeger.com/dateien/2011/06/after-300x198.png" alt="after" title="after" width="300" height="198" class="alignleft size-medium wp-image-1252" srcset="https://jensjaeger.com/dateien/2011/06/after-300x198.png 300w, https://jensjaeger.com/dateien/2011/06/after-1024x678.png 1024w, https://jensjaeger.com/dateien/2011/06/after.png 1329w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><a href="http://www.jensjaeger.com/dateien/2014/01/jensjaegerconsulting.png"><img decoding="async" src="http://www.jensjaeger.com/dateien/2014/01/jensjaegerconsulting-300x213.png" alt="jensjaegerconsulting" width="300" height="213" class="alignright size-medium wp-image-1866" srcset="https://jensjaeger.com/dateien/2014/01/jensjaegerconsulting-300x213.png 300w, https://jensjaeger.com/dateien/2014/01/jensjaegerconsulting-620x441.png 620w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><br style="clear:both;"/></p>The post <a href="https://jensjaeger.com/2014/01/new-page-for-my-consulting-company/">New page for my consulting company</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></content>
		
					<link rel="replies" type="text/html" href="https://jensjaeger.com/2014/01/new-page-for-my-consulting-company/#comments" thr:count="0" />
			<link rel="replies" type="application/atom+xml" href="https://jensjaeger.com/2014/01/new-page-for-my-consulting-company/feed/atom/" thr:count="0" />
			<thr:total>0</thr:total>
			</entry>
		<entry>
		<author>
			<name>Jens Jäger</name>
					</author>

		<title type="html"><![CDATA[Thoughts I took home from ping conference]]></title>
		<link rel="alternate" type="text/html" href="https://jensjaeger.com/2014/01/thoughts-i-took-home-from-ping-conference/" />

		<id>http://www.jensjaeger.com/?p=1888</id>
		<updated>2014-01-17T21:36:31Z</updated>
		<published>2014-01-17T18:22:37Z</published>
		<category scheme="https://jensjaeger.com" term="English" /><category scheme="https://jensjaeger.com" term="conference" /><category scheme="https://jensjaeger.com" term="free monad" /><category scheme="https://jensjaeger.com" term="functional programming" /><category scheme="https://jensjaeger.com" term="Java" /><category scheme="https://jensjaeger.com" term="play" /><category scheme="https://jensjaeger.com" term="Scala" />
		<summary type="html"><![CDATA[<p>Here are some thoughts I took home from ping conference: Future applications will have more needs for functional programming. This demand is driven by async userinterfaces and data streaming over http from different sources. Think of an application streaming the realtime positions of cars to a map. Maybe a taxi search. For me it&#8217;s not [&#8230;]</p>
The post <a href="https://jensjaeger.com/2014/01/thoughts-i-took-home-from-ping-conference/">Thoughts I took home from ping conference</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></summary>

					<content type="html" xml:base="https://jensjaeger.com/2014/01/thoughts-i-took-home-from-ping-conference/"><![CDATA[<p>Here are some thoughts I took home from <a href="http://www.ping-conf.com">ping conference</a>:</p>
<ul>
<li>Future applications will have more needs for functional programming. This demand is driven by async userinterfaces and data streaming over http from different sources. Think of an application streaming the realtime positions of cars to a map. Maybe a taxi search.</li>
<li>
For me it&#8217;s not sure if the lambda functions for java 8 will be a door opener to bring more people to scala. Or will java lambda with some additional libraries good enough to not switch to scala?
</li>
<li>
There is a new javascript mvc framework every week. It will need a long time if ever until we have a mvc framework with a strong position like jQuery today. If you think back some years this was the same with javascript libaries, today jQuery is everywhere.
</li>
<li>
Almost every speaker at the conference uses IntelliJ on a Mac. There is probably a reason for that.
</li>
<li>To be prepared for future functional programming challenges I should read the <a href="http://mitpress.mit.edu/sicp/">wizard book</a> again and learn about <a href="http://www.haskell.org/haskellwiki/Free_monad">free monads</a>.</li>
</ul>
<p><img loading="lazy" decoding="async" src="http://www.jensjaeger.com/dateien/2014/01/playconf-620x465.jpg" alt="playconf" width="620" height="465" class="alignnone size-large wp-image-1890" srcset="https://jensjaeger.com/dateien/2014/01/playconf-620x465.jpg 620w, https://jensjaeger.com/dateien/2014/01/playconf-300x225.jpg 300w" sizes="auto, (max-width: 620px) 100vw, 620px" /></p>
<p>All over a great conference and really worth the travel. Also budapest is really a nice city to travel to. </p>The post <a href="https://jensjaeger.com/2014/01/thoughts-i-took-home-from-ping-conference/">Thoughts I took home from ping conference</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></content>
		
					<link rel="replies" type="text/html" href="https://jensjaeger.com/2014/01/thoughts-i-took-home-from-ping-conference/#comments" thr:count="0" />
			<link rel="replies" type="application/atom+xml" href="https://jensjaeger.com/2014/01/thoughts-i-took-home-from-ping-conference/feed/atom/" thr:count="0" />
			<thr:total>0</thr:total>
			</entry>
		<entry>
		<author>
			<name>Jens Jäger</name>
					</author>

		<title type="html"><![CDATA[Impressions from ping conf budapest]]></title>
		<link rel="alternate" type="text/html" href="https://jensjaeger.com/2014/01/impressions-from-ping-conf-budapest/" />

		<id>http://www.jensjaeger.com/?p=1870</id>
		<updated>2014-01-17T15:21:39Z</updated>
		<published>2014-01-17T15:21:39Z</published>
		<category scheme="https://jensjaeger.com" term="English" /><category scheme="https://jensjaeger.com" term="budapest" /><category scheme="https://jensjaeger.com" term="conference" /><category scheme="https://jensjaeger.com" term="functional programming" /><category scheme="https://jensjaeger.com" term="Java" /><category scheme="https://jensjaeger.com" term="pingconf" /><category scheme="https://jensjaeger.com" term="Play Framework" /><category scheme="https://jensjaeger.com" term="Scala" />
		<summary type="html"><![CDATA[<p>Here are some impressions from ping conference budapest. Great talks on play framework, scala and functional programming.</p>
The post <a href="https://jensjaeger.com/2014/01/impressions-from-ping-conf-budapest/">Impressions from ping conf budapest</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></summary>

					<content type="html" xml:base="https://jensjaeger.com/2014/01/impressions-from-ping-conf-budapest/"><![CDATA[<p>Here are some impressions from <a href="http://www.ping-conf.com" title="Ping Conf Play Edition">ping conference budapest</a>. Great talks on play framework, scala and functional programming.</p>
<p><img loading="lazy" decoding="async" src="http://www.jensjaeger.com/dateien/2014/01/IMG_1341-620x465.jpg" alt="IMG_1341" width="620" height="465" class="alignnone size-large wp-image-1872" srcset="https://jensjaeger.com/dateien/2014/01/IMG_1341-620x465.jpg 620w, https://jensjaeger.com/dateien/2014/01/IMG_1341-300x225.jpg 300w, https://jensjaeger.com/dateien/2014/01/IMG_1341.jpg 640w" sizes="auto, (max-width: 620px) 100vw, 620px" /></p>
<p><img loading="lazy" decoding="async" src="http://www.jensjaeger.com/dateien/2014/01/IMG_1402-620x620.jpg" alt="IMG_1402" width="620" height="620" class="alignnone size-large wp-image-1879" srcset="https://jensjaeger.com/dateien/2014/01/IMG_1402-620x620.jpg 620w, https://jensjaeger.com/dateien/2014/01/IMG_1402-150x150.jpg 150w, https://jensjaeger.com/dateien/2014/01/IMG_1402-300x300.jpg 300w, https://jensjaeger.com/dateien/2014/01/IMG_1402.jpg 640w" sizes="auto, (max-width: 620px) 100vw, 620px" /></p>
<p><img loading="lazy" decoding="async" src="http://www.jensjaeger.com/dateien/2014/01/IMG_1421-620x465.jpg" alt="IMG_1421" width="620" height="465" class="alignnone size-large wp-image-1880" srcset="https://jensjaeger.com/dateien/2014/01/IMG_1421-620x465.jpg 620w, https://jensjaeger.com/dateien/2014/01/IMG_1421-300x225.jpg 300w, https://jensjaeger.com/dateien/2014/01/IMG_1421.jpg 640w" sizes="auto, (max-width: 620px) 100vw, 620px" /></p>
<p><img loading="lazy" decoding="async" src="http://www.jensjaeger.com/dateien/2014/01/IMG_1447-620x620.jpg" alt="IMG_1447" width="620" height="620" class="alignnone size-large wp-image-1881" srcset="https://jensjaeger.com/dateien/2014/01/IMG_1447-620x620.jpg 620w, https://jensjaeger.com/dateien/2014/01/IMG_1447-150x150.jpg 150w, https://jensjaeger.com/dateien/2014/01/IMG_1447-300x300.jpg 300w, https://jensjaeger.com/dateien/2014/01/IMG_1447.jpg 640w" sizes="auto, (max-width: 620px) 100vw, 620px" /></p>
<p><img loading="lazy" decoding="async" src="http://www.jensjaeger.com/dateien/2014/01/IMG_1390-620x465.jpg" alt="IMG_1390" width="620" height="465" class="alignnone size-large wp-image-1877" srcset="https://jensjaeger.com/dateien/2014/01/IMG_1390-620x465.jpg 620w, https://jensjaeger.com/dateien/2014/01/IMG_1390-300x225.jpg 300w, https://jensjaeger.com/dateien/2014/01/IMG_1390.jpg 640w" sizes="auto, (max-width: 620px) 100vw, 620px" /></p>
<p><img loading="lazy" decoding="async" src="http://www.jensjaeger.com/dateien/2014/01/IMG_1396-620x620.jpg" alt="IMG_1396" width="620" height="620" class="alignnone size-large wp-image-1878" srcset="https://jensjaeger.com/dateien/2014/01/IMG_1396-620x620.jpg 620w, https://jensjaeger.com/dateien/2014/01/IMG_1396-150x150.jpg 150w, https://jensjaeger.com/dateien/2014/01/IMG_1396-300x300.jpg 300w, https://jensjaeger.com/dateien/2014/01/IMG_1396.jpg 640w" sizes="auto, (max-width: 620px) 100vw, 620px" /></p>
<p><img loading="lazy" decoding="async" src="http://www.jensjaeger.com/dateien/2014/01/IMG_1353-620x465.jpg" alt="IMG_1353" width="620" height="465" class="alignnone size-large wp-image-1874" srcset="https://jensjaeger.com/dateien/2014/01/IMG_1353-620x465.jpg 620w, https://jensjaeger.com/dateien/2014/01/IMG_1353-300x225.jpg 300w, https://jensjaeger.com/dateien/2014/01/IMG_1353.jpg 640w" sizes="auto, (max-width: 620px) 100vw, 620px" /></p>
<p><img loading="lazy" decoding="async" src="http://www.jensjaeger.com/dateien/2014/01/IMG_1344-620x465.jpg" alt="IMG_1344" width="620" height="465" class="alignnone size-large wp-image-1873" srcset="https://jensjaeger.com/dateien/2014/01/IMG_1344-620x465.jpg 620w, https://jensjaeger.com/dateien/2014/01/IMG_1344-300x225.jpg 300w, https://jensjaeger.com/dateien/2014/01/IMG_1344.jpg 640w" sizes="auto, (max-width: 620px) 100vw, 620px" /></p>
<p><img loading="lazy" decoding="async" src="http://www.jensjaeger.com/dateien/2014/01/IMG_1358-620x465.jpg" alt="IMG_1358" width="620" height="465" class="alignnone size-large wp-image-1875" srcset="https://jensjaeger.com/dateien/2014/01/IMG_1358-620x465.jpg 620w, https://jensjaeger.com/dateien/2014/01/IMG_1358-300x225.jpg 300w, https://jensjaeger.com/dateien/2014/01/IMG_1358.jpg 640w" sizes="auto, (max-width: 620px) 100vw, 620px" /></p>
<p><img loading="lazy" decoding="async" src="http://www.jensjaeger.com/dateien/2014/01/IMG_1334-620x465.jpg" alt="IMG_1334" width="620" height="465" class="alignnone size-large wp-image-1871" srcset="https://jensjaeger.com/dateien/2014/01/IMG_1334-620x465.jpg 620w, https://jensjaeger.com/dateien/2014/01/IMG_1334-300x225.jpg 300w, https://jensjaeger.com/dateien/2014/01/IMG_1334.jpg 640w" sizes="auto, (max-width: 620px) 100vw, 620px" /></p>The post <a href="https://jensjaeger.com/2014/01/impressions-from-ping-conf-budapest/">Impressions from ping conf budapest</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></content>
		
					<link rel="replies" type="text/html" href="https://jensjaeger.com/2014/01/impressions-from-ping-conf-budapest/#comments" thr:count="0" />
			<link rel="replies" type="application/atom+xml" href="https://jensjaeger.com/2014/01/impressions-from-ping-conf-budapest/feed/atom/" thr:count="0" />
			<thr:total>0</thr:total>
			</entry>
		<entry>
		<author>
			<name>Jens Jäger</name>
					</author>

		<title type="html"><![CDATA[JaxWS with self signed certificates]]></title>
		<link rel="alternate" type="text/html" href="https://jensjaeger.com/2013/12/jaxws-with-self-signed-certificates/" />

		<id>http://www.jensjaeger.com/?p=1859</id>
		<updated>2013-12-31T16:51:25Z</updated>
		<published>2013-12-31T16:51:25Z</published>
		<category scheme="https://jensjaeger.com" term="English" /><category scheme="https://jensjaeger.com" term="Java" /><category scheme="https://jensjaeger.com" term="JaxWS" /><category scheme="https://jensjaeger.com" term="soap" /><category scheme="https://jensjaeger.com" term="ssl" /><category scheme="https://jensjaeger.com" term="SSLEngine problem" /><category scheme="https://jensjaeger.com" term="SSLHandshakeException" /><category scheme="https://jensjaeger.com" term="webservice" />
		<summary type="html"><![CDATA[<p>Self signed certificates are common, especially on testservers. The java default solution to add the certificate to every developers and buildservers java vm is a pain in the ass. For the play WS api there is an easy workaround. To use soap webservices with JaxWS and self signed certificates I found SSLUtilities.java on Srđan Šrepflers [&#8230;]</p>
The post <a href="https://jensjaeger.com/2013/12/jaxws-with-self-signed-certificates/">JaxWS with self signed certificates</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></summary>

					<content type="html" xml:base="https://jensjaeger.com/2013/12/jaxws-with-self-signed-certificates/"><![CDATA[<p>Self signed certificates are common, especially on testservers. The java default solution to add the certificate to every developers and buildservers java vm is a pain in the ass. For the play WS api there is an <a href="http://www.jensjaeger.com/2013/12/play-2-x-ws-api-and-self-signed-certificates/">easy workaround</a>. </p>
<p>To use soap webservices with JaxWS and self signed certificates I found <a href="https://gist.github.com/jensjaeger/8197478">SSLUtilities.java</a> on <a href="http://schrepfler.blogspot.com.br/2009/06/relaxing-ssl-validation-for-jaxws.html">Srđan Šrepflers Blog</a>.</p>
<p>To use it you have add the following static calls to the class with the webservice call:</p>
<pre lang="java">
    static {
        SSLUtilities.trustAllHostnames();
        SSLUtilities.trustAllHttpsCertificates();
    }
</pre>The post <a href="https://jensjaeger.com/2013/12/jaxws-with-self-signed-certificates/">JaxWS with self signed certificates</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></content>
		
					<link rel="replies" type="text/html" href="https://jensjaeger.com/2013/12/jaxws-with-self-signed-certificates/#comments" thr:count="0" />
			<link rel="replies" type="application/atom+xml" href="https://jensjaeger.com/2013/12/jaxws-with-self-signed-certificates/feed/atom/" thr:count="0" />
			<thr:total>0</thr:total>
			</entry>
		<entry>
		<author>
			<name>Jens Jäger</name>
					</author>

		<title type="html"><![CDATA[Books read in 2013]]></title>
		<link rel="alternate" type="text/html" href="https://jensjaeger.com/2013/12/books-read-in-2013/" />

		<id>http://www.jensjaeger.com/?p=1852</id>
		<updated>2013-12-31T15:48:27Z</updated>
		<published>2013-12-31T15:48:27Z</published>
		<category scheme="https://jensjaeger.com" term="English" /><category scheme="https://jensjaeger.com" term="audiobooks" /><category scheme="https://jensjaeger.com" term="books" /><category scheme="https://jensjaeger.com" term="ebook" /><category scheme="https://jensjaeger.com" term="reading" />
		<summary type="html"><![CDATA[<p>I try to make it a habit to read/listen to 2 business or personal education related books each month. I finally finished the last one today. Here is my read list for 2013 in chronological order: Eat that frog ( audio book ) Business Fiction ( book ) The magic of thinking big ( audio [&#8230;]</p>
The post <a href="https://jensjaeger.com/2013/12/books-read-in-2013/">Books read in 2013</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></summary>

					<content type="html" xml:base="https://jensjaeger.com/2013/12/books-read-in-2013/"><![CDATA[<p>I try to make it a habit to read/listen to 2 business or personal education related books each month. I finally finished the last one today. Here is my read list for 2013 in chronological order:</p>
<ul>
<li><a href="http://www.amazon.de/Eat-That-Frog-Great-Procrastinating/dp/1576754227">Eat that frog</a> ( audio book ) </li>
<li><a href="http://www.amazon.de/gp/product/3802938674">Business Fiction</a> ( book ) </li>
<li><a href="http://www.amazon.de/The-Magic-Of-Thinking-Big/dp/1416511555/">The magic of thinking big</a> ( audio book ) </li>
<li><a href="http://www.amazon.com/Think-Grow-Rich-Napoleon-Hill/dp/0143143743">Think and Grow Rich</a> ( audio book ) </li>
<li><a href="http://www.amazon.com/Power-Positive-Thinking-Norman-Vincent/dp/0671581864">The Power of Positive Thinking</a> ( audio book ) </li>
<li><a href="http://www.amazon.de/dp/0446678791">Steve Jobs. Die autorisierte Biografie des Apple-Gr&uuml;nders</a> ( audio book ) </li>
<li><a href="http://www.amazon.de/dp/0446678791">Free Agent Nation: The Future of Working for Yourself</a> ( audio book ) </li>
<li><a href="http://nathanbarry.com/webapps/">Designing Web Applications</a> ( Pdf ) </li>
<li><a href="http://www.amazon.de/Start-Why-Leaders-Inspire-Everyone/dp/1591846447/">Start with Why</a> ( audio book ) </li>
<li><a href="http://www.amazon.de/bücher/dp/3593393492">Glückskinder</a> ( audio book ) </li>
<li><a href="http://www.amazon.de/Sale-Die-neuen-Verkäufer/dp/B003D7AZX4">Sale. Die neuen Verk&auml;ufer</a> ( audio book ) </li>
<li><a href="http://www.amazon.de/bücher/dp/1936719118">Anything You Want</a> ( audio book ) </li>
<li><a href="http://www.amazon.de/Do-Work-Steven-Pressfield/dp/1936719010">Do the work</a> ( audio book ) </li>
<li><a href="http://www.amazon.de/Poke-Box-Seth-Godin/dp/1936719002">Poke the Box</a> ( audio book ) </li>
<li><a href="http://www.amazon.de/Erfolgsgeheimnis-Führungskultur-Bilanz-eines-Unternehmers/dp/3934350089/">Erfolgsgeheimnis F&uuml;hrungskultur: Bilanz eines Unternehmers</a> ( book ) </li>
<li><a href="http://www.amazon.de/Investment-Punk-Warum-schuftet-werden/dp/3990010085">Investment Punk</a> ( book ) </li>
<li><a href="http://www.amazon.de/The-Millionaire-Next-Door-Surprising/dp/0743517822">The Millionaire Next Door</a> ( audio book ) </li>
<li><a href="http://www.amazon.de/Outliers-Story-Success-Malcolm-Gladwell/dp/0316056286">Outliers</a> ( audio book ) </li>
<li><a href="http://www.amazon.de/Der-A-Quotient-Theorie-Praxis-Arschlöchern/dp/3861505525">Der A-Quotient</a> ( book ) </li>
<li><a href="http://www.manning.com/leroux/">Play for Java</a> ( ebook ) </li>
<li><a href="http://www.amazon.de/The-Dukan-Diet-Dr-Pierre-ebook/dp/B003Q6CUAI">Die Dukan Di&auml;t</a> ( ebook ) </li>
<li><a href="http://www.amazon.de/59-Seconds-Think-little-change/dp/0330511602">59 Seconds</a> ( audio book ) </li>
<li><a href="http://www.amazon.de/The-Power-Habit-What-Change/dp/1847946240">The Power of Habit</a> ( audio book ) </li>
<li><a href="http://www.amazon.de/Der-Pragmatische-Programmierer-David-Thomas/dp/3446223096">Der Pragmatische Programmierer</a> ( book ) </li>
</ul>
<p>As you can see, the majority are audiobooks. I try to always listen to a audio book when driving or workout.</p>The post <a href="https://jensjaeger.com/2013/12/books-read-in-2013/">Books read in 2013</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></content>
		
					<link rel="replies" type="text/html" href="https://jensjaeger.com/2013/12/books-read-in-2013/#comments" thr:count="0" />
			<link rel="replies" type="application/atom+xml" href="https://jensjaeger.com/2013/12/books-read-in-2013/feed/atom/" thr:count="0" />
			<thr:total>0</thr:total>
			</entry>
		<entry>
		<author>
			<name>Jens Jäger</name>
					</author>

		<title type="html"><![CDATA[Join example for JPA finder]]></title>
		<link rel="alternate" type="text/html" href="https://jensjaeger.com/2013/12/join-example-for-jpa-finder/" />

		<id>http://www.jensjaeger.com/?p=1844</id>
		<updated>2013-12-31T13:56:23Z</updated>
		<published>2013-12-31T13:56:23Z</published>
		<category scheme="https://jensjaeger.com" term="English" /><category scheme="https://jensjaeger.com" term="Java" /><category scheme="https://jensjaeger.com" term="join" /><category scheme="https://jensjaeger.com" term="JPA" /><category scheme="https://jensjaeger.com" term="Play Framework" /><category scheme="https://jensjaeger.com" term="Play4JPA" />
		<summary type="html"><![CDATA[<p>The JPA finder for play 2 works with joins as well. Imagine you have a Task model with a creator: @Entity(name = "tasks") public class Task extends Model { @ManyToOne public User creator; } referenced to a User model with a name: @Entity(name = "users") public class User extends Model< User> { public String name; [&#8230;]</p>
The post <a href="https://jensjaeger.com/2013/12/join-example-for-jpa-finder/">Join example for JPA finder</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></summary>

					<content type="html" xml:base="https://jensjaeger.com/2013/12/join-example-for-jpa-finder/"><![CDATA[<p>The <a href="http://www.jensjaeger.com/2013/12/a-ebean-like-finder-for-jpa/">JPA finder</a> for <a href="http://www.jensjaeger.com/2013/11/play-framework-2-ebean-vs-jpa/">play 2</a> works with joins as well.</p>
<p>Imagine you have a Task model with a creator:</p>
<pre lang="java">
@Entity(name = "tasks")
public class Task extends Model {
    @ManyToOne
    public User creator;
}
</pre>
<p>referenced to a User model with a name:</p>
<pre lang="java">
@Entity(name = "users")
public class User extends Model< User> {
    public String name;
}
</pre>
<p>You can write a method to get all Task for a creator username by joining on creator and access the user fields with the creator.field syntax:</p>
<pre lang="java">
public static List< Task> findByCreatorName(String creatorName){
   return Task.query().join("creator").eq("creator.name", creatorName).findList();
}
</pre>
<p>The source code for this example with unit tests is pushed to <a href="https://github.com/jensjaeger/play4jpa/blob/master/app/models/Task.java">Play4Jpa</a></p>The post <a href="https://jensjaeger.com/2013/12/join-example-for-jpa-finder/">Join example for JPA finder</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></content>
		
					<link rel="replies" type="text/html" href="https://jensjaeger.com/2013/12/join-example-for-jpa-finder/#comments" thr:count="0" />
			<link rel="replies" type="application/atom+xml" href="https://jensjaeger.com/2013/12/join-example-for-jpa-finder/feed/atom/" thr:count="0" />
			<thr:total>0</thr:total>
			</entry>
		<entry>
		<author>
			<name>Jens Jäger</name>
					</author>

		<title type="html"><![CDATA[A generic helper for database related tests with play 2 and JPA]]></title>
		<link rel="alternate" type="text/html" href="https://jensjaeger.com/2013/12/a-generic-helper-for-database-related-tests-with-play-2-and-jpa/" />

		<id>http://www.jensjaeger.com/?p=1832</id>
		<updated>2013-12-31T12:25:34Z</updated>
		<published>2013-12-31T12:23:20Z</published>
		<category scheme="https://jensjaeger.com" term="English" /><category scheme="https://jensjaeger.com" term="fixy" /><category scheme="https://jensjaeger.com" term="Java" /><category scheme="https://jensjaeger.com" term="JPA" /><category scheme="https://jensjaeger.com" term="ModelTest" /><category scheme="https://jensjaeger.com" term="Play Framework" /><category scheme="https://jensjaeger.com" term="Play4JPA" /><category scheme="https://jensjaeger.com" term="Unittest" />
		<summary type="html"><![CDATA[<p>All your database related unit tests for a play 2 java application have to handle the fakeApplication startup, load an fresh in memory database and load the test related fixtures. You need fixy and this helper to do the trick: public class ModelTest { public FakeApplication app; public Fixy fixtures; EntityManager em = null; EntityTransaction [&#8230;]</p>
The post <a href="https://jensjaeger.com/2013/12/a-generic-helper-for-database-related-tests-with-play-2-and-jpa/">A generic helper for database related tests with play 2 and JPA</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></summary>

					<content type="html" xml:base="https://jensjaeger.com/2013/12/a-generic-helper-for-database-related-tests-with-play-2-and-jpa/"><![CDATA[<p>All your database related unit tests for a <a href="http://www.jensjaeger.com/2013/11/play-framework-2-ebean-vs-jpa/">play 2 java</a> application have to handle the <a href="http://www.playframework.com/documentation/2.2.1/api/java/play/test/FakeApplication.html">fakeApplication</a> startup, load an fresh <a href="http://www.playframework.com/documentation/2.2.1/api/java/play/test/Helpers.html#inMemoryDatabase()">in memory database</a> and load the test related fixtures. You need <a href="http://www.jensjaeger.com/2013/12/yaml-fixtures-for-play-2/">fixy</a> and this helper to do the trick:</p>
<pre lang="java">
public class ModelTest {

    public FakeApplication app;
    public Fixy fixtures;
    EntityManager em = null;
    EntityTransaction tx = null;

    @Before
    public void beforeEachTest() {
        startFakeApp();
        loadFixtures();
        openTransaction();
    }

    @After
    public void afterEachTest(){
        closeTransaction();
        stopFakeApp();
    }

    // template method to load fixtures
    public List< String> fixturesToLoad() { return new ArrayList< String>(); }

    private void startFakeApp() {
        app = Helpers.fakeApplication(Helpers.inMemoryDatabase());
        Helpers.start(app);
    }

    private void stopFakeApp(){
        Helpers.stop(app);
    }

    private void openTransaction() {
        em = JPA.em("default");
        JPA.bindForCurrentThread(em);
        tx = em.getTransaction();
        tx.begin();
    }

    private void closeTransaction() {
        if(tx != null) {
            if (tx.isActive()){
                if(tx.getRollbackOnly()) {
                    tx.rollback();
                } else {
                    tx.commit();
                }
            }

        }
        JPA.bindForCurrentThread(null);
        if(em != null) {
            em.close();
        }
    }

    private void loadFixtures() {
        openTransaction();
        fixtures = new JpaFixyBuilder(JPA.em()).build();
        fixtures.load(addPathAndPrefix(fixturesToLoad()));
        closeTransaction();
    }

    private static String[] addPathAndPrefix(List< String> names){
        List< String> fixtureNames = new ArrayList<>();
        for (String name : names){
            fixtureNames.add("fixtures/" + name + ".yaml");
        }
        return fixtureNames.toArray(new String[0]);
    }
}
</pre>
<p>To use the helper you just have to extend from ModelTest and override the fixturesToLoad method:</p>
<pre lang="java">
public class TaskTest extends ModelTest {

    @Override
    public List< String> fixturesToLoad() {
        return Arrays.asList("tasks");
    }

    @Test
    public void testFindByName(){
        Task task = Task.findByName("Task 1");
        assertEquals("Task 1", task.name);
    }
}
</pre>
<p>The tasks.yaml loaded in fixturesToLoad must be placed in the conf/fixtures folder of the play application. </p>
<p>The source code is pushed to <a href="https://github.com/jensjaeger/play4jpa/blob/master/test/helper/ModelTest.java">Play4Jpa repo</a> on github.</p>The post <a href="https://jensjaeger.com/2013/12/a-generic-helper-for-database-related-tests-with-play-2-and-jpa/">A generic helper for database related tests with play 2 and JPA</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></content>
		
					<link rel="replies" type="text/html" href="https://jensjaeger.com/2013/12/a-generic-helper-for-database-related-tests-with-play-2-and-jpa/#comments" thr:count="0" />
			<link rel="replies" type="application/atom+xml" href="https://jensjaeger.com/2013/12/a-generic-helper-for-database-related-tests-with-play-2-and-jpa/feed/atom/" thr:count="0" />
			<thr:total>0</thr:total>
			</entry>
		<entry>
		<author>
			<name>Jens Jäger</name>
					</author>

		<title type="html"><![CDATA[Yaml-Fixtures for play 2]]></title>
		<link rel="alternate" type="text/html" href="https://jensjaeger.com/2013/12/yaml-fixtures-for-play-2/" />

		<id>http://www.jensjaeger.com/?p=1817</id>
		<updated>2013-12-30T22:40:37Z</updated>
		<published>2013-12-30T22:40:37Z</published>
		<category scheme="https://jensjaeger.com" term="English" /><category scheme="https://jensjaeger.com" term="fixture" /><category scheme="https://jensjaeger.com" term="fixtures" /><category scheme="https://jensjaeger.com" term="fixy" /><category scheme="https://jensjaeger.com" term="JPA" /><category scheme="https://jensjaeger.com" term="Play Framework" /><category scheme="https://jensjaeger.com" term="Play4JPA" /><category scheme="https://jensjaeger.com" term="yaml" />
		<summary type="html"><![CDATA[<p>Fixtures is a fancy word for sample data. Fixtures allow you to populate your testing database with predefined data before your tests run. The fixture implementation for loading testdata in play 1 was great. But all fixture related code for play 2 I found was ebean releated. After some research I decided to use Fixy [&#8230;]</p>
The post <a href="https://jensjaeger.com/2013/12/yaml-fixtures-for-play-2/">Yaml-Fixtures for play 2</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></summary>

					<content type="html" xml:base="https://jensjaeger.com/2013/12/yaml-fixtures-for-play-2/"><![CDATA[<p>Fixtures is a fancy word for sample data. Fixtures allow you to populate your testing database with predefined data before your tests run.</p>
<p>The <a href="http://www.playframework.com/documentation/1.2.5/test">fixture implementation for loading testdata in play 1</a> was great. But all fixture related code for play 2 I <a href="http://stackoverflow.com/questions/11546666/how-to-load-test-data-fixtures-in-play2">found</a> was ebean releated. After some research I decided to use <a href="https://github.com/sberan/Fixy">Fixy</a> for loading test data. It needed only some small changes to adapt it for play 2. </p>
<p>I added the code as a module to <a href="https://github.com/jensjaeger/play4jpa/tree/master/module" title="Fixy">play4jpa</a>. To use it, just copy the module to your project and add the necessary config to your <a href="https://github.com/jensjaeger/play4jpa/blob/master/project/Build.scala">Build.scala</a>.</p>
<p>A yaml fixture file in the play conf folder can be loaded inside a transaction with this code:</p>
<pre lang="java">
Fixy fixtures = new JpaFixyBuilder(JPA.em()).build();
fixtures.load("myFixture.yaml");
</pre>
<p>The yaml for a Task Model with a name an done flag would look like this:</p>
<pre lang="yaml">
- !package models

- Task(task1):
    name: Task 1
    done: false
</pre>
<p>Check out the <a href="https://github.com/sberan/Fixy/tree/master/fixy-jpa/src/test">samples in the fixy unit tests</a> on github for more details on using fixy.</p>The post <a href="https://jensjaeger.com/2013/12/yaml-fixtures-for-play-2/">Yaml-Fixtures for play 2</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></content>
		
					<link rel="replies" type="text/html" href="https://jensjaeger.com/2013/12/yaml-fixtures-for-play-2/#comments" thr:count="1" />
			<link rel="replies" type="application/atom+xml" href="https://jensjaeger.com/2013/12/yaml-fixtures-for-play-2/feed/atom/" thr:count="1" />
			<thr:total>1</thr:total>
			</entry>
		<entry>
		<author>
			<name>Jens Jäger</name>
					</author>

		<title type="html"><![CDATA[A Ebean like finder for JPA]]></title>
		<link rel="alternate" type="text/html" href="https://jensjaeger.com/2013/12/a-ebean-like-finder-for-jpa/" />

		<id>http://www.jensjaeger.com/?p=1808</id>
		<updated>2013-12-31T13:15:10Z</updated>
		<published>2013-12-29T16:45:27Z</published>
		<category scheme="https://jensjaeger.com" term="English" /><category scheme="https://jensjaeger.com" term="Finder" /><category scheme="https://jensjaeger.com" term="Hibernate" /><category scheme="https://jensjaeger.com" term="JPA" /><category scheme="https://jensjaeger.com" term="Play Framework" /><category scheme="https://jensjaeger.com" term="Play4JPA" /><category scheme="https://jensjaeger.com" term="Query" /><category scheme="https://jensjaeger.com" term="sql" />
		<summary type="html"><![CDATA[<p>After the decision to go for JPA instead of Ebean with a Play Framework project, the first problem to solve was a replacement for the ebean finder. The project team started with these simple requirements: Jpa based Easy to use Can return a finder object, to add restrictions outside of the model (Used for generic [&#8230;]</p>
The post <a href="https://jensjaeger.com/2013/12/a-ebean-like-finder-for-jpa/">A Ebean like finder for JPA</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></summary>

					<content type="html" xml:base="https://jensjaeger.com/2013/12/a-ebean-like-finder-for-jpa/"><![CDATA[<p>After the decision to go for <a href="http://www.jensjaeger.com/2013/11/play-framework-2-ebean-vs-jpa/">JPA instead of Ebean with a Play Framework</a> project, the first problem to solve was a replacement for the <a href="http://www.playframework.com/documentation/2.2.1/api/java/play/db/ebean/Model.Finder.html">ebean finder</a>.</p>
<p>The project team started with these simple requirements:</p>
<ul>
<li>Jpa based</li>
<li>Easy to use</li>
<li>Can return a finder object, to add restrictions outside of the model (Used for generic components like the sort function of a data table view)</li>
</ul>
<p>After some prototyping with different implementations, we found this <a href="https://gist.github.com/marcospereira/044ec48bb70468097396 ">gist</a> and decided to start from there with <a href="http://docs.jboss.org/hibernate/core/4.2/javadocs/org/hibernate/Criteria.html">Hibernate Criteria</a>.</p>
<p>You can find the results in the <a href="https://github.com/jensjaeger/play4jpa/tree/master/app/query">query package</a> and the <a href="https://github.com/jensjaeger/play4jpa/blob/master/app/models/GenericModel.java">generic model</a> of my <a href="https://github.com/jensjaeger/play4jpa/">Play4Jpa</a> project. The GenericModel doesn&#8217;t contain a generated long based @Id. You should only extend from GenericModel when you use combined keys. If you need a long based @Id you can extend from <a href="https://github.com/jensjaeger/play4jpa/blob/master/app/models/Model.java">Model</a>.</p>
<p>To get a query object from a Object that extends Model. You just have to add the method:</p>
<pre lang="java">
public static Query< Task> query(){
    return query(Task.class);
}
</pre>
<p>To find all Tasks with the query you just need to add the following findAll Method:</p>
<pre lang="java">
public static List< Task> findAll(){
    return Task.query().findList();
}
</pre>
<p>Here is a example of a simple where condition:</p>
<pre lang="java">
public static Task findByName(String name){
    return Task.query().eq("name", name).findUnique();
}
</pre>The post <a href="https://jensjaeger.com/2013/12/a-ebean-like-finder-for-jpa/">A Ebean like finder for JPA</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></content>
		
					<link rel="replies" type="text/html" href="https://jensjaeger.com/2013/12/a-ebean-like-finder-for-jpa/#comments" thr:count="1" />
			<link rel="replies" type="application/atom+xml" href="https://jensjaeger.com/2013/12/a-ebean-like-finder-for-jpa/feed/atom/" thr:count="1" />
			<thr:total>1</thr:total>
			</entry>
		<entry>
		<author>
			<name>Jens Jäger</name>
					</author>

		<title type="html"><![CDATA[Play 2.x WS API and self signed certificates]]></title>
		<link rel="alternate" type="text/html" href="https://jensjaeger.com/2013/12/play-2-x-ws-api-and-self-signed-certificates/" />

		<id>http://www.jensjaeger.com/?p=1744</id>
		<updated>2013-12-03T18:20:38Z</updated>
		<published>2013-12-03T19:30:43Z</published>
		<category scheme="https://jensjaeger.com" term="English" /><category scheme="https://jensjaeger.com" term="application.conf" /><category scheme="https://jensjaeger.com" term="certificates" /><category scheme="https://jensjaeger.com" term="Play Framework" /><category scheme="https://jensjaeger.com" term="rest" /><category scheme="https://jensjaeger.com" term="SSLEngine problem" /><category scheme="https://jensjaeger.com" term="SSLHandshakeException" /><category scheme="https://jensjaeger.com" term="webservice" />
		<summary type="html"><![CDATA[<p>The play web service API provides an easy way to use your play application as an http client. Usually you should use Play&#8217;s asynchronous mechanisms to use the web service response. But sometime you just want to wait for the web service responce (in a job). You can do this with the following method: public [&#8230;]</p>
The post <a href="https://jensjaeger.com/2013/12/play-2-x-ws-api-and-self-signed-certificates/">Play 2.x WS API and self signed certificates</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></summary>

					<content type="html" xml:base="https://jensjaeger.com/2013/12/play-2-x-ws-api-and-self-signed-certificates/"><![CDATA[<p>The play web service API provides an easy way to use your play application as an http client. Usually you should use Play&#8217;s asynchronous mechanisms to use the web service response. But sometime you just want to wait for the web service responce (in a job). You can do this with the following method:</p>
<pre lang="java">
public static String call(String url, String contentType) {
    String result = null;
    try {
        F.Promise< WS.Response> wsPromise = WS.url(url).setContentType(contentType).get();
        result = wsPromise.get(THIRTY_SECONDS).getBody();
    } catch (Exception e){
        log.error("Error in webservice call to: " + url);
    }
    return result;
}
</pre>
<p>When the web service you want to call uses self signed certificates you will run into an exception:</p>
<pre lang="java">
javax.net.ssl.SSLHandshakeException: General SSLEngine problem
</pre>
<p>To allow self-signed ssl certificates you just have to add the following to your application.conf.</p>
<pre lang="conf">
# this is needed for self signed certificates
ws.acceptAnyCertificate=true
</pre>
<p>When you unit test your web service call make sure your test runs inside a <a href="http://www.playframework.com/documentation/2.2.x/api/java/play/test/FakeApplication.html">FakeApplication</a>.</p>The post <a href="https://jensjaeger.com/2013/12/play-2-x-ws-api-and-self-signed-certificates/">Play 2.x WS API and self signed certificates</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></content>
		
					<link rel="replies" type="text/html" href="https://jensjaeger.com/2013/12/play-2-x-ws-api-and-self-signed-certificates/#comments" thr:count="5" />
			<link rel="replies" type="application/atom+xml" href="https://jensjaeger.com/2013/12/play-2-x-ws-api-and-self-signed-certificates/feed/atom/" thr:count="5" />
			<thr:total>5</thr:total>
			</entry>
		<entry>
		<author>
			<name>Jens Jäger</name>
					</author>

		<title type="html"><![CDATA[Play framework conference]]></title>
		<link rel="alternate" type="text/html" href="https://jensjaeger.com/2013/12/play-framework-conference/" />

		<id>http://www.jensjaeger.com/?p=1793</id>
		<updated>2013-12-02T21:36:40Z</updated>
		<published>2013-12-02T21:36:15Z</published>
		<category scheme="https://jensjaeger.com" term="English" /><category scheme="https://jensjaeger.com" term="conference" /><category scheme="https://jensjaeger.com" term="Ping Play! Edition" /><category scheme="https://jensjaeger.com" term="Play Framework" />
		<summary type="html"><![CDATA[<p>Just bought a ticket to Ping Play! Edition. A 2-day by-the-community and for-the-community conference about the Play Framework. Anybody knows a good hotel near BMC?</p>
The post <a href="https://jensjaeger.com/2013/12/play-framework-conference/">Play framework conference</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></summary>

					<content type="html" xml:base="https://jensjaeger.com/2013/12/play-framework-conference/"><![CDATA[<p>Just bought a ticket to <a href="http://www.ping-conf.com">Ping Play! Edition</a>. A 2-day by-the-community and for-the-community conference about the Play Framework.</p>
<p>Anybody knows a good hotel near <a href="http://bmc.hu/#!/Contact">BMC</a>?</p>
<p><a href="http://www.ping-conf.com"><img loading="lazy" decoding="async" src="http://www.jensjaeger.com/dateien/2013/12/ping-logo-play@2x-300x218.png" alt="ping-logo-play@2x" width="300" height="218" class="alignnone size-medium wp-image-1794" srcset="https://jensjaeger.com/dateien/2013/12/ping-logo-play@2x-300x218.png 300w, https://jensjaeger.com/dateien/2013/12/ping-logo-play@2x-620x450.png 620w, https://jensjaeger.com/dateien/2013/12/ping-logo-play@2x.png 1320w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>The post <a href="https://jensjaeger.com/2013/12/play-framework-conference/">Play framework conference</a> first appeared on <a href="https://jensjaeger.com">jensjaeger.com</a>.]]></content>
		
					<link rel="replies" type="text/html" href="https://jensjaeger.com/2013/12/play-framework-conference/#comments" thr:count="0" />
			<link rel="replies" type="application/atom+xml" href="https://jensjaeger.com/2013/12/play-framework-conference/feed/atom/" thr:count="0" />
			<thr:total>0</thr:total>
			</entry>
	</feed>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced (Page is feed) 
Minified using Disk

Served from: jensjaeger.com @ 2026-05-31 03:37:57 by W3 Total Cache
-->