W4T Eclipse offers serveral configuration opportunities to customize the plug-in for your development needs. At the moment there are two preference pages available: W4WARP (localhost server settings) and the Database Pools (jdbc connectivity).
Changing the configurations may force a restart of the localhost server. If this occurs and there are dirty W4T Eclipse Editors the plug-in prompts for saving.
Inside of W4T Eclipse resides a leightweight servlet engine implementation. This is used for processing the WYSIWYG-editor output one the one hand and running/debugging W4 Toolkit applications on the other hand.
Since both tasks differ considerably in their objective targets, the preference page is divided into two sections. The first section contains the properties needed for running the in-process server which depicts the design/preview pages. The second section identifiable with the [RUNTIME]-prefix is used for running the external run/debug process.
The port property of both sections tells the server socket at which port number to listen to browser requests. Note: do not run both modes with the same port, since this will cause socked bind exceptions and leads to undefined server states. Also ensure that no other server on your local machine uses these port settings.
The session timeout check interval defines how long the sessions could reside in the servers repository till the next expiration check runs. Note that the session expiration timeout of the in-process server is fixed to a very large value, because sessions should not be timed out, in case of long time intervals without user input. So there is no need to run the timeout check very often.
The Amount of server threads property defines the number of worker threads, which are available for processing incomming requests. Normally there should be no need for a large number of threads.
To launch the external server in run/debug mode it is nessecary to specify the executable of your web-browser with which you want to trigger page requests to the local host server. The browser also is started in an external process. If no browser is specified and you try to run your application the startup will fail.
The in-process server will be started on demand, which means that an W4T Eclipse Editors is opened in the design or preview mode. It also is halted automatically if the last W4T Eclipse Editor is closed.
W4 Toolkit provides a data binding mechanism of widgets (see: databound components) to a source (see: data source). There is a set of rich components (WebConnection, WebDataBaseSource, WebDataBaseTable, CDataBaseList) adopting this mechnism for jdbc based data access.
W4 Toolkit uses integrated connection pooling for database access. The Database Pools preference page allows to configure such pools for usage during the development process.
The following table explains the entries of the pool configuration tab:
|Poolname||The name of the JDBC Connection pool.|
|Driver||Fully qualified class name of the driver implementation. Example: oracle.jdbc.driver.OracleDriver|
|Driver Library||The location of the driver library on the local file system.|
|URL||The jdbc connection URL used by the specified driver (vendor-specific). Example: jdbc:oracle:thin:@192.168.6.2:1521:saturn|
|Username||Username authentification information for the database connection.|
|Password||Password authentification information for the database connection.|
|User Timeout||Time in ms to automatically lead the connection back into the pool, if no user activity occurs.|
|Check Frequency||Time in ms the skimmer thread checks for timeout connections.|
|Connection Timeout||Time in ms till an unused connection is removed from the pool.|
|Maximum Size||The maximum number of connections that can possibly be maintained in the pool.|
|Enable Cache||whether resultsets of this pool are cached or not|
|Cache Size||the maximum number of ResultSets the cache can contain.|
|Cache refresh||the interval, in seconds, between the cache's reloading of its ResultSets from the database.|
To test the specified parameters first save the configuration and then press the test connection button. The program tries to retrieve a valid connection with the parameters specified. If the connection could be established a success dialog pops up, otherwise an error dialog is shown. Normally the explicit reason of the failure is written to the error log.
The pools defined in this preference page are available for all W4T Eclipse projects in development and runtime mode. They can also be added to the webapplication deployment archive built with the export wizard for W4 Toolkit projects.
Note: If you have added or changed a pool definition, and you want to use it in the run/debug mode sometimes the changes are not recognized by the server at once. To solve this create a database access to the trouble maker within the development mode (open a W4T Eclipse Editor, switch to design mode, add a connection and select the pool in the connections dbPool attribute). Now the pool should also be available in the run/debug mode.
Copyright (c) 2003 by Innoopract Informationssysteme GmbH. All rights reserved.