Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-12

fcl-web (WebLaz) - Duplicate Module Error

6 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

African Wild Dog

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20171210/23ac9f88/attachment.html>

Reply by email

Michael Van Canneyt
to African Wild Dog
African Wild Dog wrote 15 lines
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

Set the 'Kind' property to wkOneShot.

Michael.

Reply by email

Michael Van Canneyt
to African Wild Dog
African Wild Dog wrote 10 lines
> > 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.

Reply by email

African Wild Dog
to Michael Van Canneyt

2017-12-10 16:26 GMT-02:00 Michael Van Canneyt via Lazarus <

Show quoted text 14 lines
: 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.

So, should i report a bug for the wkPooled case?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20171210/7b57d7ce/attachment.html>

Reply by email

Michael Van Canneyt
to African Wild Dog
African Wild Dog wrote 17 lines
2017-12-10 16:26 GMT-02:00 Michael Van Canneyt via Lazarus < >: > > 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. > So, should i report a bug for the wkPooled case?

You can, yes.

Michael.

Reply by email