VASmalltalk – ICApplicationStarter

Originally I delivered the Seaside apps (using ICs) within one IC with the written application code and the starting code.

Over the time I wrote more and more applications and I just wanted to be able to add additional applications to my Seaside server. I therefore needed a general application starter.

The result was a program, which can be configured by the configuration framework within VA. You may insert a statement like this in your active ini-file:

[MSKGeneralSeasideStarterApp]
ServletPort=4000
ServletAddress=http://127.0.0.1:
ServletClassName=WASstServerAdaptorUTF8
ServletStart=true
ICsToLoad=mskxdesystemmobilebase.ic,mskxdrmcontrol.ic,grummel.ic

and the main stuff is very simple:

* load the list of ICs – containing your Seaside code. Follow the loading protocol of VA to initialize your apps and prepare them to work …
* start a server adaptor on a specific port and address.

It also includes a Seaside administration application to restart the seaside server system – therefore changing the ServletStart attribute to false is not very useful.

Due to this administration class all Seaside code has been already loaded.

The seaside server is started in the following way:

..\server\bin\esvio -i..\ics\mskxdseasidestarter.ic -ini:.\mskxdseasidestarter.ini

Therefore you can use the VA server structure (download from Instantiations) and just add you additional binaries, XML-files, pictures. Then a ini-file and that should it be …🙂

Of course having only a static file with starting options is not a good way, when sitting behind an Apache server and you want to start several instances to load balance your service.

Therefore the main points can also be configured via command line options (and they overwrite the options in the ini file):

-SPORT=, -SADDRESS=, -SCLASS=, -SSTART= and -ICSTOLOAD=

can be used to change the beheviour of this seaside server.

Example:

..\server\bin\esvio -i..\ics\mskxdseasidestarter.ic -ini:.\mskxdseasidestarter.ini -SPORT=4000
..\server\bin\esvio -i..\ics\mskxdseasidestarter.ic -ini:.\mskxdseasidestarter.ini -SPORT=4001
..\server\bin\esvio -i..\ics\mskxdseasidestarter.ic -ini:.\mskxdseasidestarter.ini -SPORT=4002
..\server\bin\esvio -i..\ics\mskxdseasidestarter.ic -ini:.\mskxdseasidestarter.ini -SPORT=4003
This entry was posted in Smalltalk. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s