Reference‎ > ‎

The Logic Console

The Logic Console is an optional part of the ABL package. It is a web application that can give you some valuable insights into running instances of the ABL engine. However, it does require some setup.

1 - Installation

You will need to download the Logic Console (now part of the standard ABL download). It is a standard war file, which can be installed in any web container (Tomcat, Jetty, JBoss, etc....)

2 - Connecting

When you connect to the Logic Console, it will ask you to specify the ABL instance you want to connect to:


 In order for the Logic Console to connect to a running ABL instance, you need to expose the servlet com.autobizlogic.abl.mgmt.ConsoleServlet in the JVM that is running ABL. For instance, for a web app, your web.xml might look like this:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">

    <display-name>BusLogicDemo</display-name>

    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

    <servlet>
        <servlet-name>BusLogicDemo</servlet-name>
        <jsp-file>/index.jsp</jsp-file>
    </servlet>

    <servlet>
        <servlet-name>ABLConsoleServlet</servlet-name>
        <servlet-class>com.autobizlogic.abl.mgmt.ConsoleServlet</servlet-class>
    </servlet>
     
    <servlet-mapping>
        <servlet-name>BusLogicDemo</servlet-name>
        <url-pattern>/BusLogicDemo</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>BusLogicDemo</servlet-name>
        <url-pattern>/buslogicdemo</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>ABLConsoleServlet</servlet-name>
        <url-pattern>/ABLConsoleServlet</url-pattern>
    </servlet-mapping>

</web-app>

In this example, we define two web apps: one is BusLogicDemo, which is the "real" app, and one is ABLConsoleServlet, which will be used by the Logic Console to communicate with the ABL engine.

Note that it's usually a good idea to put some restrictions on this Console servlet, and not make it available to the world. There is no security built in.

If you use ABL in a non-web environment (in a Swing or JavaFX app, for instance), you will need to use an embedded servlet container such as Jetty.

3 - Using the Console

Once you have successfully connected to an ABL instance, you should see:



If the Session factories tree item does not expand to anything, it means that no transaction has yet been executed by the ABL engine. Make sure that the ABL engine has done something and refresh your browser.

If you expand a Session factory, you can select a persistent class and get a diagram for persistent classes and their immediate neighbors, along with the logic defined for them:


The Transactions tree item allows you to monitor running transactions. You will need to start the Transaction Monitor (it hits the ABL engine every second, so you may not want to keep it running):



The Performance tree item will give you some statistics for the running ABL engine:



Comments