Difference between pages "Legacy command line tools" and "Developing codeunits"

From TempusServa wiki
(Difference between pages)
Jump to navigation Jump to search
old>Admin
 
old>Admin
 
Line 1: Line 1:
== Compability ==
The shell tools are compatible with the following distributions
* Amazon linux
* RedHat linux
* CentOS linux


Other versions are likely compatible if they support yum installer.
== Steps for creating a new codeunit ==


== Installing the tools ==
# Create a new Java project in your favorite IDE
# Import the p2eShared.jar in the project
# Create a new class:
## The abstract parts are found in: dk.p2e.blanket.codeunit
## Implement all abstract methods
## Code the method bodies (normally "execute")
# Compile and build
# Deploy to webservser: [Application]\WEB-INF\lib


Execute the following commands from youre UNIX command line
After first test of the codeunit a server reboot is needed for each redeployment, as there is no way of removing the loaded classes from memory.


# cd /usr/bin
== Error handling ==
# sudo wget -N http://www.tempusserva.dk/deploy/amazon-tomcat7/tsrefreshscripts.sh
# sudo chmod 777 tsrefreshscripts.sh
# tsrefreshscripts.sh


The tools are installed into /usr/bin, and made available for all users.
Exceptions are handled by themselves using the errorRegistration(Exception e) method.


== Tool reference ==
== Different codeunit types ==


=== Installation ===
Please read the: [[Codeunit reference]]
All installers will ensure that underlying depencies are installed too
* Java
* Tomcat
* Database
* Database driver
* TrueType fonts


A check is completed before each install operation
Most likely you will need to create a [[Codeunit/Formevents]] that will allow specific changes for a solution, during views, updates or exports.


{|
Most interactions wil require interaction with the following objects
|tsinstall.sh
* Security
|Installs Tempus Serva and all dependencies to /TempusServa and names databases: tslive, tstest, tsbase
* Command
|-
* DbConnection
|tsinstallinstance.sh [application]
|Installs Tempus Serva and all dependencies to [application] and names the databases [application] + postfix: live, test, base
|-
|tsquickinstall.sh
|Installs Tempus Serva and all dependencies to /TempusServa, files are saved to root home folder  and names databases: tslive, tstest, tsbase
|}
 
=== Update with newer version ===
 
* tsupgrade.sh
* tsupgradeinstance.sh [application]
 
=== System information ===
 
{|
|tsstatus.sh
|Lists various informations
* Memory use
* Disk use
* Installed applications
* Running cron jobs
|-
|tslogsgrep.sh [search]
|Fetches information from Tomcat log files, that contains [search]
|-
|tslogstail.sh
|Fetches information from Tomcat log files
|}
 
=== Server maintanence ===
 
{|
|tsboot.sh
|Performs normal boot operations
* Ensures data drive is mounted
* Sets time and routing configuration
* Starts both MySQL AND Tomcat
|-
|tsstop.sh
|Stops both MySQL AND Tomcat
|-
|tsstart.sh
|Starts both MySQL AND Tomcat
|-
|tsrestart.sh
|Stops Tomcat and starts it again (use: patch, change connection string etc)
|-
|tstomcatstop.sh
|Starts Tomcat
|-
|tstomcatstart.sh
|Stops Tomcat
|}
 
=== Database access ===
 
{|
|tsmysqlremotestart.sh
|Creates remote user with DB access and prints credentials to screen
|-
|tsmysqlremotestop.sh
|Removes remote user and permissions
|-
|}
 
=== Other usefull scripts ===
 
{|
|tsbackupfull.sh
|Backups the database and runtime of ALL applications
|-
|tsbackupinstance.sh [application]
|Backups the database and runtime of an application named [application]
|-
|tsrefreshscripts.sh
|Check for updates and installs new versions of these scripts (ts'''xxx'''.sh)
|}

Revision as of 11:10, 25 February 2013

Steps for creating a new codeunit

  1. Create a new Java project in your favorite IDE
  2. Import the p2eShared.jar in the project
  3. Create a new class:
    1. The abstract parts are found in: dk.p2e.blanket.codeunit
    2. Implement all abstract methods
    3. Code the method bodies (normally "execute")
  4. Compile and build
  5. Deploy to webservser: [Application]\WEB-INF\lib

After first test of the codeunit a server reboot is needed for each redeployment, as there is no way of removing the loaded classes from memory.

Error handling

Exceptions are handled by themselves using the errorRegistration(Exception e) method.

Different codeunit types

Please read the: Codeunit reference

Most likely you will need to create a Codeunit/Formevents that will allow specific changes for a solution, during views, updates or exports.

Most interactions wil require interaction with the following objects

  • Security
  • Command
  • DbConnection