{"id":11299,"date":"2013-04-17T10:00:41","date_gmt":"2013-04-17T07:00:41","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=11299"},"modified":"2019-12-09T21:40:53","modified_gmt":"2019-12-09T19:40:53","slug":"java-ee-cdi-conversationscoped-example","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.html","title":{"rendered":"Java EE CDI ConversationScoped example"},"content":{"rendered":"<p>In this tutorial we shall show you how to create and use a <code>ConversationScoped<\/code> Bean in a web application. In CDI, a bean is a source of contextual objects that define application state and\/or logic. A Java EE component is a bean if the lifecycle of its instances may be managed by the container according to the lifecycle context model defined in the CDI specification.<\/p>\n<p>The <code>ConversationScoped<\/code> Bean is a bean whose scope describes a user\u2019s interaction with a JavaServer Faces application, within explicit developer-controlled boundaries that extend the scope across multiple invocations of the JavaServer Faces lifecycle. All long-running conversations are scoped to a particular HTTP servlet session and may not cross session boundaries.<\/p>\n<p>With <code>ConversationScoped<\/code> beans we can achieve the same functionality we need from a ViewScoped JSF bean. In addition, with the <code>ConversationScoped<\/code> beans we can maintain the same conversation \u2013 or state \u2013 between distinct page requests. But when we leave a conversation without it, the managed bean will stay active until it times out.<\/p>\n<p>Here we will create a JFS web application that uses a <code>ConversationScoped<\/code> bean so as to achieve a conversation between a client and a server. The client will make multiple requests to the server, by navigating to distinct pages, so as to show how the bean is able to maintain a state.<\/p>\n<p>Our preferred development environment is <a href=\"http:\/\/www.eclipse.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Eclipse<\/a>. We are using Eclipse Juno (4.2) version, along with <a href=\"http:\/\/maven.apache.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Maven<\/a> Integration plugin version 3.1.0. You can download Eclipse from <a href=\"http:\/\/www.eclipse.org\/downloads\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a> and Maven Plugin for Eclipse from <a href=\"http:\/\/maven.apache.org\/eclipse-plugin.html\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>. The installation of Maven plugin for Eclipse is out of the scope of this tutorial and will not be discussed. <a href=\"http:\/\/tomcat.apache.org\/download-70.cgi\" target=\"_blank\" rel=\"noopener noreferrer\">Tomcat 7<\/a> is the application server used.<\/p>\n<p>Let&#8217;s begin,<\/p>\n<h2>1. Create a new Maven project<\/h2>\n<p>Go to File -&gt; Project -&gt;Maven -&gt; Maven Project.<\/p>\n<p><a href=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/06\/New-Maven-Project.png\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-4341\" alt=\"New-Maven-Project\" src=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/06\/New-Maven-Project.png\"><\/a><\/p>\n<p>In the &#8220;Select project name and location&#8221; page of the wizard, make sure that &#8220;Create a simple project (skip archetype selection)&#8221; option is <strong>unchecked<\/strong>, hit &#8220;Next&#8221; to continue with default values.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/07\/new-project.png\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/07\/new-project.png\" alt=\"new project\" width=\"602\" height=\"547\" class=\"alignnone size-full wp-image-18290\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/07\/new-project.png 602w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/07\/new-project-300x272.png 300w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/a><\/p>\n<p>Here the maven archetype for creating a web application must be added. Click on <strong>&#8220;Add Archetype&#8221;<\/strong> and add the archetype. Set the &#8220;Archetype Group Id&#8221; variable to <code>\"org.apache.maven.archetypes\"<\/code>, the &#8220;Archetype artifact Id&#8221; variable to <code>\"maven-archetype-webapp\"<\/code> and the &#8220;Archetype Version&#8221; to <code>\"1.0\"<\/code>. Click on <strong>&#8220;OK&#8221;<\/strong> to continue.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/07\/maven-archetype-webapp.png\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/07\/maven-archetype-webapp.png\" alt=\"maven-archetype-webapp\" width=\"660\" height=\"549\" class=\"alignnone size-full wp-image-18291\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/07\/maven-archetype-webapp.png 660w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/07\/maven-archetype-webapp-300x249.png 300w\" sizes=\"(max-width: 660px) 100vw, 660px\" \/><\/a><\/p>\n<p>In the &#8220;Enter an artifact id&#8221; page of the wizard, you can define the name and main package of your project. Set the &#8220;Group Id&#8221; variable to <code>\"com.javacodegeeks.snippets.enterprise\"<\/code> and the &#8220;Artifact Id&#8221; variable to <code>\"cdibeans\"<\/code>. The aforementioned selections compose the main project package as <code>\"com.javacodegeeks.snippets.enterprise.cdibeans\"<\/code> and the project name as <code>\"cdibeans\"<\/code>. Set the &#8220;Package&#8221; variable to <code>\"war\"<\/code>, so that a war file will be created to be deployed to tomcat server. Hit &#8220;Finish&#8221; to exit the wizard and to create your project.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/newcdiproject1.png\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/newcdiproject1.png\" alt=\"newcdiproject1\" width=\"602\" height=\"542\" class=\"alignnone size-full wp-image-18913\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/newcdiproject1.png 602w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/newcdiproject1-300x270.png 300w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/a><\/p>\n<p>The Maven project structure is shown below:<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/newcdiproject2.png\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/newcdiproject2.png\" alt=\"newcdiproject2\" width=\"369\" height=\"396\" class=\"alignnone size-full wp-image-18914\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/newcdiproject2.png 369w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/newcdiproject2-279x300.png 279w\" sizes=\"(max-width: 369px) 100vw, 369px\" \/><\/a><\/p>\n<ul>It consists of the following folders:<\/p>\n<li>\/src\/main\/java folder, that contains source files for the dynamic content of the application,<\/li>\n<li>\/src\/test\/java folder contains all source files for unit tests,<\/li>\n<li>\/src\/main\/resources folder contains configurations files,<\/li>\n<li>\/target folder contains the compiled and packaged deliverables,<\/li>\n<li>\/src\/main\/resources\/webapp\/WEB-INF folder contains the deployment descriptors for the Web application ,<\/li>\n<li>the pom.xml is the project object model (POM) file. The single file that contains all project related configuration.<\/li>\n<\/ul>\n<h2>2. Add all the necessary dependencies<\/h2>\n<p>You can add the dependencies in Maven\u2019s <code>pom.xml<\/code> file, by editing it at the &#8220;Pom.xml&#8221; page of the POM editor, as shown below:<br \/>\n&nbsp;<br \/>\n<span style=\"text-decoration: underline;\"><em>pom.xml:<\/em><\/span><div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\"brush:xml\">&lt;project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n\txsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/maven-v4_0_0.xsd\"&gt;\n\t&lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;\n\t&lt;groupId&gt;com.javacodegeeks.snippets.enterprise.cdi&lt;\/groupId&gt;\n\t&lt;artifactId&gt;cdibeans&lt;\/artifactId&gt;\n\t&lt;packaging&gt;war&lt;\/packaging&gt;\n\t&lt;version&gt;0.0.1-SNAPSHOT&lt;\/version&gt;\n\t&lt;name&gt;cdibeans Maven Webapp&lt;\/name&gt;\n\t&lt;url&gt;http:\/\/maven.apache.org&lt;\/url&gt;\n\t&lt;dependencies&gt;\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;org.jboss.weld.servlet&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;weld-servlet&lt;\/artifactId&gt;\n\t\t\t&lt;version&gt;1.1.10.Final&lt;\/version&gt;\n\t\t&lt;\/dependency&gt;\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;javax.servlet&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;jstl&lt;\/artifactId&gt;\n\t\t\t&lt;version&gt;1.2&lt;\/version&gt;\n\t\t&lt;\/dependency&gt;\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;javax.servlet&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;javax.servlet-api&lt;\/artifactId&gt;\n\t\t\t&lt;version&gt;3.0.1&lt;\/version&gt;\n\t\t\t&lt;scope&gt;provided&lt;\/scope&gt;\n\t\t&lt;\/dependency&gt;\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;org.glassfish&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;javax.faces&lt;\/artifactId&gt;\n\t\t\t&lt;version&gt;2.1.7&lt;\/version&gt;\n\t\t&lt;\/dependency&gt;\n\t&lt;\/dependencies&gt;\n\n\t&lt;build&gt;\n\t\t&lt;finalName&gt;cdibeans&lt;\/finalName&gt;\n\t&lt;\/build&gt;\n&lt;\/project&gt;\n<\/pre>\n<p>As you can see Maven manages library dependencies declaratively. A local repository is created (by default under {user_home}\/.m2 folder) and all required libraries are downloaded and placed there from public repositories. Furthermore intra \u2013 library dependencies are automatically resolved and manipulated.<\/p>\n<h2>3. Create the ConversationScoped Bean<\/h2>\n<p>The <code>CDIConversationScopedBean.java<\/code> class is a <code>ConversationScoped<\/code> Bean, annotated as <code>@ConversationScoped<\/code>. It is given the <code>cDIConversationScopedBean<\/code> name in the container, with the <code>@Named<\/code> annotation. First of all, the class must implement the <a href=\"http:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/io\/Serializable.html\" target=\"_blank\" rel=\"noopener noreferrer\">Serializable<\/a> interface, so as to be a <code>ConversationScoped<\/code> managed bean. It must also use the <code>Conversation<\/code> interface, which is injected in the bean, with the <code>@Inject<\/code> annotation. A <code>Conversation<\/code> instance is injected in the bean so as to allow the application to manage the conversation context by marking the current conversation as transient or long-running and specifying a conversation identifier (the unique identifier of the conversation).<\/p>\n<p>The class has a String property, called <code>message<\/code>, and <code>getter<\/code> and <code>setter<\/code> methods for the property. The <code>init()<\/code> method, annotated with the <code>@PostConstruct<\/code> annotation is the method called when the bean is created and it <code>initializes<\/code> the message property.<\/p>\n<p>The <code>initConversation()<\/code> and <code>endConversation()<\/code> are the ones to begin and end the conversation. The <code>initConversation()<\/code> method marks the transient <code>conversation<\/code> as long-running, whereas the <code>endConversation()<\/code> method marks the long-running <code>conversation<\/code> as transient, returning to the initial page of the application. If the conversation is in the transient state at the end of a JSF request, it is destroyed, and the conversation context is also destroyed. If the conversation is in the long-running state at the end of a JSF request, it is not destroyed. Instead, it may be propagated to other requests. All long-running conversations have a string-valued unique identifier.<\/p>\n<p>The class has another two methods that are invoked by the client through the pages, as will be shown later.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>CDIConversationScopedBean.java<\/em><\/span><\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.snippets.enterprise.cdibeans;\n\nimport java.io.Serializable;\nimport java.util.Random;\n\nimport javax.annotation.PostConstruct;\nimport javax.enterprise.context.Conversation;\nimport javax.enterprise.context.ConversationScoped;\nimport javax.faces.context.FacesContext;\nimport javax.inject.Inject;\nimport javax.inject.Named;\n\n@Named(value=\"cDIConversationScopedBean\")\n@ConversationScoped\npublic class CDIConversationScopedBean implements Serializable {\n\n\tprivate static final long serialVersionUID = -6541718762358561835L;\n\n\t@Inject\n    private Conversation conversation;\n\t\n\tprivate String message;\n\t\n\tprivate String[] words = {\"Hello!!\",\"Have a nice day!!\",\"Goodbye..\",\"Hi!\",\"Goodmorning!\",\"Bye..\",\"Good evening..\"};\t\n\n\tpublic String getMessage() {\n\t\treturn message;\n\t}\n\n\tpublic void setMessage(String message) {\n\t\tthis.message = message;\n\t}\n\n\tpublic Conversation getConversation() {\n\t\treturn conversation;\n\t}\n\n\t@PostConstruct\n\tpublic void init(){\n\t\tmessage = \"Hello from the JavaCodeGeeks..\";\n\t}\n\t\n\tpublic void initConversation(){\n\t\tif (!FacesContext.getCurrentInstance().isPostback() \n\t\t\t&amp;&amp; conversation.isTransient()) {\n\t\t\t\n\t\t\tconversation.begin();\n\t\t}\n\t}\n\t\n\tpublic void sendMessage(){\n\t\tmessage = words[new Random().nextInt(7)];\n\t}\n\t\n\tpublic String next(){\n\t\treturn \"secondpage?faces-redirect=true\";\n\t}\n\t\n\tpublic String endConversation(){\n\t\tif(!conversation.isTransient()){\n\t\t\tconversation.end();\n\t\t}\n\t\treturn \"firstpage?faces-redirect=true\";\n\t}\n\t\n}\n<\/pre>\n<h2>4. Create the pages<\/h2>\n<p>The first page is the initial page which will be invoked by a client to begin the conversation. It sets the <code>PreRenderViewEvent<\/code>, that is fired before the page is displayed. The <code>PreRenderViewEvent<\/code> invokes the <code>initConversation()<\/code> method of the bean to mark the conversation as long-running. The page shows the <code>message<\/code> property of the bean, and every time the &#8220;Get your message&#8221; button is clicked the <code>message<\/code> is changed. By clicking the &#8220;Continue with this message&#8221; commandLink the <code>next()<\/code> method of the bean is invoked and the client is redirected to the second page.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>firstPage.xhtml<\/em><\/span><\/p>\n<pre class=\"brush:xml\">&lt;!DOCTYPE html&gt;\n&lt;html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"\n\txmlns:h=\"http:\/\/java.sun.com\/jsf\/html\"\n\txmlns:f=\"http:\/\/java.sun.com\/jsf\/core\"&gt;\n&lt;f:event listener=\"#{cDIConversationScopedBean.initConversation}\"\n\ttype=\"preRenderView\"&gt;&lt;\/f:event&gt;\n&lt;h:head&gt;\n\t&lt;title&gt;JCG conversation 1&lt;\/title&gt;\n&lt;\/h:head&gt;\n&lt;h:body&gt;\n\t&lt;h:outputText value=\"Starting conversation\"&gt;&lt;\/h:outputText&gt;\n\t&lt;br \/&gt;\n\t&lt;br \/&gt;\n\t&lt;h:form&gt;\n\t\t&lt;h:outputText value=\"#{cDIConversationScopedBean.message}\"&gt;&lt;\/h:outputText&gt;\n\t\t&lt;br \/&gt;\n\t\t&lt;h:commandButton value=\"Get your message\" type=\"submit\"&gt;\n\t\t\t&lt;f:ajax execute=\"@form\"\n\t\t\t\tlistener=\"#{cDIConversationScopedBean.sendMessage}\" render=\"@form\" \/&gt;\n\t\t&lt;\/h:commandButton&gt;\n\t\t&lt;br \/&gt;\n\t\t&lt;br \/&gt;\n\t\t&lt;h:commandLink action=\"#{cDIConversationScopedBean.next}\"\n\t\t\tvalue=\"Continue with this message\" \/&gt;\n\t&lt;\/h:form&gt;\n&lt;\/h:body&gt;\n&lt;\/html&gt;\n<\/pre>\n<p>The second page displays again the <code>message<\/code> value, which is the one selected in the previous page by the client. By clicking on the &#8220;Let&#8217;s end the conversation&#8221; link, the client is now redirected to the third page.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>secondPage.xhtml<\/em><\/span><\/p>\n<pre class=\"brush:xml\">&lt;!DOCTYPE html&gt;\n&lt;html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"\n\txmlns:h=\"http:\/\/java.sun.com\/jsf\/html\"\n\txmlns:f=\"http:\/\/java.sun.com\/jsf\/core\"&gt;\n&lt;h:head&gt;\n\t&lt;title&gt;JCG conversation 2&lt;\/title&gt;\n&lt;\/h:head&gt;\n&lt;h:body&gt;\n\t&lt;h:outputText value=\"Continuing..\"&gt;&lt;\/h:outputText&gt;\n\t&lt;br \/&gt;\n\t&lt;br \/&gt;\n\t&lt;h:outputText value=\"#{cDIConversationScopedBean.message}\"&gt;&lt;\/h:outputText&gt;\n\t&lt;br \/&gt;\n\t&lt;br \/&gt;\n\t&lt;h:link outcome=\"\/thirdpage.xhtml\" value=\"Let's end the converation\"&gt;\n\t\t&lt;f:param name=\"cid\" value=\"#{cDIConversationScopedBean.conversation.id}\" \/&gt;\n\t&lt;\/h:link&gt;\n&lt;\/h:body&gt;\n&lt;\/html&gt;\n<\/pre>\n<p>The third page displays again the <code>message<\/code> value. By clicking on the &#8220;End conversation&#8221; commandLink, the <code>endConversation()<\/code> method of the bean is invoked that redirects the client to the first page, setting the <code>conversation<\/code> to transient.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>thirdPage.xhtml<\/em><\/span><\/p>\n<pre class=\"brush:xml\">&lt;!DOCTYPE html&gt;\n&lt;html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"\n\txmlns:h=\"http:\/\/java.sun.com\/jsf\/html\"\n\txmlns:f=\"http:\/\/java.sun.com\/jsf\/core\"&gt;\n&lt;h:head&gt;\n\t&lt;title&gt;JCG conversation 3&lt;\/title&gt;\n&lt;\/h:head&gt;\n&lt;h:body&gt;\n\t&lt;h:outputText value=\"Ending conversation\"&gt;&lt;\/h:outputText&gt;\n\t&lt;br \/&gt;\n\t&lt;br \/&gt;\n\t&lt;h:outputText value=\"#{cDIConversationScopedBean.message}\"&gt;&lt;\/h:outputText&gt;\n\t&lt;br \/&gt;\n\t&lt;br \/&gt;\n\t&lt;h:form&gt;\n\t\t&lt;h:commandLink action=\"#{cDIConversationScopedBean.endConversation}\"\n\t\t\tvalue=\"End conversation\" \/&gt;\n\t&lt;\/h:form&gt;\n&lt;\/h:body&gt;\n&lt;\/html&gt;\n<\/pre>\n<h2>5. Configure web.xml<\/h2>\n<p>In a web application the <code>web.xml<\/code> file is the file that defines everything about the application that a server needs to know. Servlets and other components like filters or listeners, initialization parameters, container-managed security constraints, resources, welcome pages, etc are set here. In a JFS application we need to define in <code>web.xml<\/code> file the <code>javax.faces.webapp.FacesServlet<\/code>, that is the class responsible for handling JSF applications. <code>FacesServlet<\/code> is the central controller for the JSF application. It receives all requests for the JSF application and initializes the JSF components before the JSP is displayed. So, <code>web.xml<\/code> file has an entry that defines the <code>FacesServlet<\/code>. It is the <code>servlet<\/code> entry. It also has a <code>servlet-mapping<\/code> entry in order to map all requests whose URL ends with <code>.xhtml<\/code> to be handled by the servlet. Here, we also specify the servlet listener (used to boot Weld, and control its interaction with requests).<\/p>\n<p><span style=\"text-decoration: underline;\"><em>web.xml<\/em><\/span><\/p>\n<pre class=\"brush:xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;web-app xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n\txmlns=\"http:\/\/java.sun.com\/xml\/ns\/javaee\" xmlns:web=\"http:\/\/java.sun.com\/xml\/ns\/javaee\/web-app_2_5.xsd\"\n\txsi:schemaLocation=\"http:\/\/java.sun.com\/xml\/ns\/javaee \n\thttp:\/\/java.sun.com\/xml\/ns\/javaee\/web-app_3_0.xsd\"\n\tid=\"WebApp_ID\" version=\"3.0\"&gt;\n\n\t&lt;display-name&gt;CDI Web Application&lt;\/display-name&gt;\n\n\t&lt;listener&gt;\n\t\t&lt;listener-class&gt;org.jboss.weld.environment.servlet.Listener&lt;\/listener-class&gt;\n\t&lt;\/listener&gt;\n\t&lt;servlet&gt;\n\t\t&lt;servlet-name&gt;faces&lt;\/servlet-name&gt;\n\t\t&lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;\/servlet-class&gt;\n\t\t&lt;load-on-startup&gt;1&lt;\/load-on-startup&gt;\n\t&lt;\/servlet&gt;\n\t&lt;servlet-mapping&gt;\n\t\t&lt;servlet-name&gt;faces&lt;\/servlet-name&gt;\n\t\t&lt;url-pattern&gt;*.xhtml&lt;\/url-pattern&gt;\n\t&lt;\/servlet-mapping&gt;\n\n&lt;\/web-app&gt;\n<\/pre>\n<h2>6. Run the application<\/h2>\n<p>In order to run the application we need to build the project with Maven. The <code>war<\/code> file produced must be placed in <code>webapps<\/code> folder of tomcat. Then, we can hit on :<\/p>\n<p>localhost:8080\/cdibeans\/firstpage.xhtml<\/p>\n<p>on a browser and the result is the one shown below:<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/conv1.png\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/conv1.png\" alt=\"conv1\" width=\"677\" height=\"469\" class=\"alignnone size-full wp-image-18916\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/conv1.png 677w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/conv1-300x207.png 300w\" sizes=\"(max-width: 677px) 100vw, 677px\" \/><\/a><\/p>\n<p>By clicking on the &#8220;Get your message&#8221; button we can change the <code>message<\/code>, as shown below:<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/conv2.png\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/conv2.png\" alt=\"conv2\" width=\"682\" height=\"451\" class=\"alignnone size-full wp-image-18917\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/conv2.png 682w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/conv2-300x198.png 300w\" sizes=\"(max-width: 682px) 100vw, 682px\" \/><\/a><\/p>\n<p>By clicking on the &#8220;Continue with this message&#8221; link we move on to the next page, carrying along the <code>message<\/code> value.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/conv3.png\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/conv3.png\" alt=\"conv3\" width=\"672\" height=\"383\" class=\"alignnone size-full wp-image-18918\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/conv3.png 672w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/conv3-300x170.png 300w\" sizes=\"(max-width: 672px) 100vw, 672px\" \/><\/a><\/p>\n<p>By clicking on the &#8220;Let&#8217;s end the conversation&#8221; link we move on to the next page, and still the <code>message<\/code> value is kept.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/conv4.png\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/conv4.png\" alt=\"conv4\" width=\"672\" height=\"368\" class=\"alignnone size-full wp-image-18919\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/conv4.png 672w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/conv4-300x164.png 300w\" sizes=\"(max-width: 672px) 100vw, 672px\" \/><\/a><\/p>\n<p>Now if we click on the &#8220;End conversation&#8221; link, the conversation is closed and the first page is shown again, starting a new conversation.<\/p>\n<p>&nbsp;<br \/>\nThis was a tutorial of a Java EE CDI ConversationScoped Bean.<br \/>\n&nbsp;<br \/>\nDownload the source code of this tutorial: <a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/04\/CDIConversationScopedBeansExample.zip\">CDIConversationScopedBeansExample.zip<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial we shall show you how to create and use a ConversationScoped Bean in a web application. In CDI, a bean is a source of contextual objects that define application state and\/or logic. A Java EE component is a bean if the lifecycle of its instances may be managed by the container according &hellip;<\/p>\n","protected":false},"author":472,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[290],"class_list":["post-11299","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-cdi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Java EE CDI ConversationScoped example<\/title>\n<meta name=\"description\" content=\"In this tutorial we shall show you how to create and use a ConversationScoped Bean in a web application. In CDI, a bean is a source of contextual objects\" \/>\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\/2013\/04\/java-ee-cdi-conversationscoped-example.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java EE CDI ConversationScoped example\" \/>\n<meta property=\"og:description\" content=\"In this tutorial we shall show you how to create and use a ConversationScoped Bean in a web application. In CDI, a bean is a source of contextual objects\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.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:published_time\" content=\"2013-04-17T07:00:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-12-09T19:40:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-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=\"Theodora Fragkouli\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Theodora Fragkouli\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/java-ee-cdi-conversationscoped-example.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/java-ee-cdi-conversationscoped-example.html\"},\"author\":{\"name\":\"Theodora Fragkouli\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/6bdf5e6534337198ce06de139e9b617b\"},\"headline\":\"Java EE CDI ConversationScoped example\",\"datePublished\":\"2013-04-17T07:00:41+00:00\",\"dateModified\":\"2019-12-09T19:40:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/java-ee-cdi-conversationscoped-example.html\"},\"wordCount\":1312,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/java-ee-cdi-conversationscoped-example.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"keywords\":[\"CDI\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/java-ee-cdi-conversationscoped-example.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/java-ee-cdi-conversationscoped-example.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/java-ee-cdi-conversationscoped-example.html\",\"name\":\"Java EE CDI ConversationScoped example\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/java-ee-cdi-conversationscoped-example.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/java-ee-cdi-conversationscoped-example.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2013-04-17T07:00:41+00:00\",\"dateModified\":\"2019-12-09T19:40:53+00:00\",\"description\":\"In this tutorial we shall show you how to create and use a ConversationScoped Bean in a web application. In CDI, a bean is a source of contextual objects\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/java-ee-cdi-conversationscoped-example.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/java-ee-cdi-conversationscoped-example.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/java-ee-cdi-conversationscoped-example.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"java-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/java-ee-cdi-conversationscoped-example.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\":\"Java EE CDI ConversationScoped example\"}]},{\"@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\\\/6bdf5e6534337198ce06de139e9b617b\",\"name\":\"Theodora Fragkouli\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/50acde9ff30ae7c7473f7581747f7cdc58aa0156e56bf0a578adaa59ca93ae73?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/50acde9ff30ae7c7473f7581747f7cdc58aa0156e56bf0a578adaa59ca93ae73?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/50acde9ff30ae7c7473f7581747f7cdc58aa0156e56bf0a578adaa59ca93ae73?s=96&d=mm&r=g\",\"caption\":\"Theodora Fragkouli\"},\"description\":\"Theodora has graduated from Computer Engineering and Informatics Department in the University of Patras. She also holds a Master degree in Economics from the National and Technical University of Athens. During her studies she has been involved with a large number of projects ranging from programming and software engineering to telecommunications, hardware design and analysis. She works as a junior Software Engineer in the telecommunications sector where she is mainly involved with projects based on Java and Big Data technologies.\",\"sameAs\":[\"http:\\\/\\\/www.javacodegeeks.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/theodora-fragkouli\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java EE CDI ConversationScoped example","description":"In this tutorial we shall show you how to create and use a ConversationScoped Bean in a web application. In CDI, a bean is a source of contextual objects","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\/2013\/04\/java-ee-cdi-conversationscoped-example.html","og_locale":"en_US","og_type":"article","og_title":"Java EE CDI ConversationScoped example","og_description":"In this tutorial we shall show you how to create and use a ConversationScoped Bean in a web application. In CDI, a bean is a source of contextual objects","og_url":"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2013-04-17T07:00:41+00:00","article_modified_time":"2019-12-09T19:40:53+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Theodora Fragkouli","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Theodora Fragkouli","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.html"},"author":{"name":"Theodora Fragkouli","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/6bdf5e6534337198ce06de139e9b617b"},"headline":"Java EE CDI ConversationScoped example","datePublished":"2013-04-17T07:00:41+00:00","dateModified":"2019-12-09T19:40:53+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.html"},"wordCount":1312,"commentCount":2,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","keywords":["CDI"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.html","url":"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.html","name":"Java EE CDI ConversationScoped example","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2013-04-17T07:00:41+00:00","dateModified":"2019-12-09T19:40:53+00:00","description":"In this tutorial we shall show you how to create and use a ConversationScoped Bean in a web application. In CDI, a bean is a source of contextual objects","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","width":150,"height":150,"caption":"java-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.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":"Java EE CDI ConversationScoped example"}]},{"@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\/6bdf5e6534337198ce06de139e9b617b","name":"Theodora Fragkouli","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/50acde9ff30ae7c7473f7581747f7cdc58aa0156e56bf0a578adaa59ca93ae73?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/50acde9ff30ae7c7473f7581747f7cdc58aa0156e56bf0a578adaa59ca93ae73?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/50acde9ff30ae7c7473f7581747f7cdc58aa0156e56bf0a578adaa59ca93ae73?s=96&d=mm&r=g","caption":"Theodora Fragkouli"},"description":"Theodora has graduated from Computer Engineering and Informatics Department in the University of Patras. She also holds a Master degree in Economics from the National and Technical University of Athens. During her studies she has been involved with a large number of projects ranging from programming and software engineering to telecommunications, hardware design and analysis. She works as a junior Software Engineer in the telecommunications sector where she is mainly involved with projects based on Java and Big Data technologies.","sameAs":["http:\/\/www.javacodegeeks.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/theodora-fragkouli"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/11299","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\/472"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=11299"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/11299\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=11299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=11299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=11299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}