Yes, entries in a ResourcePool are persistent (stored in a file). So,
entries that exist in resource pools when the service (or STAFProc) is
stopped) will be there when the service (or STAFProc) is restarted.
However, any information about pending requests, owned resources, etc, is
not persistent. When the ResPool service (or STAFProc) is restarted, all
resource pool entries will be available (e.g. not owned) and there will be
no pending requests.
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: clayton neal <clayton_n...@yahoo.co.uk>
To: Sharon Lucas/Austin/IBM@IBMUS,
Date: 09/26/2011 02:04 PM
Subject: Re: [staf-users] STAF Design questions
Hiya,
Actually I have another question about ResourcePool service
Does it persist all resource entries? So that if the service is stopped
then started again, it loads all the resource back from a file?
Thanks,
Clayton
From: Sharon Lucas <luc...@us.ibm.com>
To: clayton neal <clayton_n...@yahoo.co.uk>
Sent: Monday, 26 September 2011, 19:38
Subject: Re: [staf-users] STAF Design questions
You have a typo in your SERVICE ADD request. You specified PARAMS instead
of PARMS. Since PARAMS is not a supported option on a SERVICE ADD
request, the STAF command parser assumes that "PARAMS C:\auto" is a
continuation of the previous option so, as the error message says, it is
looking for a file named
"E:\Clayton\TestFarm\src\InboxProcessor\jar\InboxService.jar PARAMS
C;\auto" which of course does not exist (instead of looking for a file
named "E:\Clayton\TestFarm\src\InboxProcessor\jar\InboxSerivce.jar".
Changing to the following will resolve this problem:
STAF LOCAL SERVICE ADD SERVICE InboxProcessor LIBRARY JSTAF EXECUTE
E:\Clayton\TestFarm\src\InboxProcessor\jar\InboxService.jar PARMS
"C:\auto"
Sub-section "8.16.4 ADD"in section "8.16 Service Service" in the STAF
User's Guide at
http://staf.sourceforge.net/current/STAFUG.htm#HDRSRVSERVICE shows the
syntax for a SERVICE ADD request to be:
ADD SERVICE <Service Name> LIBRARY <Library Name> [EXECUTE <Executable>]
[OPTION <Name[=Value]>]... [PARMS <Parameters>]
The JVM log is key for debugging a Java service. Any println output will
be written to the JVM log Since you are not specifying OPTION JVMName,
your service is running in default JVMName "STAFJVM1", so the JVM log for
your service can be found at:
{STAF/DataDir}\lang\java\jvm\STAFJVM1\JVMLog.1
Note that if STAF is installed to the default location of C:\STAF and if
you are using the default data directory and default STAF_INSTANCE_NAME,
then {STAF/DataDir} resolves to C:\STAF\data\STAF.
For more information on the JVM log, see sub-section "5.4.2 View the JVM
Log" in section "5.4 Debugging a Java STAF Service" in the STAF Service
Developer's Guide at
http://staf.sourceforge.net/current/stafsdg.html#Header_Debugging_Java_Service
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: clayton neal <clayton_n...@yahoo.co.uk>
To: Sharon Lucas/Austin/IBM@IBMUS,
Date: 09/26/2011 01:13 PM
Subject: Re: [staf-users] STAF Design questions
Hiya Sharon,
Here is the output of "jar tf" command:
META-INF/
META-INF/MANIFEST.MF
STAF-INF/
STAF-INF/classes/
STAF-INF/classes/com/
STAF-INF/classes/com/sophis/
STAF-INF/classes/com/sophis/testfarm/
STAF-INF/classes/com/sophis/testfarm/inboxservice/
STAF-INF/classes/com/sophis/testfarm/inboxservice/InboxService.class
STAF-INF/classes/com/sophis/testfarm/inboxservice/InboxThread.class
The command i used to register the service was:
E:\Clayton\TestFarm\src\InboxProcessor\jar>STAF LOCAL SERVICE ADD SERVICE
InboxP
rocessor LIBRARY JSTAF EXECUTE
E:\Clayton\TestFarm\src\InboxProcessor\jar\InboxS
ervice.jar PARAMS "C:\auto"
The error I get is:
Error submitting request, RC: 27
Additional info
---------------
38:Error constructing service, JSTAF, Result: ClassNotFound:
E:\Clayton\TestFarm
\src\InboxProcessor\jar\InboxService.jar PARAMS C:\auto
Am not sure where the JVM log file is?!
Thanks
Clayton
From: Sharon Lucas <luc...@us.ibm.com>
To: clayton neal <clayton_n...@yahoo.co.uk>
Cc: "staf-users@lists.sourceforge.net" <staf-users@lists.sourceforge.net>
Sent: Monday, 26 September 2011, 18:37
Subject: Re: [staf-users] STAF Design questions
Threads are not passed onto your service. STAF handles thread management
for all service requests (not just those for your custom service) and is
multi-threaded so acceptRequest will be called on multiple threads.
Since STAF is an open-source project, you can download / view all of its
source code for more information.
To help debug your issue, please provide the output of running "jar tf
yourService.jar" and the line in your STAF.cfg file where you are
registering the service (or the SERVICE ADD request) and the exact error
you are getting from STAFProc output and from the JVM log file for your
service.
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: clayton neal <clayton_n...@yahoo.co.uk>
To: Sharon Lucas/Austin/IBM@IBMUS,
Cc: "staf-users@lists.sourceforge.net"
<staf-users@lists.sourceforge.net>
Date: 09/26/2011 12:25 PM
Subject: Re: [staf-users] STAF Design questions
Hiya,
Thanks for the reply.
For point 1 STAF has many threads to handle requests (good), but how are
these passed onto my service?
I mean if i develop a new service, and then fire 1000 requests to it per
minute, will STAF queue them
and call acceptRequest in my service on a single thread one at a time, or
will acceptRequest be called on multiple threads?
As I'm also new to Java I seem to be getting an error loading my service
I get a class not found exception when adding the service
The .jar file for the service contains two .class files in correct place
STAF-INF/classes directory
But when the service class entry point creates an instance of the second
class i get this error
Thanks,
Clayton
From: Sharon Lucas <luc...@us.ibm.com>
To: clayton neal <clayton_n...@yahoo.co.uk>
Cc: "staf-users@lists.sourceforge.net" <staf-users@lists.sourceforge.net>
Sent: Monday, 26 September 2011, 17:46
Subject: Re: [staf-users] STAF Design questions
Hi Clayton,
Welcome to the STAF project. Here are answers to your questions:
1. If I were to write a new STAF service, how are requests to that service
managed? I guess there are placed on the handle queue, but does STAF
create many threads to handle them? Is there any control of threading to
handle large number of requests?
The service requests are not placed on a handle's queue. STAF provides
threading support to handle STAF service requests via its thread manager
which manages the thread pool. You can configure the number of threads
initially created to handle service requests via the INITIALTHREADS
operational parameter in the STAF.cfg file and you can specify the number
of additional threads which should be created when all existing threads
are busy via the THREADGROWTHDELTA operational parameter. See section
"4.7 Operational parameters" in the STAF User's Guide at
http://staf.sourceforge.net/current/STAFUG.htm#HDROPPARMS for more
information on these operational parameters.
2. What's the difference between a message and a request? A request will
call code in my service, but a message doesn't? Its just placed on a
queue?
A STAF service request is a request that is submitted to a STAF service
(e.g. a START request submitted to the PROCESS service, or a QUEUE request
submitted to the QUEUE service, etc). The QUEUE service is one of the
many STAF internal services. The QUEUE service lets you send a message
string via its QUEUE request to a STAF handle's queue.
3. Is there any control of handle queue sizes, request time-outs etc?
Yes. Section "4.7 Operational parameters" in the STAF User's Guide
contains more information about the STAF operational parameters such as
MAXQUEUESIZE, CONNECTRETRYDELAY, and CONNECTATTEMPTS that can be set in
the STAF.cfg file. For example, MAXQUEUESIZE specifies the maximum size
of the queue associated with each handle.
The MISC (Miscellaneous) service provides a LIST SETTINGS request that
lists the current operational settings for STAF and provides a SET request
that allows you to dynamically change some of the operational settings
including MAXQUEUESIZE. The MISC service also provides a LIST INTERFACES
request that allows you to list the interfaces (aka connection providers)
that are enabled and their configuration settings.
See section "4.3.2 STAFTCP Connection Provider" in the STAF User's Guide
contains more information about configuration options for the STAF TCP
interface such as CONNECTTIMEOUT. The TCP connection provider's
ReadWriteTimeout is based on the CONNECTTIMEOUT value.
Each STAF service may have some settings used to configure the service.
These are talked about in section "8.0 Service reference" in the STAF
User's Guide for each individual service. Each service may have
parameters that can be specified when registering the service (and
possibly changed dynamically if the service provides a SET request to do
so) For example, the LOG service has a MAXRECORDSIZE parameter that can
be used to override the default maximum length of a logged message in a
log file.
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: clayton neal <clayton_n...@yahoo.co.uk>
To: "staf-users@lists.sourceforge.net"
<staf-users@lists.sourceforge.net>,
Date: 09/24/2011 02:49 AM
Subject: [staf-users] STAF Design questions
Dear STAF,
I am looking to implement a software testing framework for my company, and
came accross STAF
It may save me some time to implement - and is im a .net person, a chance
to learn some Java
Before I settle on STAF as my wepon of choice in the automation war's, I'd
like to ask a few questions first.
The framework I need to implement has to handle quite large load, so my
questions would be:
1. If I were to write a new STAF service, how are requests to that service
managed?
I guess there are placed on the handle queue, but does STAF
create many threads to handle them?
Is there any control of threading to handle large number of
requests?
2. Whats the difference between a message and a request?
A request will call code in my service, but a message doesnt? Its
just placed on a queue
3. Is there any control of handle queue sizes, request time-outs etc?
I'm coming from a WCF background here, so if your familiar with that, 1
would relate to ConcurrencyMode
Thanks again,
Clayton
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users