{"id":14897,"date":"2020-11-29T23:33:54","date_gmt":"2020-11-29T22:33:54","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/"},"modified":"2020-11-29T23:33:54","modified_gmt":"2020-11-29T22:33:54","slug":"jboss-eap-7-domain-configuration","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/","title":{"rendered":"JBoss EAP 7 \u2013 Domain Configuration"},"content":{"rendered":"<p>In a previous <a href=\"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-creation\/\" rel=\"noopener noreferrer\" target=\"_blank\">blog<\/a> I talked about the domain creation, we saw at the end that some server groups and servers are created by default which usually are not what we need.<br \/>\nThrough this blog, I will show you how to clean this unneeded configuration and how to configure your domain according to your defined architecture.<br \/>\n<!--more--><\/p>\n<h2>How this default configuration arrive in my domain?<\/h2>\n<p>As explained before we use the default domain.xml and (host.xml, host-master.xml or host-slave.xml) to create a domain, in fact, the default configuration created is there \ud83d\ude09<\/p>\n<h3>Server groups preconfigured in domain.xml<\/h3>\n<p>In the domain.xml you will find below configuration:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n    &lt;server-groups&gt;\n        &lt;server-group name=&quot;main-server-group&quot; profile=&quot;full&quot;&gt;\n            &lt;jvm name=&quot;default&quot;&gt;\n                &lt;heap size=&quot;1000m&quot; max-size=&quot;1000m&quot;\/&gt;\n            &lt;\/jvm&gt;\n            &lt;socket-binding-group ref=&quot;full-sockets&quot;\/&gt;\n        &lt;\/server-group&gt;\n        &lt;server-group name=&quot;other-server-group&quot; profile=&quot;full-ha&quot;&gt;\n            &lt;jvm name=&quot;default&quot;&gt;\n                &lt;heap size=&quot;1000m&quot; max-size=&quot;1000m&quot;\/&gt;\n            &lt;\/jvm&gt;\n            &lt;socket-binding-group ref=&quot;full-ha-sockets&quot;\/&gt;\n        &lt;\/server-group&gt;\n    &lt;\/server-groups&gt;\n<\/pre>\n<p>This means that two server groups are configured already.<\/p>\n<h3>Servers configured in host*.xml<\/h3>\n<h4>host-master.xml<\/h4>\n<p>No servers defined, which is normal because it is not recommended to have servers on the master host.<\/p>\n<h4>host.xml<\/h4>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n    &lt;servers&gt;\n        &lt;server name=&quot;server-one&quot; group=&quot;main-server-group&quot;&gt;\n        &lt;\/server&gt;\n        &lt;server name=&quot;server-two&quot; group=&quot;main-server-group&quot; auto-start=&quot;true&quot;&gt;\n            &lt;socket-bindings port-offset=&quot;150&quot;\/&gt;\n        &lt;\/server&gt;\n        &lt;server name=&quot;server-three&quot; group=&quot;other-server-group&quot; auto-start=&quot;false&quot;&gt;\n        &lt;\/server&gt;\n    &lt;\/servers&gt;\n<\/pre>\n<h4>host-slave.xml<\/h4>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n    &lt;servers&gt;\n        &lt;server name=&quot;server-one&quot; group=&quot;main-server-group&quot;\/&gt;\n        &lt;server name=&quot;server-two&quot; group=&quot;other-server-group&quot;&gt;\n            &lt;socket-bindings port-offset=&quot;150&quot;\/&gt;\n        &lt;\/server&gt;\n    &lt;\/servers&gt;\n<\/pre>\n<p>So, depending on which preconfigured file is used servers are configured in your domain&#8230;<\/p>\n<h2>How to clean default configuration?<\/h2>\n<p>You have two choices:<\/p>\n<h3>Update xml preconfigured files<\/h3>\n<p>The idea is to update the xml files before you start the domain and remove this default configuration on each host. which means:<br \/>\nRemove all lines between <\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n    &lt;server-groups&gt;\n<\/pre>\n<p>  and <\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n    &lt;\/server-groups&gt;\n<\/pre>\n<p>from domain.xml<\/p>\n<p>Remove all lines between<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n    &lt;servers&gt;\n<\/pre>\n<p>  and <\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n    &lt;servers&gt;\n<\/pre>\n<p>from host.xml or host-slave.xml<\/p>\n<p>Be careful, servers are assigned to server groups, so if you remove the server groups you have to remove related servers, if not this will cause issues because server groups will not be found!<\/p>\n<h3>Clean default configuration after domain start <\/h3>\n<p>Start your domain and connect to the CLI:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[jboss@vmjboss ~]$ $JBOSS_HOME\/bin\/jboss-cli.sh -c --controller=vmjboss:9990\n[domain@vmjboss:9990 \/] \n<\/pre>\n<p>You need first to stop servers then remove them:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[domain@vmjboss:9990 \/] \/host=slave1\/server-config=server-one:stop(blocking=true)\n{\n    \"outcome\" =&gt; \"success\",\n    \"result\" =&gt; \"STOPPED\"\n}\n[domain@vmjboss:9990 \/] \/host=slave1\/server-config=server-one:remove             \n{\n    \"outcome\" =&gt; \"success\",\n    \"result\" =&gt; undefined,\n    \"server-groups\" =&gt; undefined\n}\n<\/pre>\n<p>Repeat the operation on all servers all hosts.<\/p>\n<p>Now, you will be able to remove default server groups:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[domain@vmjboss:9990 \/] \/server-group=main-server-group:remove\n{\n    \"outcome\" =&gt; \"success\",\n    \"result\" =&gt; undefined,\n    \"server-groups\" =&gt; undefined\n}\n<\/pre>\n<p>Repeat the operation to remove all default server groups<\/p>\n<h2>Configure the domain<\/h2>\n<h3>Define server groups<\/h3>\n<p>Server groups already explained in this <a href=\"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-architecture-understanding\/\" rel=\"noopener noreferrer\" target=\"_blank\">blog<\/a>.<\/p>\n<p>To define a server group you should at least know:<br \/>\n&#8211; Which profile is needed (default, full, full-ha, ha)<br \/>\n&#8211; Which socket-binding-group according to your profile (standard-sockets, full-sockets, full-ha-sockets, ha-sockets)<br \/>\n&#8211; socket-binding-port-offset if needed<\/p>\n<p>You can create a server groups via CLI or console, here the CLI Command to create an HA server groups:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&#x5B;domain@vmjboss:9990 \/] \/server-group=HA-GROUP:add(profile=ha,socket-binding-group=ha-sockets)\n{\n    &quot;outcome&quot; =&gt; &quot;success&quot;,\n    &quot;result&quot; =&gt; undefined,\n    &quot;server-groups&quot; =&gt; undefined\n}\n<\/pre>\n<h3>Define servers<\/h3>\n<p>Servers already explained in this <a href=\"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-architecture-understanding\/\" rel=\"noopener noreferrer\" target=\"_blank\">blog<\/a>.<\/p>\n<p>To create a server you should at least know:<br \/>\n&#8211; On which host?<br \/>\n&#8211; Assigned to which group?<\/p>\n<p>The server is created in a host and assigned to a server groups, below the command line to create a server:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&#x5B;domain@vmjboss:9990 \/] \/host=slave1\/server-config=server1:add(group=HA-GROUP,socket-binding-port-offset=100,auto-start=true)\n{\n    &quot;outcome&quot; =&gt; &quot;success&quot;,\n    &quot;result&quot; =&gt; undefined,\n    &quot;server-groups&quot; =&gt; undefined\n}\n<\/pre>\n<p>Now you know how to clean default servers and server groups, and how to create yours according to your need. Don&#8217;t hesitate to ask questions \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a previous blog I talked about the domain creation, we saw at the end that some server groups and servers are created by default which usually are not what we need. Through this blog, I will show you how to clean this unneeded configuration and how to configure your domain according to your defined [&hellip;]<\/p>\n","protected":false},"author":46,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[117,118],"type_dbi":[],"class_list":["post-14897","post","type-post","status-publish","format-standard","hentry","category-application-integration-middleware","tag-domain","tag-jboss"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>JBoss EAP 7 \u2013 Domain Configuration - dbi Blog<\/title>\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.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JBoss EAP 7 \u2013 Domain Configuration\" \/>\n<meta property=\"og:description\" content=\"In a previous blog I talked about the domain creation, we saw at the end that some server groups and servers are created by default which usually are not what we need. Through this blog, I will show you how to clean this unneeded configuration and how to configure your domain according to your defined [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-29T22:33:54+00:00\" \/>\n<meta name=\"author\" content=\"David Diab\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"David Diab\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/\"},\"author\":{\"name\":\"David Diab\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/deb907c3360cacdc6c7df54b4bac3c86\"},\"headline\":\"JBoss EAP 7 \u2013 Domain Configuration\",\"datePublished\":\"2020-11-29T22:33:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/\"},\"wordCount\":735,\"commentCount\":0,\"keywords\":[\"domain\",\"JBoss\"],\"articleSection\":[\"Application integration &amp; Middleware\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/\",\"name\":\"JBoss EAP 7 \u2013 Domain Configuration - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2020-11-29T22:33:54+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/deb907c3360cacdc6c7df54b4bac3c86\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JBoss EAP 7 \u2013 Domain Configuration\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/deb907c3360cacdc6c7df54b4bac3c86\",\"name\":\"David Diab\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/212b1b2e4650bad3116f644ab4fb4663786d94195d7685d0704c8426da088e60?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/212b1b2e4650bad3116f644ab4fb4663786d94195d7685d0704c8426da088e60?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/212b1b2e4650bad3116f644ab4fb4663786d94195d7685d0704c8426da088e60?s=96&d=mm&r=g\",\"caption\":\"David Diab\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/david-diab\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"JBoss EAP 7 \u2013 Domain Configuration - dbi Blog","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.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/","og_locale":"en_US","og_type":"article","og_title":"JBoss EAP 7 \u2013 Domain Configuration","og_description":"In a previous blog I talked about the domain creation, we saw at the end that some server groups and servers are created by default which usually are not what we need. Through this blog, I will show you how to clean this unneeded configuration and how to configure your domain according to your defined [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/","og_site_name":"dbi Blog","article_published_time":"2020-11-29T22:33:54+00:00","author":"David Diab","twitter_card":"summary_large_image","twitter_misc":{"Written by":"David Diab","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/"},"author":{"name":"David Diab","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/deb907c3360cacdc6c7df54b4bac3c86"},"headline":"JBoss EAP 7 \u2013 Domain Configuration","datePublished":"2020-11-29T22:33:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/"},"wordCount":735,"commentCount":0,"keywords":["domain","JBoss"],"articleSection":["Application integration &amp; Middleware"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/","url":"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/","name":"JBoss EAP 7 \u2013 Domain Configuration - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2020-11-29T22:33:54+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/deb907c3360cacdc6c7df54b4bac3c86"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/jboss-eap-7-domain-configuration\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"JBoss EAP 7 \u2013 Domain Configuration"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/deb907c3360cacdc6c7df54b4bac3c86","name":"David Diab","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/212b1b2e4650bad3116f644ab4fb4663786d94195d7685d0704c8426da088e60?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/212b1b2e4650bad3116f644ab4fb4663786d94195d7685d0704c8426da088e60?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/212b1b2e4650bad3116f644ab4fb4663786d94195d7685d0704c8426da088e60?s=96&d=mm&r=g","caption":"David Diab"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/david-diab\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/14897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=14897"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/14897\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=14897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=14897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=14897"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=14897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}