Forum Post: Re: Instantiated Class, Propagates Database Connection Need

  • Thread starter Thread starter OctavioOlguin
  • Start date Start date
Status
Not open for further replies.
O

OctavioOlguin

Guest
I came to this technique, that is the answer to my own question (sorry for bad english): I found that procedure that was calling appserver fired 3 to 4 procedures inside appserver, each doing connect/disconnect I noticed in broket server's log that appsever made 3 to 4 connections to db in as few as 2 to 3 seconds. I had the callings to appserver's routine, enclosed on CREATE hServer. hServer:CONNECT(serversConn). RUN xyz on hServer... /* this is the routine enclosed... */ hServer:DISCONNECT. DELETE OBJECT hServer. . . . . CREATE ... hServer:CONNECT.... RUN abc..... .. DELETE ... /*and so on*/ All I have to do was to transform several connections to only one: CREATE SERVER hServer. hServer:CONNECT (CadenaServer) NO-ERROR. RUN func/ConnectDB.p(dbName) on hServer. RUN xyz ON hServer. RUN abc ON hServer. run func/DisconnectDB(dbName) on hServer. hServer:DISCONNECT (). DELETE OBJECT hServer. Doing that, I accomplished: 1) Making one connection to db only for a lapse of time. 2) procedures xyz and abc were able to do it's stuff directly, even they had instances of classes that accessed database. Before that, I had to call xyz which connected to db and in turn called process_xyz , which made the stuff actually. That's what I meant by trick on my original question... Thanks everyone for interest on this thread. (posted for newbies (like me) looking for insight knowledge)

Continue reading...
 
Status
Not open for further replies.
Back
Top