All,
I have a question regarding the use of the OpenROAD Application Server.
In the past I have always used Stateful Application Servers (with BPM).
In this case I connect when the application starts and disconnect when
the application quits. However, I am working on converting an
application to using a Stateless Server (without BPM). When I first
converted the application I kept the same connection technique of
connecting at application start and disconnect at application quit.
In order to improve performance, I am looking to change this to a
"Connect - Call4GL - Disconnect" regime. I have created myself an
include script to do the connection, but am not 100% certain about where
to do the RemoteServer.Release()? My code is as follows:
#INCLUDE Connect_Is
iStatus = CurRemoteServer.Call4GL ('SCP_GetWorkDays',
WorkDays = ByRef(WorkDays_Gv),
b_osca = ByRef(OSCA));
IF OSCA.CheckAndHandleError (p_i_aso_retval = iStatus) = GC_I_RESUME
THEN
CurRemoteServer.Release(); <-- is this required here????
resume;
ENDIF;
CurRemoteServer.Release();
My Connect_Is script contains the following code:
iStatus = CurRemoteServer.Initiate (Image = 'ET_ASA',
Routing = 'http',
Location = :ORGatewayURL_Gv,
Type = :ORServerType_Gv);
IF iStatus != ER_OK AND ORServerType_Gv = RP_SHARED THEN
message 'Unable to connect to the Server. The following error
occurred: + CurRemoteServer.ErrorText;
return;
ENDIF;
Can anyone confirm that my understanding is correct and I need to
release the Server connection if an OSCA error is returned? Also, can
anyone suggest a better way of doing the Connect as I'm not 100% certain
that returning if the connection cannot be made is always the right
thing to do. Could there be instances when trying again would be
possible - if so how to handle it?
Many thanks in advance for any suggestions,
Martin Bloomfield.
_________________________________________________
Application Developer & Database Administrator
IT Branch
Chemicals Regulation Directorate
Health and Safety Executive
YORK
Email:
martin.b...@hse.gsi.gov.uk
Website:
www.pesticides.gov.uk <
http://www.pesticides.gov.uk/>
www.hse.gov.uk <
http://www.hse.gov.uk/>
P Save a tree... please don't print this e-mail unless you really need
to
*****************************************************************************************************************
Please note : Incoming and outgoing email messages are routinely monitored for compliance with our policy on the use of electronic communications and may be automatically logged, monitored and / or recorded for lawful purposes by the GSI service provider.
Interested in Occupational Health and Safety information?
Please visit the HSE website at the following address to keep yourself up to date
www.hse.gov.uk
*****************************************************************************************************************
The original of this email was scanned for viruses by the Government Secure Intranet virus scanning service supplied by Vodafone in partnership with Symantec. (CCTM Certificate Number 2009/09/0052.) On leaving the GSi this email was certified virus free.
Communications via the GSi may be automatically logged, monitored and/or recorded for legal purposes.