Child pages
  • Working with Multiple Workspaces
Skip to end of metadata
Go to start of metadata

When working with multiple workspaces, the following initial configurations can be made to quickly identify a workspace and to open Servoy with the desired workspace and the appropriate servoy.properties file.

Setting a Workspace Name

When working with multiple workspaces, a Workspace name can be assigned to appear in the title area of Servoy for easy identification. To do this, use the main menu item Window > Preferences > General > Workspace and set the Workspace name.

Note: To switch between workspaces, use the main menu item File > Switch Workspace.

Using a property file per workspace

In the preferences: Window -> Preferences -> Servoy -> Startup there is an option to give the servoy.properties file name. This must be a file relative to the application_server dir. This way you can configure a specific workspace to use a specific servoy properties file.

The system property that can be defined at the command line: property-file (-Dproperty-file) will override this again. (see below)

Using Commandline to Open Servoy

If using the command line to give system properties like  property-file or below the webserver-file be sure to read this: Eclipse ini configuration first.

Because to be able to give a parameter you need to specify the -vmargs on the command line, but that would mean by default it overrides the one in the servoy.ini (which is an eclipse.ini file). This means that you loose the memory settings and so on. It is better to also add the                    "--launcher.appendVmargs" to the servoy.ini file just before the -vmargs option, then you can use the -vmargs on the command line just fine and you don't loose the stuff configured in the ini file.

Two commands are useful in opening Servoy while at the same time specifying the workspace and Servoy properties file to use (XnameX is used here as a sample name of a workspace and a properties file):

-data "c:\workspaces\XnameX"

-Dproperty-file=XnameX.properties

The two commands can be combined to create multiple launch files with the desired workspace and properties file configurations. For example, in Windows, you can create a ServoyXnameX.bat file that will run the following command:

servoy.exe -data "d:\workspaces\XnameX" -vmargs -Dproperty-file=XnameX.properties

Mac OS X users, please see Eclipse documentation for special considerations.

Using different server.xml files per workspace or eclipse install

With the system property: webserver-file (-Dwebserver-file=myserver.xml) you can override or choose another server.xml that the Tomcat installation that the developer starts will use. This way you can start it with different ports like one that binds ot 8080 and one that binds to 8081.

This filename should point to a file that is relative to the [servoyinstall]/application_server/server/conf dir (so besides the normal server.xml file)

 

  • No labels