{"id":1004,"date":"2012-03-15T11:20:00","date_gmt":"2012-03-15T11:20:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/the-java-ee-6-example-galleria.html"},"modified":"2012-10-21T23:15:21","modified_gmt":"2012-10-21T23:15:21","slug":"java-ee-6-example-galleria","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html","title":{"rendered":"The Java EE 6 Example &#8211; Galleria"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\">Have you ever been wondering where to find some good end-to-end examples build with Java EE 6? I have. Most of the stuff you find on the net is very basic and doesn&#8217;t solve the real world problems. This is true for the Java EE 6 tutorial. All the other stuff, like most of what Adam Bien publishes are a very tight scoped examples which also doesn&#8217;t point you to a more complete solution.<\/p>\n<p>So, I was very pleased to stumble over a more complex example done by Vineet Reynolds. It&#8217;s called &#8220;<a href=\"https:\/\/bitbucket.org\/VineetReynolds\/java-ee-6-galleria\">Java EE 6 Galleria<\/a>&#8221; and you can download the source code from bitbucket. Vineet is a software engineer contributing to the Arquillian project; more specifically, he contributed bugs fixes and worked on a few feature requests for Arquillian Core, and the GlassFish, WebLogic and Tomcat integrations for Arquillian. This is where I first came across his name. And following the Arquillian guys and him a little closer directly send me to this example. A big thanks to Vineet for a helping hand during my first tries to get this up and running. Follow him if you like on twitter <a href=\"http:\/\/www.twitter.com\/VineetReynolds\" target=\"_blank\">@VineetReynolds<\/a>.<\/p>\n<p>Here is a brief explanation about it&#8217;s background and this is also kicking of a series about running it in different settings and pointing you to a few more details under the hood. This is the basic introduction.<\/p>\n<p><strong>About the Galleria<\/strong><\/p>\n<p>The high level description of the project is the following: The Java EE 6-Galleria is a demo application demonstrating the use of JSF 2.0 and JPA 2.0 in a Java EE project using Domain Driven Design. It was written to serve as a showpiece for domain driven design in Java EE 6. The domain model of the application is not anemic, and is constituted of JPA entities. The entities are then used in session EJBs that act as the application layer. JSF facelets are used in the presentation tier, using Mojarra and PrimeFaces. The project seeks to achieve comprehensive coverage through the use of both unit and integration tests, written in JUnit 4. The unit and integration tests for EJBs and the domain model rely on the EJB 3.1 container API. The integration tests for the presentation layer relies on the Arquillian project and its Drone extension (for execution of Selenium tests).<\/p>\n<p><strong>Domain driven design using Java EE 6<\/strong><\/p>\n<p>DDD as an architectural approach, is feasible in Java EE 6. This is primarily due to the changes made in EJB 3.x and in the introduction of JPA. The improvements made in the EJB 3.x and JPA specifications allow for a domain and application layer to be modeled in Java EE 6 using DDD. The basic idea here is to design an application ensuring that persistence services are injected into the application layer, and used to access\/persist the entities within a transactional context established by the application layer.<\/p>\n<p><strong>Domain Layer<\/strong><\/p>\n<p>The application contains four domain entities for now &#8211; User, Group, Album and Photo which are the same as the JPA entities in the <a href=\"https:\/\/bitbucket.org\/VineetReynolds\/java-ee-6-galleria\/wiki\/DataModel\" target=\"_blank\">logical data model<\/a>.<\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><a href=\"http:\/\/4.bp.blogspot.com\/-ihAzrIoAFvM\/T2CmC4tLDZI\/AAAAAAAAAiw\/a3w6rWrNgvo\/s1600\/Galleria-LogicalDataModel.png\"><img decoding=\"async\" border=\"0\" height=\"251\" src=\"http:\/\/4.bp.blogspot.com\/-ihAzrIoAFvM\/T2CmC4tLDZI\/AAAAAAAAAiw\/a3w6rWrNgvo\/s320\/Galleria-LogicalDataModel.png\" width=\"320\" \/><\/a><\/div>\n<p><strong>Repository Layer<\/strong><\/p>\n<p>On top of the logical data model you can find four repositories &#8211; UserRepository, GroupRepository, AlbumRepository and PhotoRepository. Each for one of the four domain entities. Even if the DDD requires&nbsp;that you only have repositories for an aggregated root, and not for all domain entities it is designed this way to allow the application layer to access the Album and Photo domain entities without having to navigate Albums and Photos via the UserRepository.&nbsp;The repositories are Stateless Session Beans with a no-interface view and are constructed using the <a href=\"http:\/\/www.adam-bien.com\/roller\/abien\/entry\/generic_crud_service_aka_dao\">Generic CRUD Service pattern published by Adam Bien<\/a>.<\/p>\n<p><strong>Application layer<\/strong><\/p>\n<p>The application layer exposes services to be consumed by the presentation layer. It is also responsible for transaction management, while also serving as a fault barrier for the below layer(s). The application layer co-ordinates with the domain repositories and the domain objects to fulfill the desired objectives of the exposed services. In a way, this layer is the equivalent to a service layer in traditional applications.&nbsp;The application layer exposes it&#8217;s services through the UserService, GroupService, AlbumService and PhotoService interfaces and is also responsible for validating the providing domain objects from the above layers, before co-ordinating actions among objects in the domain layer. This is done via JSR-303 constraints on the domain objects.<\/p>\n<p><strong>How it looks like<\/strong><\/p>\n<p>And this is, how this example looks like if you are running it on latest GlassFish 3.1.2. Curious to set this up yourself? Wait for the next post or give it a try yourself ;)<\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><a href=\"http:\/\/2.bp.blogspot.com\/-MXFprnYDxhI\/T2CmNu5bSsI\/AAAAAAAAAi4\/9UcVBsVmGc0\/s1600\/galleria.jpg\"><img decoding=\"async\" border=\"0\" height=\"182\" src=\"http:\/\/2.bp.blogspot.com\/-MXFprnYDxhI\/T2CmNu5bSsI\/AAAAAAAAAi4\/9UcVBsVmGc0\/s320\/galleria.jpg\" width=\"320\" \/><\/a><\/div>\n<p>Below we are going to setup the example as it is directly with latest GlassFish 3.1.2, Hibernate and Derby.<\/p>\n<p><strong>Preparation<\/strong><\/p>\n<p>Get yourself in the mood for some configuration. Grep the latest <a href=\"http:\/\/netbeans.org\/downloads\/index.html\" target=\"_blank\">NetBeans 7.1<\/a> (the Java EE edition already includes the needed <a href=\"http:\/\/glassfish.java.net\/public\/downloadsindex.html#top\" target=\"_blank\">GlassFish 3.1.2<\/a>) and install it. I also assume you have a decent <a href=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/index.html\" target=\"_blank\">Java SDK 7<\/a> (6 would do the job, too) in place somewhere. Depending on the development strategy you also need a Mercurial Client and Maven. At least Maven is also included in NetBeans, so &#8230; I mean &#8230; why make your life harder than it already is? ;)<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><strong>Environments<\/strong><\/p>\n<p>Some few more words about the environments. This example was setup for supporting different environments. Starting with the plain &#8220;development&#8221; environment you also need to configure your &#8220;test&#8221; and last but not least the &#8220;production&#8221; environment. All of the different environments are handled by maven profiles, so you might have to configure a bit during the following minutes.<\/p>\n<p><strong>Create the Database instances<\/strong><\/p>\n<p>First thing to do is to decide where to put all your stuff. The examples use derby out of the box and therefore you should either have the Java DB installed (part of the JDK) or use the GlassFish derby instance which is pre-configured with NetBeans. Let&#8217;s make it harder here and assume we use the Java DB installation that comes with your JDK. Go ahead, open a CMD prompt and navigate to your %JAVA_HOME% folder and further down the db folder\/bin. Execute the &#8220;startNetWorkServer&#8221; script and watch out for the derby instance to start. Now open another CMD prompt also navigate to the db\/bin folder and execute the &#8220;ij&#8221; script. This should come up with a prompt &#8221; ij&gt;. Now enter the following connect string:<\/p>\n<pre class=\"brush: java\">connect 'jdbc:derby:\/\/localhost:1527\/GALLERIATEST;create=true';\r\n<\/pre>\n<p>This command connects you to the derby instance and creates a GALLERIATEST database if it doesn&#8217;t already exist. The Galleria example uses a handy little tool called <a href=\"http:\/\/dbdeploy.com\/\" target=\"_blank\">dbdeploy<\/a> as a database change management tool. It let&#8217;s you do incremental updates to the physical database model which get tracked in a changelog table. (More about this later in the series). You have to create the changelog table:<\/p>\n<pre>CREATE TABLE changelog (\r\n  change_number DECIMAL(22,0) NOT NULL,\r\n  complete_dt TIMESTAMP NOT NULL,\r\n  applied_by VARCHAR(100) NOT NULL,\r\n  description VARCHAR(500) NOT NULL\r\n);\r\n\r\nALTER TABLE changelog ADD CONSTRAINT Pkchangelog PRIMARY KEY (change_number);\r\n<\/pre>\n<p>You can redo the steps for any other instance you need (production, etc.) by simply changing the database name in the connect statement. And don&#8217;t forget to create the changelog table in every instance. <\/p>\n<p>And if you don&#8217;t like this approach. Fire up NetBeans, switch to the services tab, select &#8220;New Connection&#8221; and add a new Java DB Network Connection with host:localhost, port:1527 and Database: GALLERIATEST;create=true. Set both user and password to &#8220;APP&#8221; and click &#8220;Test Connection&#8221;. Select APP as the schema for your new DB. And you are done!<\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><\/div>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><a href=\"http:\/\/1.bp.blogspot.com\/-6yUp-ZuYGAs\/T2Cnz63il5I\/AAAAAAAAAjA\/Dmao-Rhcrz8\/s1600\/netbeans_derby.png\"><img decoding=\"async\" border=\"0\" height=\"58\" src=\"http:\/\/1.bp.blogspot.com\/-6yUp-ZuYGAs\/T2Cnz63il5I\/AAAAAAAAAjA\/Dmao-Rhcrz8\/s400\/netbeans_derby.png\" width=\"400\" \/><\/a><\/div>\n<p><strong>Create the GlassFish domain<\/strong><\/p>\n<p>We are running this from latest GlassFish. First thing to do now is to create a new domain. navigate to your GlassFish installation directory and goto glassfish3\/bin and execute the following:<\/p>\n<pre>asadmin create-domain --portbase 10000 --nopassword test-domain\r\n<\/pre>\n<p>This creates a new test-domain for you. Now navigate to that domain folder (&#8220;glassfish3\/glassfish\/domains\/test-domain&#8221;) and open the config\/domain.xml file.<\/p>\n<p>We are now going to add the created derby database as a connection pool to you newly created GlassFish domain.&nbsp;Navigate to the&nbsp;&lt;resources&gt; element and add the following connection pool and jdbc-resource under the last closing&nbsp;&nbsp;&lt;\/jdbc-connection-pool&gt; element:<\/p>\n<pre class=\"brush:xml\">&nbsp;&lt;jdbc-connection-pool driver-classname=\"\" datasource-classname=\"org.apache.derby.jdbc.ClientDataSource40\" res-type=\"javax.sql.DataSource\" description=\"\" name=\"GalleriaPool\" ping=\"true\"&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"User\" value=\"APP\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"DatabaseName\" value=\"GALLERIATEST\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"RetrieveMessageText\" value=\"true\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"Password\" value=\"APP\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"ServerName\" value=\"localhost\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"Ssl\" value=\"off\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"SecurityMechanism\" value=\"4\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"TraceFileAppend\" value=\"false\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"TraceLevel\" value=\"-1\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"PortNumber\" value=\"1527\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"LoginTimeout\" value=\"0\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &lt;\/jdbc-connection-pool&gt;\r\n&nbsp; &nbsp; &lt;jdbc-resource pool-name=\"GalleriaPool\" description=\"\" jndi-name=\"jdbc\/galleriaDS\"&gt;&lt;\/jdbc-resource&gt;\r\n<\/pre>\n<p>Now find the :&nbsp;&lt;config name=&#8221;server-config&#8221;&gt; element and inside it look for the last&nbsp;&nbsp;&lt;resource-ref entry. Add the following line there:<\/p>\n<pre class=\"brush:xml\">&nbsp; &lt;resource-ref ref=\"jdbc\/galleriaDS\"&gt;&lt;\/resource-ref&gt;\r\n<\/pre>\n<p>One last thing to do until we are ready to fire up our instance. We need to add the JDBC Realm for the Galleria example. again, find the&nbsp;&lt;config name=&#8221;server-config&#8221;&gt; and inside it, look for a&nbsp;&lt;\/auth-realm&gt;. Under this, put the following:<\/p>\n<pre class=\"brush:xml\">&nbsp; &lt;auth-realm classname=\"com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm\" name=\"GalleriaRealm\"&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"jaas-context\" value=\"jdbcRealm\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"encoding\" value=\"Hex\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"password-column\" value=\"PASSWORD\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"datasource-jndi\" value=\"jdbc\/galleriaDS\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"group-table\" value=\"USERS_GROUPS\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"charset\" value=\"UTF-8\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"user-table\" value=\"USERS\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"group-name-column\" value=\"GROUPID\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"digest-algorithm\" value=\"SHA-512\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &nbsp; &lt;property name=\"user-name-column\" value=\"USERID\"&gt;&lt;\/property&gt;\r\n&nbsp; &nbsp; &lt;\/auth-realm&gt;\r\n<\/pre>\n<p>Be sure not to put the new realm under the default-config. This will not work. Fine. Let&#8217;s get the sources :)<\/p>\n<p><strong>Getting the Source and opening it in NetBeans<\/strong><\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><\/div>\n<p>Vineet is hosting the Galleria example on bitbucket.org. So, you have to go there and visit the <a href=\"https:\/\/bitbucket.org\/VineetReynolds\/java-ee-6-galleria\" target=\"_blank\">java-ee-6-galleria<\/a> project. There are three ways you can bring the sources to your local HDD. Either via the hg command line:<\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><a href=\"http:\/\/2.bp.blogspot.com\/-k6WoMB6CwBg\/T2Coj7rro3I\/AAAAAAAAAjI\/qpIyVyuGkDo\/s1600\/2.png\"><img decoding=\"async\" border=\"0\" height=\"320\" src=\"http:\/\/2.bp.blogspot.com\/-k6WoMB6CwBg\/T2Coj7rro3I\/AAAAAAAAAjI\/qpIyVyuGkDo\/s320\/2.png\" width=\"149\" \/><\/a><\/div>\n<pre>hg clone https:\/\/bitbucket.org\/VineetReynolds\/java-ee-6-galleria\r\n<\/pre>\n<p>or via the website download (upper right &#8220;get sources&#8221;) or directly via NetBeans. You need a Mercurial client for your OS for the first and the third option. I am using <a href=\"http:\/\/tortoisehg.bitbucket.org\/\" target=\"_blank\">TortoiseHg <\/a>for Windows. You should have this <a href=\"http:\/\/netbeans.org\/kb\/docs\/ide\/mercurial.html\" target=\"_blank\">installed and configured with NetBeans<\/a> before doing the following. Lets try the last alternative here. Select &#8220;Team &gt; Clone Other&#8221;. Enter the Repository URL and leave user\/password empty. Click &#8220;next&#8221; two times (we don&#8217;t need to change default paths ;)) and select a parent directory to put the stuff in. Click &#8220;Finish&#8221; and let the Mercurial client do the work. You are asked to open the found projects after it finished. This should look similar to the picture on the right. If you run into connection troubles make sure to update your proxy settings&nbsp;accordingly.<\/p>\n<p>If you try to build the project you will run into trouble. It is still missing some configuration which we are going to do next.<\/p>\n<p><strong>Adding a Development Profile<\/strong><\/p>\n<p>Next is to add some stuff to the Maven pom.xml of the galleria-ejb project. Open it and scroll down to the&nbsp;&lt;profiles&gt; section. You find two (sonar and production). We are going to add a development profile by adding the following lines to it (make sure to adjust the GlassFish paths to your environment):<\/p>\n<pre class=\"brush: xml\">&lt;profile&gt;\r\n&lt;id&gt;development&lt;\/id&gt;\r\n&lt;activation&gt;\r\n&lt;activeByDefault&gt;true&lt;\/activeByDefault&gt;\r\n&lt;\/activation&gt;\r\n&lt;properties&gt;\r\n&lt;galleria.derby.testInstance.jdbcUrl&gt;jdbc:derby:\/\/localhost:1527\/GALLERIATEST&lt;\/galleria.derby.testInstance.jdbcUrl&gt;\r\n&lt;galleria.derby.testInstance.user&gt;APP&lt;\/galleria.derby.testInstance.user&gt;\r\n&lt;galleria.derby.testInstance.password&gt;APP&lt;\/galleria.derby.testInstance.password&gt;\r\n&lt;galleria.glassfish.testDomain.user&gt;admin&lt;\/galleria.glassfish.testDomain.user&gt;\r\n&lt;galleria.glassfish.testDomain.passwordFile&gt;D:\/glassfish-3.1.2-b22\/glassfish3\/glassfish\/domains\/test-domain\/config\/local-password&lt;\/galleria.glassfish.testDomain.passwordFile&gt;\r\n&lt;galleria.glassfish.testDomain.glassfishDirectory&gt;D:\/glassfish-3.1.2-b22\/glassfish3\/glassfish\/&lt;\/galleria.glassfish.testDomain.glassfishDirectory&gt;\r\n&lt;galleria.glassfish.testDomain.domainName&gt;test-domain&lt;\/galleria.glassfish.testDomain.domainName&gt;\r\n&lt;galleria.glassfish.testDomain.adminPort&gt;10048&lt;\/galleria.glassfish.testDomain.adminPort&gt;\r\n&lt;galleria.glassfish.testDomain.httpPort&gt;10080&lt;\/galleria.glassfish.testDomain.httpPort&gt;\r\n&lt;galleria.glassfish.testDomain.httpsPort&gt;10081&lt;\/galleria.glassfish.testDomain.httpsPort&gt;\r\n&lt;\/properties&gt;\r\n&lt;\/profile&gt;\r\n<\/pre>\n<p>Ok. As you can see a couple of stuff is defined here. And the profile is activated by default. That&#8217;s it. For now.<\/p>\n<p><strong>Testing the ejb-Galleria Project<\/strong><\/p>\n<p>Lets try to run the testcases in the ejb-Galleria project. &nbsp;Right click it and issue a &nbsp;&#8220;clean and build&#8221;.Follow the console output to see what is actually going on. We are going to investigate this a little bit further with one of the next posts. Today we are only doing this to make sure, you have everything setup the right way. It should finish with:<\/p>\n<pre>Tests run: 49, Failures: 0, Errors: 0, Skipped: 0\r\nBUILD SUCCESS\r\n<\/pre>\n<p>That is a &#8220;Green-Bar&#8221; :-) Congratulations!<\/p>\n<p><strong>Build and Deploy the Project<\/strong><\/p>\n<p>Now go to NetBeans &#8220;Tools &gt; Options &gt; Miscellaneous &gt; Maven&#8221; and check the box that says: &#8220;Skip Tests for any build executions not directly related to testing&#8221;. Return to the main window and right click the Galleria project and make a clean and build there.<\/p>\n<pre>Reactor Summary:\r\n\r\nGalleria ................................. SUCCESS [0.431s]\r\ngalleria-ejb ............................. SUCCESS [5.302s]\r\ngalleria-jsf ............................. SUCCESS [4.486s]\r\nGalleria EAR ............................. SUCCESS [1.308s]\r\n------------------------------------------------------------\r\nBUILD SUCCESS\r\n------------------------------------------------------------\r\nTotal time: 11.842s\r\n<\/pre>\n<p>Fine. Now lets fire up the GlassFish domain. Switch to your GlassFish installation and find the glassfish3\/bin folder. Open a command line prompt there and run:<\/p>\n<pre>asadmin start-domain test-domain\r\n<\/pre>\n<p>You can see the domain starting up. Now open a browser and navigate to <a href=\"http:\/\/localhost:10048\/\" target=\"_blank\">http:\/\/localhost:10048\/<\/a>. After a few seconds this is going to show you the admin console of your GlassFish server. Now you need to install Hibernate. Select the &#8220;Update Tool&#8221; (bottom left) and switch to the &#8220;Available Add-Ons&#8221; tab. Select &#8220;hibernate&#8221; and click install (top right). Stop the server after you installed it and restart it with the command above. Open the admin console again and click on &#8220;Applications&#8221;. Click the little &#8220;deploy&#8221; button on top and browse for the &#8220;java-ee-6-galleria\/galleria-ear\/target\/galleria-ear-0.0.1-SNAPSHOT.ear&#8221;. Click on &#8220;OK&#8221; (top right). You are done after a few seconds. Now switch to&nbsp;<a href=\"http:\/\/localhost:10080\/Galleria\/\" target=\"_blank\">http:\/\/localhost:10080\/Galleria\/<\/a>&nbsp;and you will see the welcome screen. Congratulations. You setup the Galleria example on GlassFish! Sign up, Login and play with the application a bit!<\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><a href=\"http:\/\/1.bp.blogspot.com\/-mQ77w53QvPA\/T2Coy2OELCI\/AAAAAAAAAjY\/qvORES0w6M4\/s1600\/galleria_login.png\"><img decoding=\"async\" border=\"0\" height=\"165\" src=\"http:\/\/1.bp.blogspot.com\/-mQ77w53QvPA\/T2Coy2OELCI\/AAAAAAAAAjY\/qvORES0w6M4\/s320\/galleria_login.png\" width=\"320\" \/><\/a><\/div>\n<p>The next parts in the series will dive you into the details of the application. I am going to cover the tests and overall concepts. And we are also going to change both JPA provider and database in a future post.<\/p>\n<p>Want to know what it takes to get it <a href=\"http:\/\/blog.eisele.net\/2012\/03\/java-ee-6-example-running-galleria-on.html\">up and running<\/a> on latest WebLogic 12c ? <a href=\"http:\/\/blog.eisele.net\/2012\/03\/java-ee-6-example-running-galleria-on.html\">Read on!<\/a><\/p>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/blog.eisele.net\/2012\/03\/java-ee-6-galleria-example-part-1.html\">The Java EE 6 Example &#8211; Galleria &#8211; Part 1<\/a>&nbsp;&amp;&nbsp;&nbsp;<a href=\"http:\/\/blog.eisele.net\/2012\/03\/java-ee-6-running-galleria-on-glassfish.html\">The Java EE 6 Example &#8211; Running Galleria on GlassFish 3.1.2 &#8211; Part 2<\/a>&nbsp;from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a><span class=\"Apple-style-span\" style=\"font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif\"><span class=\"Apple-style-span\" style=\"font-size: 14px;line-height: 18px\"><strong>&nbsp;<\/strong><\/span><\/span>Markus Eisele at the&nbsp;<a href=\"http:\/\/blog.eisele.net\/\">Enterprise Software Development with Java <\/a>&nbsp;blog.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever been wondering where to find some good end-to-end examples build with Java EE 6? I have. Most of the stuff you find on the net is very basic and doesn&#8217;t solve the real world problems. This is true for the Java EE 6 tutorial. All the other stuff, like most of what &hellip;<\/p>\n","protected":false},"author":92,"featured_media":205,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[289,187,309],"class_list":["post-1004","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-java-ee6","tag-netbeans","tag-oracle-glassfish"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>The Java EE 6 Example - Galleria - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Have you ever been wondering where to find some good end-to-end examples build with Java EE 6? I have. Most of the stuff you find on the net is very basic\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Java EE 6 Example - Galleria - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Have you ever been wondering where to find some good end-to-end examples build with Java EE 6? I have. Most of the stuff you find on the net is very basic\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/eisele.markus\" \/>\n<meta property=\"article:published_time\" content=\"2012-03-15T11:20:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-21T23:15:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/oracle-glassfish-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Markus Eisele\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/myfear\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Markus Eisele\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/java-ee-6-example-galleria.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/java-ee-6-example-galleria.html\"},\"author\":{\"name\":\"Markus Eisele\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/83c0139425aee143ae0d269868475066\"},\"headline\":\"The Java EE 6 Example &#8211; Galleria\",\"datePublished\":\"2012-03-15T11:20:00+00:00\",\"dateModified\":\"2012-10-21T23:15:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/java-ee-6-example-galleria.html\"},\"wordCount\":2114,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/java-ee-6-example-galleria.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/oracle-glassfish-logo.jpg\",\"keywords\":[\"Java EE6\",\"Netbeans\",\"Oracle GlassFish\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/java-ee-6-example-galleria.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/java-ee-6-example-galleria.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/java-ee-6-example-galleria.html\",\"name\":\"The Java EE 6 Example - Galleria - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/java-ee-6-example-galleria.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/java-ee-6-example-galleria.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/oracle-glassfish-logo.jpg\",\"datePublished\":\"2012-03-15T11:20:00+00:00\",\"dateModified\":\"2012-10-21T23:15:21+00:00\",\"description\":\"Have you ever been wondering where to find some good end-to-end examples build with Java EE 6? I have. Most of the stuff you find on the net is very basic\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/java-ee-6-example-galleria.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/java-ee-6-example-galleria.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/java-ee-6-example-galleria.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/oracle-glassfish-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/oracle-glassfish-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/java-ee-6-example-galleria.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"The Java EE 6 Example &#8211; Galleria\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/83c0139425aee143ae0d269868475066\",\"name\":\"Markus Eisele\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/231f7cefb75b74a4fb2ef22cd99fe55d2a9323ceca56e8bc9b19533bae3dac6a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/231f7cefb75b74a4fb2ef22cd99fe55d2a9323ceca56e8bc9b19533bae3dac6a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/231f7cefb75b74a4fb2ef22cd99fe55d2a9323ceca56e8bc9b19533bae3dac6a?s=96&d=mm&r=g\",\"caption\":\"Markus Eisele\"},\"description\":\"Markus is a Developer Advocate at Red Hat and focuses on JBoss Middleware. He is working with Java EE servers from different vendors since more than 14 years and talks about his favorite topics around Java EE on conferences all over the world. He has been a principle consultant and worked with different customers on all kinds of Java EE related applications and solutions. Beside that he has always been a prolific blogger, writer and tech editor for different Java EE related books. He is an active member of the German DOAG e.V. and it's representative on the iJUG e.V. As a Java Champion and former ACE Director he is well known in the community. Follow him on Twitter @myfear.\",\"sameAs\":[\"http:\\\/\\\/blog.eisele.net\\\/\",\"https:\\\/\\\/www.facebook.com\\\/eisele.markus\",\"http:\\\/\\\/de.linkedin.com\\\/in\\\/markuseisele\\\/en\",\"https:\\\/\\\/x.com\\\/http:\\\/\\\/twitter.com\\\/myfear\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/markus-eisele\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The Java EE 6 Example - Galleria - Java Code Geeks","description":"Have you ever been wondering where to find some good end-to-end examples build with Java EE 6? I have. Most of the stuff you find on the net is very basic","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html","og_locale":"en_US","og_type":"article","og_title":"The Java EE 6 Example - Galleria - Java Code Geeks","og_description":"Have you ever been wondering where to find some good end-to-end examples build with Java EE 6? I have. Most of the stuff you find on the net is very basic","og_url":"https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"https:\/\/www.facebook.com\/eisele.markus","article_published_time":"2012-03-15T11:20:00+00:00","article_modified_time":"2012-10-21T23:15:21+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/oracle-glassfish-logo.jpg","type":"image\/jpeg"}],"author":"Markus Eisele","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/myfear","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Markus Eisele","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html"},"author":{"name":"Markus Eisele","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/83c0139425aee143ae0d269868475066"},"headline":"The Java EE 6 Example &#8211; Galleria","datePublished":"2012-03-15T11:20:00+00:00","dateModified":"2012-10-21T23:15:21+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html"},"wordCount":2114,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/oracle-glassfish-logo.jpg","keywords":["Java EE6","Netbeans","Oracle GlassFish"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html","url":"https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html","name":"The Java EE 6 Example - Galleria - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/oracle-glassfish-logo.jpg","datePublished":"2012-03-15T11:20:00+00:00","dateModified":"2012-10-21T23:15:21+00:00","description":"Have you ever been wondering where to find some good end-to-end examples build with Java EE 6? I have. Most of the stuff you find on the net is very basic","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/oracle-glassfish-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/oracle-glassfish-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/java-ee-6-example-galleria.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"The Java EE 6 Example &#8211; Galleria"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/83c0139425aee143ae0d269868475066","name":"Markus Eisele","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/231f7cefb75b74a4fb2ef22cd99fe55d2a9323ceca56e8bc9b19533bae3dac6a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/231f7cefb75b74a4fb2ef22cd99fe55d2a9323ceca56e8bc9b19533bae3dac6a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/231f7cefb75b74a4fb2ef22cd99fe55d2a9323ceca56e8bc9b19533bae3dac6a?s=96&d=mm&r=g","caption":"Markus Eisele"},"description":"Markus is a Developer Advocate at Red Hat and focuses on JBoss Middleware. He is working with Java EE servers from different vendors since more than 14 years and talks about his favorite topics around Java EE on conferences all over the world. He has been a principle consultant and worked with different customers on all kinds of Java EE related applications and solutions. Beside that he has always been a prolific blogger, writer and tech editor for different Java EE related books. He is an active member of the German DOAG e.V. and it's representative on the iJUG e.V. As a Java Champion and former ACE Director he is well known in the community. Follow him on Twitter @myfear.","sameAs":["http:\/\/blog.eisele.net\/","https:\/\/www.facebook.com\/eisele.markus","http:\/\/de.linkedin.com\/in\/markuseisele\/en","https:\/\/x.com\/http:\/\/twitter.com\/myfear"],"url":"https:\/\/www.javacodegeeks.com\/author\/markus-eisele"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1004","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/92"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=1004"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1004\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/205"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=1004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=1004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=1004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}