Discussion:
fcl-web (WebLaz) - Duplicate Module Error
(too old to reply)
African Wild Dog via Lazarus
2017-12-10 16:30:24 UTC
Permalink
Hello,

Please confirm if this is a bug:

I have created a HTTP Server Application project and added a module called
"test_module" with an action "test_action".

When i run my application, when i access "
http://localhost:8080/test_module/test_action" for the first time it works,
but in the subsequent requests (like refreshing the page) i get the
error '*Duplicate
name: A component named "test_module" already exists*'.


Environment: Debian Stretch 64 bits - fresh Lazarus 1.8 install

Regards
Michael Van Canneyt via Lazarus
2017-12-10 16:34:02 UTC
Permalink
Post by African Wild Dog via Lazarus
Hello,
I have created a HTTP Server Application project and added a module called
"test_module" with an action "test_action".
When i run my application, when i access "
http://localhost:8080/test_module/test_action" for the first time it works,
but in the subsequent requests (like refreshing the page) i get the
error '*Duplicate
name: A component named "test_module" already exists*'.
Environment: Debian Stretch 64 bits - fresh Lazarus 1.8 install
Set the 'Kind' property to wkOneShot.

Michael.
--
African Wild Dog via Lazarus
2017-12-10 17:40:42 UTC
Permalink
2017-12-10 14:34 GMT-02:00 Michael Van Canneyt via Lazarus <
Set the 'Kind' property to wkOneShot.
Michael.
Done. It worked!

What is the function of the "kind" property?
Michael Van Canneyt via Lazarus
2017-12-10 18:26:49 UTC
Permalink
Post by African Wild Dog via Lazarus
2017-12-10 14:34 GMT-02:00 Michael Van Canneyt via Lazarus <
Set the 'Kind' property to wkOneShot.
Michael.
Done. It worked!
What is the function of the "kind" property?
The idea was to have some kind of state:
- OneShot:
no state. a webModule is recreated on every call
- pooled:
a webmodule is created once and remains in memory during the lifetime of the server application.
- Session:
a webmodule is created once per session.

I never got around to finishing it, it is stil on my todo list.

For a CGI, they are of course all the same. Only for standalone, fcgi or
apache modules does it make sense to have pooled/session.

Michael.
--
African Wild Dog via Lazarus
2017-12-10 18:37:59 UTC
Permalink
2017-12-10 16:26 GMT-02:00 Michael Van Canneyt via Lazarus <
Post by Michael Van Canneyt via Lazarus
no state. a webModule is recreated on every call
a webmodule is created once and remains in memory during the lifetime of
the server application.
a webmodule is created once per session.
I never got around to finishing it, it is stil on my todo list.
So, should i report a bug for the wkPooled case?
Michael Van Canneyt via Lazarus
2017-12-10 21:53:00 UTC
Permalink
Post by African Wild Dog via Lazarus
2017-12-10 16:26 GMT-02:00 Michael Van Canneyt via Lazarus <
Post by Michael Van Canneyt via Lazarus
no state. a webModule is recreated on every call
a webmodule is created once and remains in memory during the lifetime of
the server application.
a webmodule is created once per session.
I never got around to finishing it, it is stil on my todo list.
So, should i report a bug for the wkPooled case?
You can, yes.

Michael.
--

Loading...