Download enterprise System Administration

Transcript
12.3. EXAMPLES
• store: com.groiss.store.Store
• engine: com.groiss.wf.WfEngine
• dms: com.groiss.dms.DMS
• orgdata: com.groiss.org.OrgData
• config: com.groiss.component.Configuration (the System Configuration)
• user: com.groiss.org.User (the current user)
• session: javax.servlet.http.HTTPSession (the HTTPSession)
They can be used as starting points for the execution of methods (see API for details). Every
command is executed in its own transaction. After executing, a commit, if an error occurs,
a rollback is performed.
If you want to use (own) variables for the script, you can define them with the command:
set(varname,value);
Retrieve the value of the variables with:
get(varname);
Own declared variables have the advantage to survive transactions, because they are written
into the session.
12.3
Examples
12.3.1
Setting a configuration parameter
config.setProperty("database.connections",5);
config.store();
.
Alternative formulation with a variable:
set("connections",5);
.
config.setProperty("database.connections",get("connections"));
config.store();
.
12.3.2
Restart the server
admin.restartServer(); //restarts the server - no login necessary for current user
.
204