Use conditional statements in WildFly CLI

WildFly Command Line Interface is not a real programming language with complex structures. Nevertheless it’s possible to execute conditional logic in it and this short tutorial will show how to do it. WildFly Command Line Interface contains the “if” keywords which can be used to build conditional logic. here is the synopsys of the command: … Read more

Managing JBoss and WildFly with Groovy shell

The JBoss/WildFly CLI is quite powerful however that is not the only option available when we are managing the application server with shells. In this tutorial we will learn how to use the Groovy Shell to manage the application server. Why should we replace the beautiful CLI ? Although powerful some limitations with the CLI … Read more

Advanced WildFly CLI: variables and aliases

In this short tutorial we will explore two not so well known features of WildFly CLI: creating variables (and reading them at startup) and creating persistent alias for functions. Let’s start from the first: The CLI has a set function that can be used to assign a certain path of the server model to a … Read more

JBoss cheatsheet for Linux Administrators

This is my JBoss / WildFly cheatsheet I use for managing the application server on a Linux box. Enjoy it and welcome any contribution to the cheatsheet. WildFly / JBoss CLI How to execute commands in non-interactive way: –connect –command=”:reload” How to connect to a non default host/port –connect –controller= How to execute … Read more

Discover WildFly – JBoss resources from Java code

This tutorial will help you to create some advanced CLI scripts programmatically from Java. We will focus in particular on discovering Domain resources (such as Host, Servers, Server Groups and their deployment In this tutorial we have already illustraded some examples of interaction with the CLI from Java. Essentially you will just need to include in your … Read more

Reverse engineer your JBoss AS-WildFly configuration to CLI

Today I was looking for a quick way to export my WildFly configuration to a CLI script and found a great project on github named “Profile Cloner“. The source of the Project is Maven based and it can be reached from . Basically this project allows to create a clone of your Profile (or … Read more

Using properties in CLI scripts

Some time ago I’ve found one interesting thread on forum ( discussing about one undocumented option available in the CLI which allows to use external properties in a script. I’ve used it to create a general purpose script to install any kind of Datasource. Let’s see how to do it. So at first the … Read more

Useful CLI scripts in Domain mode

When running in Domain mode using the CLI can be tricky as you have to understand where your resources are located in the application server tree. Let’s see some practical examples: How to configure a resource in a Domain You have to reference the profile you are using. Example: /profile=full/subsystem=ejb3/thread-pool=default:write-attribute(name=max-threads,value=10) How to reach a resource available … Read more

How do you shut down multiple JBoss instances?

This tutorial has been written for an old version of JBoss application server. We recommend checking the following updated tutorial: How to Start, Stop and Restart WildFly JBoss AS 5 users If you are running an old version of JBoss AS 5, then you can go as follows. Supposing you have configured’ 2 instances of JBoss, … Read more

Managing JBoss – WildFly using HTTP/JSON API

Few JBoss / WildFly administrators are aware that the application server has a management interface based on HTTP/JSON based API. This can be an easy shortcut if you want to collect quickly information from your servers with as little as a browser bookmark.   Let’s see some examples. How to check the server status:http://localhost:9990/management?operation=attribute&name=server-state “running” In … Read more