[Seaside] How to start an image with PORT parameter

Germán Arduino garduino at gmail.com
Thu Jul 16 21:20:38 UTC 2009

2009/7/16 Davorin Rusevljan <davorin.rusevljan at gmail.com>:
> On Thu, Jul 16, 2009 at 7:03 PM, Germán Arduino <garduino at gmail.com> wrote:
>> Hola Miguel!
>> Can you explain me a bit how works the PORT variable?
>> I can't make that the image read the port parameter :(
> I am also a bit in a dark here, so any explanation is welcome!

On my case didn't start on the port I wants and I ever get the
CodeLoader error, but I can try to explain you the other questions.

> One related question. If I intend to start image with port parameter, should
> I save image with seaside allready running on that port or not?

WAKom is on the startup list (The classes that need to do something
upon startup).

Then, the class method #startUp: of WAKom is:

	self name = #WAKom ifTrue: [
		SmalltalkImage current extractParameters
			at: 'PORT' ifPresent: [ :value |
				value isEmptyOrNil
					ifFalse: [ port := value asInteger ] ] ].
	port ifNotNil: [ self startOn: port ]

And #startOn: first stop the service and then restart it (or should
restart it) on the passed port parameter.

> What happens if saved image is running on different port than one in command
> line?

As it first stop, then should restart on the new port.

> What happens if saved image is running on some port that is at the moment of
> image restart not anymore available?

I think that will not work (if the port is already used by other app).

But, anyway, on my case, passing the port parameter not worked (On
Linux nor Windows).

See you.


More information about the seaside mailing list