I'm sure you all have come upon a situation where the webspeed agents gets disconnected from the DB.
Wouldn't it be great to have a batch process that can run an check each agent if it is connected to all the
databases it should be connected to ?
something like this:
for each webspeed agent of service xxxxx:
if not connected(db1)
then do:
kill agent / connect agent to db.
send me an email
end,
if not connected(db2)
then do:
kill agent / connect agent to db.
send me an email....
end.
end.
You are assuming that webspeed always connects to a database, which is not the case every time. That being said, nothing is stopping you to write a small .p which will do exactly that. You can load it within the web-disp.p, so it will check whether all your databases are connected, and if not it will issue connect.
Reply by Libor LaubacherYou are assuming that webspeed always connects to a database, which is not the case every time. That being said, nothing is stopping you to write a small .p which will do exactly that. You can load it within the web-disp.p, so it will check whether all your databases are connected, and if not it will issue connect.
Stop receiving emails on this subject.Flag this post as spam/abuse.
To expand on what Libor said, that funcionality exists in WebSpeed for quite some time.
You should take a look at the $DLC/webspeed/doc/wshelp/framework.htm
All you have to do is to add in the broker's environment appropriate variable name and a list of databases, e.g.:
Databases=sports2000=sportsconnect.p|db1=-pf c:/databases/db1.pf
Relevant variable names are: Databases, dbFailover, DbGroup, DBObject
There is also a number of KBase entries describing their usage:
knowledgebase.progress.com/pkb_Home
Hope this helps...
Reply by Sasha KraljevicTo expand on what Libor said, that funcionality exists in WebSpeed for quite some time.
You should take a look at the $DLC/webspeed/doc/wshelp/framework.htm
All you have to do is to add in the broker's environment appropriate variable name and a list of databases, e.g.:
Databases=sports2000=sportsconnect.p|db1=-pf c:/databases/db1.pf
Relevant variable names are: Databases, dbFailover, DbGroup, DBObject
There is also a number of KBase entries describing their usage:
knowledgebase.progress.com/pkb_Home
Hope this helps...
Stop receiving emails on this subject.Flag this post as spam/abuse.
If you read further in the same place you will see that there is another environment variable called SUPER-PROC.
If you define :
SUPER-PROC=mybatch.p
and in the mybatch.p you put the following code:
<mybatch.p code>
procedure init-batch: RUN my-init-batch.p . end. procedure run-batch-object: RUN my-run-batch-object.p . end. procedure end-batch: RUN my-end-batch.p . end.
</mybatch.p code>
You will execute these procedures at the end of the specified BATCH_INTERVAL.
In other words, you can place any RUN statement that you need in one of these internal procedures and they
will get executed - therefore no need to change Progress supplied source code.
This in combination with other environment variables, should you choose not to use standard WebSpeed built-in db connectivity, will you give you exactly what you want: checking db connectivity within procedure every BATCH_INTERVAL.
I've used this to manage the session/context information cleanup within WebSpeed application.
Hope this helps...