HP3000-L Archives

February 2001, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Bixby <[log in to unmask]>
Reply To:
Mark Bixby <[log in to unmask]>
Date:
Tue, 20 Feb 2001 10:38:15 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
"Sohrt, Jeff" wrote:
> I've just written a cgi prog in Cobol using Lars example.  I like it, it
> works quickly but the fact is, the program runs, opens the database, does
> its stuff, then terminates which closes the database.  At least that's the
> way I figure it's working.  Is there a way to avoid the constant open/close
> of the db given that web activity is a stateless matter?
>
> I'm sure Java has a means of doing this, but can it be done in another
> language???

The Java way of doing this would be as a servlet via JServ or Tomcat (or
Enhydra).

The Perl way of doing this would be via mod_perl which embeds the Perl
interpreter into each Apache child process.  Perl CGI scripts written to take
advantage of mod_perl can have variables and open files that persist between
CGI requests.  You would open your database or file once during script
initialization, and it could remain open for the duration of the Apache child
process.

Perl doesn't support direct TurboImage access yet, but you might be able to
write a thin Perl CGI script to execute under mod_perl which would spawn a
persistent COBOL grandchild which could open the database and then interact
with the main CGI script via pipes or message files.  You would basically be
creating an application server.

Or you can use an external homegrown application server and communicate with it
via message files.  I've talked to somebody who does this with PHP.
--
[log in to unmask]
Remainder of .sig suppressed to conserve scarce California electrons...

ATOM RSS1 RSS2