Java Code Geeks » Brian Porter http://www.javacodegeeks.com/ Java 2 Java Developers Resource Center Sun, 01 Mar 2015 13:00:01 +0000 en-US hourly 1 http://wordpress.org/?v=4.1.1 How to use Hibernate to generate a DDL script from your Play! Framework projecthttp://www.javacodegeeks.com/2014/10/how-to-use-hibernate-to-generate-a-ddl-script-from-your-play-framework-project.html http://www.javacodegeeks.com/2014/10/how-to-use-hibernate-to-generate-a-ddl-script-from-your-play-framework-project.html#comments Thu, 16 Oct 2014 22:00:52 +0000 http://www.javacodegeeks.com/?p=31741 Ok, so you have been using the hiber­nate prop­erty name=“hibernate.hbm2ddl.auto” value=“update” to con­tin­u­ously update your data­base schema, but now you need a com­plete DDL script? Use this method from you Global Class onStart to export the DDL scripts.  Just give it the pack­age name (with path) of your Enti­ties as well as a file name: public […]

 

]]>
http://www.javacodegeeks.com/2014/10/how-to-use-hibernate-to-generate-a-ddl-script-from-your-play-framework-project.html/feed/ 0
Programming a simple slot machine game using Javahttp://www.javacodegeeks.com/2014/08/programming-a-simple-slot-machine-game-using-java.html http://www.javacodegeeks.com/2014/08/programming-a-simple-slot-machine-game-using-java.html#comments Wed, 27 Aug 2014 07:00:01 +0000 http://www.javacodegeeks.com/?p=29346 No mat­ter how sim­ple or com­plex the game is, Java can do the job! On this post, let’s take a look at how begin­ners of Java pro­gram­ming can make a sim­ple, yet fully func­tional slot machine. Slot machines have been around for a long time, but its enter­tain­ment value doesn’t seem to fade one bit. Inter­Casino, […]

 

]]>
http://www.javacodegeeks.com/2014/08/programming-a-simple-slot-machine-game-using-java.html/feed/ 2
How to implement a Session Timeout in Play Framework 2http://www.javacodegeeks.com/2014/04/how-to-implement-a-session-timeout-in-play-framework-2.html http://www.javacodegeeks.com/2014/04/how-to-implement-a-session-timeout-in-play-framework-2.html#comments Fri, 04 Apr 2014 04:00:23 +0000 http://www.javacodegeeks.com/?p=23712 If you fol­low the Play Frame­work 2 guide for imple­ment­ing authen­ti­ca­tion: http://​www​.playframe​work​.com/​d​o​c​u​m​e​n​t​a​t​i​o​n​/​2​.​2​.​2​/​J​a​v​a​G​u​i​de4 — you will notice that there is no ses­sion time­out in Play Frame­work 2. It was there in Play Frame­work 1, but Play Frame­work 2 fol­lows a dif­fer­ent approach. I you want to imple­ment your own ses­sion time­out, then fol­low the guide for […]

 

]]>
http://www.javacodegeeks.com/2014/04/how-to-implement-a-session-timeout-in-play-framework-2.html/feed/ 2
How to configure an SSL Certificate with Play Framework for httpshttp://www.javacodegeeks.com/2014/01/how-to-configure-an-ssl-certificate-with-play-framework-for-https.html http://www.javacodegeeks.com/2014/01/how-to-configure-an-ssl-certificate-with-play-framework-for-https.html#comments Tue, 14 Jan 2014 08:00:49 +0000 http://www.javacodegeeks.com/?p=20556 I spent hours try­ing to get this to work, and in the end, then prob­lem was that I did not gen­er­ate the CSR (Cer­tifi­cate Request) myself with the keytool. I kept get­ting this error when I tried access­ing Play with https: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated The prob­lem ended up being that the key­store I cre­ated […]

 

]]>
http://www.javacodegeeks.com/2014/01/how-to-configure-an-ssl-certificate-with-play-framework-for-https.html/feed/ 0
How to use Reflection to Document your Data Model based on JPA Annotationshttp://www.javacodegeeks.com/2013/07/how-to-use-reflection-to-document-your-data-model-based-on-jpa-annotations.html http://www.javacodegeeks.com/2013/07/how-to-use-reflection-to-document-your-data-model-based-on-jpa-annotations.html#comments Tue, 09 Jul 2013 10:00:32 +0000 http://www.javacodegeeks.com/?p=15271 So using JPA, Hiber­nate or EBeans is cool when you can just anno­tate your Java classes, but haven’t you always wished you could “gen­er­ate” doc­u­men­ta­tion of your data model from the code? Pulling infor­ma­tion of the the JPA / Hiber­nate  and other val­i­da­tion annotations? Assum­ing you have all those nice Anno­ta­tions in your beans:     […]

 

]]>
http://www.javacodegeeks.com/2013/07/how-to-use-reflection-to-document-your-data-model-based-on-jpa-annotations.html/feed/ 0
Using twitter4j with Play! Framework and Secure Social is this easyhttp://www.javacodegeeks.com/2013/03/using-twitter4j-with-play-framework-and-secure-social-is-this-easy.html http://www.javacodegeeks.com/2013/03/using-twitter4j-with-play-framework-and-secure-social-is-this-easy.html#comments Fri, 01 Mar 2013 08:00:35 +0000 http://www.javacodegeeks.com/?p=9205 Dur­ing yesterday’s per­sonal Hackathon, I started a project which I might intro­duce here some­time. But the coolest rev­e­la­tion was (again) how easy it was to get up and running. Cre­ate a new Play Project Add Secure Social and con­fig­ure it for Twit­ter, and use the InMem­o­ryUserSer­vice from the exam­ples. (all this is described here http://securesocial.ws/guide/getting-started.html […]

 

]]>
http://www.javacodegeeks.com/2013/03/using-twitter4j-with-play-framework-and-secure-social-is-this-easy.html/feed/ 0