king
I'm new here

Initialization of module components (autostart)

Dear FirstSpirit-Community,

in chapter 3.4 of the current module developer handbook, you describe the initialization of FirstSpirit module components. There, it is mentioned, that_:

  • library
  • services

are initialized at FirstSpirit server startup time when "autostart" is enabled.

Our questions:

- where to enable autostart?

- when will the above components be initialized in case where autostart is disabled?

Additionally, it might be helpful, to have that information noted down in any documentation - or did we just oversee?

0 Kudos
7 Replies
StefanSchulz
I'm new here

Quote from FirstSpirit Manual for Administrators Chapter 7.3.14 Modules:

"If the option autostart is enabled, the service will be automatically

started after a server restart. If the option autostart is disabled, the service must be

manually started after a server restart. This option can initially be defined during the

installation or update operation of services."

And it further states that a "service can also be started via Server Monitoring".

Hope this helps.

Stefan.

0 Kudos

Dear Stefan,

my emphasis is lying on FirstSpirit "library" module components. Is there a autostart configuration flag also available for LIBRARIES?

Because you mention it in your current module developer handbook. See chapter 3.4 again, please and verify for LIBRARIES.

As long as we talk about FirstSpirit services, I agree with your last comment.

0 Kudos

Dear Holger,

The "autostart" setting is only mentioned and relevant for Services.

Libraries and other components are loaded at startup. If I am not completely mistaken, there is no need for "starting" those.

Cheers, Stefan

0 Kudos

Hi Stefan,

thanx - no I got it. Because the information given in brackets within the Module Developer Documentation of chapter 3.4 regarding "when setting autostart to enabled" just refers to FirstSpirit SERVICES NOT LIBRARIES.

But what if I implement a LIBRARY module component the following way:

public class RepairOwner implements Executable, Library<ServerEnvironment> {

...

     public void init(LibraryDescriptor desc, ServerEnvironment env) {

          this.libDesc = desc;

          this.env = env;

          ...

     }

...

}

When will this method be called? Not a FirstSpirit server startup. Maybe, when the library class is called out of a script context (Beanshell, Executable-Class)?

Here in that case, the class implements both interfaces:

  • Executable
  • Library

to allow a usage within a scheduler task and a classic script.

0 Kudos

This one took me a while Smiley Happy

As it seems, for a Library, init never gets called.

For active components, Service is the desired type.

This issue has been filed with ID TS#123604 for correction of code and documentation.

Thanks,

Stefan

0 Kudos

Dear Stefan,

so you mean you:

  • opened a bug report?
  • requested a documentatin change?

below the given internal FirstSpirit issue ID 123605?

0 Kudos

The interface "Library" will be deprecated and removed from the documentation.

Peter
0 Kudos