> For the complete documentation index, see [llms.txt](https://bpmflow.gitbook.io/project/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bpmflow.gitbook.io/project/orbeon-integration/orbeon-persistence-layer-for-gemstone-s/manage-persistence-layer.md).

# Manage Persistence Layer

## **Scripts to run the Application**

In this section scripts to manage the Web Application will be explained.

Prerequisites:

* GemStone/S installed and running
* Orbeon Persistence Layer application installed.

For more technical information about Gem processes used in these scripts see:

<https://github.com/GsDevKit/gsApplicationTools/blob/master/docs/gettingStarted.md>

**Prerequisites**:

The scripts/shell commands can be found in **$GS\_HOME/shared/repos/OrbeonPersistenceLayer** directory.

In order to use these scritps the Shell session must have defined the environment variable \[GS\_HOME]. To set this variable the following bash code can be executed:

```
export GS_HOME=/home/gemstone/GsDevKit_home
export PATH=$GS_HOME/bin:$PATH
```

Where \[**gemstone**] is the name of the **Linux** user and \[**GsDevKit\_home**] is where **GemStone/S DevKit** has been installed.

### **List of Scripts**

There are six scripts or shell command in order to **manage** the **Web Application:**

**register-application.sh**

To register the application to run, this shell command has to be **executed only once**. This script read data in \[***ports-all.ini***] file and register all ports in this file. For example if \[***ports-all.ini***] has the following content: 8787,8888,8989

This will register the Web Application to be used in ports: *8787,8888,8989*. Comma is used to separate ports. The **ini**'s files are in the same directory as the scripts.

**unregister-application.sh**

To unregister application, this shell command has to be **executed only once**.

**start-all.sh**

This command will start a **multi-thread** Web Application Server where each port will be attended by a different (**Gem**) process. Following the previous example three **Gem processes** will be created to attend each port.

**stop-all.sh**

This command will stop all **Gem processes** serving on all ports. The **Web Application** will **no** longer answer http requests.

**start-zn.sh**

This command is similar to \[*start-all.sh*] but instead of starting a **Gem Process** for each port it only start a subset of all ports. The subset is defined in \[**zn-ports.ini**] file.

**stop-zn.sh**

This command is similar to \[*stop-all.sh*] but instead of stop all **Gem Process** in each port it only stop a subset of all ports. The subset is defined in \[**zn-ports.ini**] file.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://bpmflow.gitbook.io/project/orbeon-integration/orbeon-persistence-layer-for-gemstone-s/manage-persistence-layer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
