Question with OpenROAD Application Server

16 views
Skip to first unread message

Martin.B...@hse.gsi.gov.uk

unread,
May 21, 2013, 10:24:37 AM5/21/13
to openroa...@googlegroups.com
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.

Paul A.

unread,
May 21, 2013, 11:01:29 AM5/21/13
to openroa...@googlegroups.com
On 21/05/2013 15:24, Martin.B...@hse.gsi.gov.uk wrote:
> 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.

Won't that degrade performance? Every time you perform a query, you will
be adding an overhead opening and closing the session.

Better for having fewer sessions, but slower, surely?

Neil Warnock

unread,
May 21, 2013, 11:43:54 AM5/21/13
to openroa...@googlegroups.com
No manual to hand but from memory there is a technique you can use to
GetConnectionDetails (which goes via the nameserver etc) first time, then
Initiate/Connect and Release with each call. That won't have much of an
overhead at all, but using a full Connect via the nameserver will and can be
avoided. I think this is covered off in the manual somewhere. There is an
example of how to do a stateless connect, call, release I think. Have a look
at the Connect method description. Will check later when I can.

On the specific question, yes, I think you should release after each call
whatever the call returns or does..

Rgds,

Neil Warnock
Bluesmith Information Systems
t: 0845 680 6084
m: 07712 650291
e: Neil.W...@bluesmithIS.com
w: www.bluesmithIS.com

Bluesmith Information Systems Limited, The Forge, 122 Millshaw, Leeds, LS11
8LZ.
Registered in England - Company Number 7540927.
--
You received this message because you are subscribed to the Google Groups
"OpenROAD Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to openroad-user...@googlegroups.com.
Visit this group at http://groups.google.com/group/openroad-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



Reply all
Reply to author
Forward
0 new messages