Application Lifecycle Management
How to Manage the Application Lifecycle
Complex applications usually pass through separate production, build, database and testing stages before an updated version is released to users. BWS Cloud helps automate these routine operations so development teams can build, test and upgrade applications without interrupting the live production service.
This guide explains a complete application lifecycle workflow using a production environment, a Maven build environment, a dedicated database environment and a cloned test environment.
Application Lifecycle Overview
A reliable application lifecycle separates live production workloads from build and testing activities. The test environment should closely match production, while the database connection and deployment process should remain predictable across all stages.

Best Practice
Keep the test environment as close as possible to production. This reduces configuration differences and helps identify deployment issues before the new version is released.
Create the Production Environment
Log in to the BWS Cloud dashboard
Sign in to your account and open the main environment dashboard.
Create a new environment
Click New Environment or the equivalent environment creation option available in your dashboard.

Configure the production topology
Select the required application server, define the resource or cloudlet limits and enter a clear environment name such as prodenv. Click Create and wait until provisioning is complete.

Create the Build Environment
A dedicated build environment lets the platform retrieve source code from Git or SVN, compile the project in the cloud and deploy the resulting application without using local machine resources.
Add a Maven build node
Create another environment and select Maven as the build tool. Configure the resource limit and use a meaningful name such as buildenv. A separate compute node is not required for a build-only environment.

Confirm successful provisioning
Wait for the build environment to be created and verify that the Maven node appears in the environment topology.

Note
A single Maven build environment can be used to build projects for multiple target environments. You do not need to create a separate build tool for every application environment.
Build and Deploy the Project
Add the project to Maven
Open the Maven node and add a new project. Choose the Git or SVN tab and provide the required repository details.
- Project name
- Repository path or URL
- Branch
- Repository username and password, when required
- Target environment
- Deployment context


Build and deploy
Save the project and click Build and Deploy. Maven retrieves the source code, creates the deployable package and sends it to the selected production environment and context.
Create the Database Environment
Create a dedicated database environment to store application data separately from the application server environment.

Select the database engine
Create another environment and select the required database engine, such as MySQL. A compute node is not required when the environment is used only for database services.

Create the application database
After provisioning is complete, open the database administration interface. Use the credentials supplied by the platform to create the database and a dedicated database user for the application.


Configure the Database Connection
Open the application server configuration
In the production environment, click Config next to the application server node.

Create the database configuration file
For a GlassFish-based example, create a configuration file such as mydb.cfg in the required application directory and add the database connection values.
host=jdbc:mysql://mysql{node_id}-{environment_name}.{hoster_domain}/{database_name}
username={database_username}
password={database_password}
driver=com.mysql.jdbc.Driver
Configuration Alternative

Upload the database connector
Upload the compatible MySQL connector library to the application server library directory. For GlassFish, confirm the path required by your installed server version.
Restart and test the application
Restart the application server so the new connector and configuration are loaded. Open the application in a browser and confirm that it can read and write data successfully.

Bind the production domain
Configure a custom domain for the production environment. Create the required DNS record, open the environment settings and bind the domain, for example production.com.


Important
The domain names shown in this guide are examples. Use valid domains under your control and configure their DNS records before binding them to an environment.
Create the Test Environment
Clone the production environment to create a matching test environment. The clone can include the existing topology, deployed application packages and environment data, allowing the new version to be tested under production-like conditions.
Clone the production environment
Open the production environment actions and select Clone Environment. Enter a name such as testenv and start the cloning process.
Add the updated project to Maven
Add the updated source branch or project version to the Maven build environment and configure the cloned test environment as the deployment target.
Build and deploy to the test environment
Run Build and Deploy. Confirm that the new application version appears in the configured deployment context of the test environment.
Bind the test domain
Bind a separate domain, such as test.com, to the test environment so the updated application can be reviewed independently.
Test the new version
Open the test domain and complete functional, integration and user acceptance testing. Confirm that database access, application features and external integrations operate correctly.
Swap the production and test domains
After the updated version has passed testing, open the custom domain settings for one of the environments, select the other environment and click Swap. The production domain will then point to the updated environment.
Zero-Downtime Release
Domain swapping allows the updated environment to become production without rebuilding the live environment during the release. End users continue using the production URL while the platform redirects it to the tested application version.
Expected Result
- A dedicated production environment is available for live users.
- A reusable Maven environment builds and deploys source-controlled projects.
- Application data is stored in a dedicated database environment.
- The application server connects successfully to the database.
- A cloned test environment is available for validating new releases.
- The updated application is released through domain swapping with minimal or no user-visible downtime.
Important Notes
- Use separate credentials and least-privilege database users for each application.
- Confirm repository access before running the Maven build.
- Keep application server libraries and database connectors compatible with the selected server version.
- Back up critical application and database data before major upgrades.
- Test DNS records and SSL certificates for both production and test domains before a domain swap.
- Review environment resource limits before running load or performance tests.
Common Issues and Solutions
| Issue | Possible Cause | Recommended Solution |
|---|---|---|
| Maven cannot retrieve the project | Incorrect repository URL, branch, credentials or access permissions | Verify the repository details and confirm that the build environment can access the Git or SVN server. |
| Build succeeds but deployment fails | Incorrect target environment, deployment context or incompatible package | Review the Maven project target settings and application server logs. |
| Application cannot connect to MySQL | Incorrect hostname, database name, credentials, network access or JDBC driver | Validate every connection value, upload the correct connector and restart the application server. |
| Custom domain does not open | DNS record is missing, incorrect or still propagating | Check the DNS record, wait for propagation and confirm the domain is bound to the correct environment. |
| Cloned environment behaves differently | External services, secrets, domain settings or environment variables were not copied or updated | Compare the production and test configuration and update environment-specific values. |
| Domain swap does not show the new version | Browser or DNS cache, wrong environments selected, or the updated deployment failed | Verify the swap status, clear caches and confirm the new version is running in the target environment. |
