Heads up! These docs are for Portofino 3, which is a legacy product. Check out Portofino 4!

For a simple installation of Portofino the basic configuration is sufficient, but to enable certain advanced features or to better tune the application to your needs we encourage you to use the settings described below. 

Remember to restart the application server after you have changed the configuration file.


Changing the application name

The default name of an application is "My Application". To change it, add the following line to the configuration file:

model.application.name=Your Application Name


Enabling connection pooling

The basic configuration instructs Portofino to create a connection to the database every time a page is requested. This approach works but has poor performance and should be avoided especially in production environments. A better approach is to ask the application server to create and manage a pool of database connections and then configure Portofino to use it. 

Create the connection pool following the instructions of your application server. You can give the pool any name (e.g., "portofinodb") and use the same jdbc parameters (driver class, connection url, etc) you have used in the initial configuration. Then change the database settings to the following two lines:

database.configurationType=jndi 
database.jndi.name=jdbc/portofinodb 


Enabling version tracking

Portofino can record every change you make to the model in a log file. This file can later be used to recreate your application on another database. It works almost like a database dump, except changes are recorded incrementally, rather than as snapshots. Portofino can put this file unsed version tracking. 

To enable these feature, create a working directory (e.g., /some/working/directory) and a module directory inside it (e.g., /some/working/directory/mymodule). Then add the following properties to your configuration file:

versioning.cvs.workingDirectory=/some/working/directory 
model.cvs.module=mymodule 

If you plan to use versioning it is very important that you do so from the very beginning of the project, or versining will not be able to function properly. 

Also make sure that the user that runs the application server can read and write the directories you have provided. 


Enabling blobs

If you plan to use blobs in your application, you have to enable the version tracking (see the previous section).  The blobs will be created in the directory <versioning.cvs.workingDirectory>/<model.cvs.module>/blob/.


Enabling email notifications

Using Portofino, you can configure your application to send email notifications when certain workflow actions are performed. To enable this feature you must provide the address of a valid SMTP server and an email address that will appear as the sender of the notifications.

mail.smtp=smtp.example.com 
model.workflow.notifications.sender=workflow@example.com 

Changing the language

The default language of the user interface is English. To change it, change the value of the model.locale.language propety. Possible values are "en" for English and "it" for Italian.

model.locale.language=en 

Enabling user management

Two properties affect user management. The first property, model.users.enabled, which is false by default, tells Portofino to handle user login and logout. 

The second property, model.users.anonymous.enabled, which is true by default, tells Portofino whether anonymous users can access the application. If set to false, Portofino redirects anonymous users to the login page. 

To enable user management with mandatory login, add the following lines to your configuration file: 

model.users.enabled=true 
model.users.anonymous.enabled=false 

User management relies on certain classes and relationships (User, UserGrp and User_UserGrp) to be present in your model. If they are not present, the system will turn user management off even if model.users.enabled is set to true. 

Enabling user management for the 'upstairs' environment

Similarly to the application, the "upstairs" environment can also be protected with user management. To do so, add the following two lines to your configuration file:

meta.users.enabled=true 
meta.users.anonymous.enabled=false 

Disabling the installation mode

By default Portofino can install itself on an empty database or upgrade a database creating with a previous version. If you want to disable this feature add the following property:

installation.enabled=false 

This is recommended for all production systems.
If, at a later stage, you will want to upgrade your database to a new version of Portofino, you'll have to set the property to true.


Previous: Running the installer 

Next: Running multiple instances