Discussion:
How do you control the initialization order of services
Scott Bostater
2015-03-25 22:45:48 UTC
Permalink
I have a server that is made up of multiple services. Some services are mandatory, other services are optional based on what has been licensed to the end user. Is there a way to assure that the mandatory services are initialized (via axis2_svc_skel_<name>_create()) before the optional ones?



Scott Bostater
678-639-5252
www.jda.com




Don’t Miss FOCUS 2015 Orlando – over 100 customer-led sessions and 1 Grammy-winning singer! Learn More > <http://www.jda.com/focus>
Nandika Jayawardana
2015-04-07 16:52:16 UTC
Permalink
Hi Bob,

The files will be sorted in alphabetical order when reading the services
from the service deployment directory and the services are initialized in
that order as well.

Regards
Nandika
Post by Scott Bostater
I have a server that is made up of multiple services. Some services are
mandatory, other services are optional based on what has been licensed to
the end user. Is there a way to assure that the mandatory services are
initialized (via axis2_svc_skel_<name>_create()) before the optional ones?
*Scott Bostater *
*678-639-5252 <678-639-5252> www.jda.com <http://www.jda.com>*
*Don’t Miss FOCUS 2015 Orlando – over 100 customer-led sessions and 1
Grammy-winning singer! Learn More > <http://www.jda.com/focus>*
Scott Bostater
2015-04-08 13:58:25 UTC
Permalink
The order is not alphabetical (at least not in axis2/c 1.6.0). Here is what I am seeing in the apache error.log file. My goal is to have the Common services initialized first. Currently, it is the 6th service being initialized. For right now, I am ok since the other 3 services that are dependent on Common (MarketPlace, RPSAdmin, and MRO) are being initialized after Common. However, it looks like its working by chance, not design.


md1silinux07:/project/cpo/scott/log/PrimeTime_U> grep -e "/services/.*shared lib loaded successfully" error.log
[Wed Apr 8 04:34:21 2015] [debug] class_loader.c(140) /project/cpo/scott/services/Requirement/libRequirement.so shared lib loaded successfully
[Wed Apr 8 04:34:21 2015] [debug] class_loader.c(140) /project/cpo/scott/services/ExternalInterface/libExternalInterface.so shared lib loaded successfully
[Wed Apr 8 04:34:21 2015] [debug] class_loader.c(140) /project/cpo/scott/services/Rollover/libRollover.so shared lib loaded successfully
[Wed Apr 8 04:34:21 2015] [debug] class_loader.c(140) /project/cpo/scott/services/ExternalUpdate/libExternalUpdate.so shared lib loaded successfully
[Wed Apr 8 04:34:21 2015] [debug] class_loader.c(140) /project/cpo/scott/services/FreeWheel/libFreeWheel.so shared lib loaded successfully
[Wed Apr 8 04:34:48 2015] [debug] class_loader.c(140) /project/cpo/scott/services/Common/libCommon.so shared lib loaded successfully
[Wed Apr 8 04:34:48 2015] [debug] class_loader.c(140) /project/cpo/scott/services/MarketPlace/libMarketPlace.so shared lib loaded successfully
[Wed Apr 8 04:34:48 2015] [debug] class_loader.c(140) /project/cpo/scott/services/Placement/libPlacement.so shared lib loaded successfully
[Wed Apr 8 04:34:48 2015] [debug] class_loader.c(140) /project/cpo/scott/services/Network/libNetwork.so shared lib loaded successfully
[Wed Apr 8 04:34:48 2015] [debug] class_loader.c(140) /project/cpo/scott/services/RotationMapping/libRotationMapping.so shared lib loaded successfully

If the order were alphabetical, then I would expect the order to be:


1. Common

2. ExternalInterface

3. ExternalUpdate

4. FreeWheel

5. MarketPlace

6. Network

7. Placement

8. Requirement

9. Rollover

10. RotationMapping


For another configuration I see:

md1silinux07:/project/media-platform/scott3/rps/log/mro> grep -e "/services/.*shared lib loaded successfully" error.log
[Tue Apr 7 15:08:54 2015] [debug] class_loader.c(140) /project/media-platform/scott3/rps/services/RPSStewardship/libRPSStewardship.so shared lib loaded successfully
[Tue Apr 7 15:08:54 2015] [debug] class_loader.c(140) /project/media-platform/scott3/rps/services/RPS/libRPS.so shared lib loaded successfully
[Tue Apr 7 15:08:54 2015] [debug] class_loader.c(140) /project/media-platform/scott3/rps/services/ExternalUpdate/libExternalUpdate.so shared lib loaded successfully
[Tue Apr 7 15:08:54 2015] [debug] class_loader.c(140) /project/media-platform/scott3/rps/services/Common/libCommon.so shared lib loaded successfully
[Tue Apr 7 15:08:54 2015] [debug] class_loader.c(140) /project/media-platform/scott3/rps/services/RPSRatecard/libRPSRatecard.so shared lib loaded successfully
[Tue Apr 7 15:08:54 2015] [debug] class_loader.c(140) /project/media-platform/scott3/rps/services/RPSForecast/libRPSForecast.so shared lib loaded successfully
[Tue Apr 7 15:08:54 2015] [debug] class_loader.c(140) /project/media-platform/scott3/rps/services/MRO/libMRO.so shared lib loaded successfully
[Tue Apr 7 15:08:54 2015] [debug] class_loader.c(140) /project/media-platform/scott3/rps/services/RPSAdmin/libRPSAdmin.so shared lib loaded successfully

If the order were alphabetical, then I would expect the order to be:

1. Common

2. ExternalUpdate

3. MRO

4. RPS

5. RPSAdmin

6. RPSForecast

7. RPSRatecard

8. RPSStewardship


Scott Bostater
678-639-5252
www.jda.com

From: Nandika Jayawardana [mailto:***@gmail.com]
Sent: Tuesday, April 07, 2015 12:52 PM
To: Apache AXIS C User List
Subject: Re: How do you control the initialization order of services

Hi Bob,

The files will be sorted in alphabetical order when reading the services from the service deployment directory and the services are initialized in that order as well.

Regards
Nandika

On Thu, Mar 26, 2015 at 4:15 AM, Scott Bostater <***@jda.com<mailto:***@jda.com>> wrote:

I have a server that is made up of multiple services. Some services are mandatory, other services are optional based on what has been licensed to the end user. Is there a way to assure that the mandatory services are initialized (via axis2_svc_skel_<name>_create()) before the optional ones?



Scott Bostater
678-639-5252<tel:678-639-5252>
www.jda.com<http://www.jda.com>




Don’t Miss FOCUS 2015 Orlando – over 100 customer-led sessions and 1 Grammy-winning singer! Learn More > <http://www.jda.com/focus>
Loading...