{"id":41861,"date":"2016-11-09T11:46:34","date_gmt":"2016-11-09T06:16:34","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=41861"},"modified":"2017-05-10T11:38:55","modified_gmt":"2017-05-10T06:08:55","slug":"introduction-to-wildfly","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/introduction-to-wildfly\/","title":{"rendered":"Introduction to Wildfly"},"content":{"rendered":"<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-41865 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image00.png\" alt=\"image00\" width=\"247\" height=\"130\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image00.png 600w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image00-300x157.png 300w\" sizes=\"(max-width: 247px) 100vw, 247px\" \/><br \/>\nWildfly, previously known as JBoss AS, is a fully implemented JEE container &#8211; application server, authored by JBoss Incorporated. \u00a0In 2006, JBoss Inc was acquired by Red Hat and since then Wildfly became their product.<\/p>\n<p><span style=\"font-weight: 400;\">Wildfly is production ready, cross-platform and open-source application server with paid support subscription from Red Hat. The latest version being 10, let\u2019s have a glimpse of its bells and whistles.<\/span><\/p>\n<p><b>What\u2019s unique about Wildfly<br \/>\n<\/b>With many <a title=\"java consulting services\" href=\"http:\/\/www.tothenew.com\/java-development-services\">Java application<\/a> servers like Tomcat, Jetty, WebSphere available, why would one use Wildfly? Good that you asked, here\u2019s why:<\/p>\n<ul>\n<li><b><b>Management Console<br \/>\n<\/b><\/b>One of my favorite features about Wildfly is its comprehensive console which an administrator can <a title=\"devops consulting services\" href=\"http:\/\/www.tothenew.com\/devops-automation-consulting\">deploy<\/a>, configure and monitor using a web browser. Through users and groups, administrators can also restrict access to desired functionality in the console to certain users.<\/li>\n<\/ul>\n<ul>\n<li><b><b>Incredible Web Performance and Scalability<br \/>\n<\/b><\/b><span style=\"font-weight: 400;\">With the new web server, <\/span><a href=\"http:\/\/undertow.io\/\"><span style=\"font-weight: 400;\">Undertow<\/span><\/a><span style=\"font-weight: 400;\"> and its ability to work in clusters, Wildfly is the one of the best-in-class, paid or otherwise.<\/span><\/li>\n<\/ul>\n<ul>\n<li><b><b>Modular Approach &#8211; Customizable Runtime<br \/>\n<\/b><\/b>Developers of Wildfly have always maintained modular approach in designing it which not only benefits developers who use it, but also the administrators who manage it.\u00a0<span style=\"font-weight: 400;\">You can very easily plug in and out various modules from the application server and make it light or efficient on memory and CPU consumption with just few clicks. <\/span><i><span style=\"font-weight: 400;\">Yes, Wildfly comes with a user-friendly management console.<\/span><\/i><\/li>\n<\/ul>\n<ul>\n<li><b><b>Unified Configuration<br \/>\n<\/b><\/b>Most of the configurations you will do to a Wildfly installation would be done through a couple of files. No more tackling various configuration files to manage different modules.<\/li>\n<\/ul>\n<ul>\n<li><b><b>Operational Modes<br \/>\n<\/b><\/b>Wildfly offers two mode of operations: Standalone and Domain mode<\/p>\n<ul>\n<li><b>Standalone<\/b><span style=\"font-weight: 400;\"> mode is the traditional single node application server with a single JVM and its management console.<\/span><\/li>\n<li><b>Domain <\/b><span style=\"font-weight: 400;\">mode is a multi-JVM application server nodes, in which all the nodes share the deployed artifacts and configurations. All the application server nodes are managed by a central point of management, called domain controller. Even the domain mode consumes minimal resources.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li><b><b>Concurrent and Fast Classloading<br \/>\n<\/b><\/b>Dependency resolution algorithm in Wildly has been improved over time and its complexity is brought down to O. Multiple versions of a jar do not slow down classloading. For even faster results, classes are loaded concurrently.<\/li>\n<\/ul>\n<ul>\n<li><b><b>Out-of-the-box Modules<br \/>\n<\/b><\/b>Wildfly enables developers with several modules in the form of out-of-the-box APIs, which relieves them and the administrators from the hassle of integrating the modules manually. Some of the modules are as follows:<\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">Infinispan for Distributed Caching<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Hibernate and JPA Integration<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Java Messaging Service Integration<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Java Naming and Directory Interface<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Java Transaction API<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Commonly Used Data Layer\u2019s JDBC Integration<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Whoa, That was too much information! Let\u2019s get our hands dirty and see how easy it is to install and configure Wildfly as a Daemon.<\/span><\/p>\n<p><b>Installation, Running and Daemon Configuration<br \/>\n<\/b>As most of the open source, cross-platform software packages are installed, Wildfly is also one of \u201cunzip and go\u201d types.<br \/>\nWe will be using Ubuntu 16.04 for this demo and for the sake of simplicity, we will be using <strong>Standalone<\/strong> mode. For <strong>Domain<\/strong> mode, configuration, stay tuned to our next blog.<\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Install JDK 8<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-41863\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image01.png\" alt=\"image01\" width=\"664\" height=\"28\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image01.png 664w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image01-300x12.png 300w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image01-624x26.png 624w\" sizes=\"(max-width: 664px) 100vw, 664px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Download the <\/span><a href=\"http:\/\/download.jboss.org\/wildfly\/10.0.0.Final\/wildfly-10.0.0.Final.zip\"><span style=\"font-weight: 400;\">zip<\/span><\/a><span style=\"font-weight: 400;\"> from the Wildfly official <\/span><span style=\"font-weight: 400;\">download<\/span><span style=\"font-weight: 400;\"> page<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-41870\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image05.png\" alt=\"image05\" width=\"872\" height=\"36\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image05.png 872w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image05-300x12.png 300w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image05-624x25.png 624w\" sizes=\"(max-width: 872px) 100vw, 872px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Unzip the downloaded file and extract it to \/opt\/wildfly<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-41878 gr-progress\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image031.png\" alt=\"image03\" width=\"466\" height=\"51\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image031.png 466w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image031-300x32.png 300w\" sizes=\"(max-width: 466px) 100vw, 466px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Open the main configuration file of standalone mode and make the following changes. These changes will make the Wildfly run on the network interface which has the private IP. replace 192.168.33.6 with your with your private IP address.<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-41871\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image06.png\" alt=\"image06\" width=\"644\" height=\"31\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image06.png 644w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image06-300x14.png 300w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image06-624x30.png 624w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-41873\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image08.png\" alt=\"image08\" width=\"927\" height=\"176\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image08.png 927w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image08-300x56.png 300w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image08-624x118.png 624w\" sizes=\"(max-width: 927px) 100vw, 927px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Run the server.<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-41876\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image11.png\" alt=\"image11\" width=\"847\" height=\"428\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image11.png 847w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image11-300x151.png 300w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image11-624x315.png 624w\" sizes=\"(max-width: 847px) 100vw, 847px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Check the installation on a web browser.<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-41874\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image09.png\" alt=\"image09\" width=\"453\" height=\"288\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image09.png 735w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image09-300x190.png 300w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image09-624x396.png 624w\" sizes=\"(max-width: 453px) 100vw, 453px\" \/><br \/>\n<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">Now Wildfly is installed and is running through a script. Let\u2019s just quickly daemonize it for easier access.<\/span><\/p>\n<ol>\n<li>Quit the already running process by Ctrl+c and go to \/opt\/wildfly\/docs\/contrib\/scripts\/systemd<\/li>\n<li>Execute the following commands which are already mentioned in the README file<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-41875\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image10.png\" alt=\"image10\" width=\"463\" height=\"124\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image10.png 463w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image10-300x80.png 300w\" sizes=\"(max-width: 463px) 100vw, 463px\" \/><\/li>\n<li><span style=\"font-weight: 400;\">Open \/etc\/wildfly\/wildfly.conf and make the following change<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-41877\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image12.png\" alt=\"image12\" width=\"313\" height=\"50\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image12.png 313w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image12-300x47.png 300w\" sizes=\"(max-width: 313px) 100vw, 313px\" \/><br \/>\n<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Open the \/etc\/systemd\/system\/wildfly.service and make the following changes. We are doing so to run the daemon as root user. This is being done for the simplicity<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-41869\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image04.png\" alt=\"image04\" width=\"410\" height=\"72\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image04.png 410w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image04-300x52.png 300w\" sizes=\"(max-width: 410px) 100vw, 410px\" \/><br \/>\n<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Start and check the service. Your output may differ from the one mentioned below, it could be due to operating system and its version<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-41872\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image07.png\" alt=\"image07\" width=\"1090\" height=\"366\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image07.png 1090w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image07-300x100.png 300w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image07-1024x343.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image07-624x209.png 624w\" sizes=\"(max-width: 1090px) 100vw, 1090px\" \/><br \/>\n<\/span><\/li>\n<\/ol>\n<p><b>Deployment<br \/>\n<\/b>In this section, we will be deploying a simple web application (war file) on Wildfly.<br \/>\nYou can use the\u00a0<a href=\"https:\/\/github.com\/pokekrishna\/blogartefacts-introduction-to-wildfly\/blob\/master\/cluster-demo.war?raw=true\">cluster-demo<\/a>\u00a0app for this tutorial, don&#8217;t be bothered by its name, it works on Standalone mode just as fine as it would on Domain mode.<\/p>\n<p>As you would have already guessed it, this part would be a cakewalk even for beginners, you just have to copy your war file into \/opt\/wildfly\/standalone\/deployments\/ directory and voila, you are done.<\/p>\n<p><span style=\"font-weight: 400;\">Check your deployment in your browser by going to address &#8211; <\/span><i><span style=\"font-weight: 400;\">http:\/\/host:8080\/application-context<\/span><\/i><\/p>\n<p><i><span style=\"font-weight: 400;\"> <img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-41867\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image021.png\" alt=\"image02\" width=\"414\" height=\"136\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/image021.png 414w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/image021-300x98.png 300w\" sizes=\"(max-width: 414px) 100vw, 414px\" \/><br \/>\n<\/span><\/i><\/p>\n<p><span style=\"font-weight: 400;\">Should you face any issue in deployment, you can check the logs in <\/span><i><span style=\"font-weight: 400;\">\/opt\/wildfly\/standalone\/log\/server.log<\/span><\/i><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Wildfly, previously known as JBoss AS, is a fully implemented JEE container &#8211; application server, authored by JBoss Incorporated. \u00a0In 2006, JBoss Inc was acquired by Red Hat and since then Wildfly became their product. Wildfly is production ready, cross-platform and open-source application server with paid support subscription from Red Hat. The latest version being [&hellip;]<\/p>\n","protected":false},"author":932,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":91},"categories":[1174,2348,446,1],"tags":[591,3610,1892,4844,4144,4146,3361,4145],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/41861"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/932"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=41861"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/41861\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=41861"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=41861"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=41861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}