Pervasive
Sign in | Join | Help
in

PSQL Engine Lockup (dtoDSN)

Last post 06-06-2008 9:13 AM by mmfranklin. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 06-06-2008 9:13 AM

    PSQL Engine Lockup (dtoDSN)

    I am using a combo of DTO and CF to connect to a PSQL Database hosted on a Netware 6.5 server. By design when users login I check credentials against a Common DB and then generated a unique DNS via dtoDSN. Upon logout I remove the DSN via dtoDSN also. The method appears solid however during the course of the day of moderate use appears to lockup the PSQL Engine in a way that I am unable to view any Databases from PCC or any of my CF pages I've written for PSQL web mgmt. Restarting the  Netware Server  fixes the problem. To me the problem is either related to my coding as shown below or settings that may need adjustment in PCC. Any insight on this matter would be greatly appreciated:)

      <!--- Create PSQL the Session object --->
    <cfobject class="dto.dtoSession.1" name="dtoSession" action="create" context="inproc" type="com">

    <!--- Connect to Session --->
    <cfset session_return = dtoSession.Connect("#Application.Settings.NWServerName#","#Application.Settings.NWServerUID#","#Application.Settings.NWServerPW#")>
        <cfif session_return NEQ 0>
            <!--- Connection Failed <CFABORT> --->
            <cfinclude template="errorDB.cfm">
            <cflog file="SiteErrors" application="no" type="Warning" text="PSQL Error:#session_return#">
            <cfset StructClear(Session)>
            <cfabort>
        </cfif>

    <!--- Add DSN to existing DB --->
    <cfobject class="dto.dtoDSN" name="create_dtoDSN" action="create" context="inproc" type="com">    
          <cfset create_dtoDSN.Dbname = #SESSION.auth.DBName#>
          <cfset create_dtoDSN.Description = "Randomly Generated DSN">
          <cfset create_dtoDSN.Name = #SESSION.auth.Temp_DSN#>
          <cfset create_dtoDSN.Openmode = 0>
        <cfset createDSN_result = dtoSession.DSNs.Add(create_dtoDSN)>
          <cfset retVal = dtoSession.disconnect()>
          
          <cfswitch expression="#createDSN_result#">
              
            <cfcase value="0">

     

    I am using the PSQL jdbc.v2 driver as shown..

     <!--- Create the DSN as it shouldn't exist yet --->
                <cfscript>
                // Login to CF admin via adminapi
                createObject("component","cfide.adminapi.administrator").login("#Application.Settings.CFServerPW#");
            
                // Instantiate the data source object.
                dsnObj = createObject("component","cfide.adminapi.datasource");
            
                // Required arguments for a data source.
                stDSN = structNew();
                stDSN.name = "#SESSION.auth.Temp_DSN#";
                stDSN.url ="jdbc:pervasive://#Application.Settings.NWServerIP#:1583/#SESSION.auth.Temp_DSN#";
                stDSN.class = "com.pervasive.jdbc.v2.Driver";
                stDSN.driver = "Pervasive T4 JDBC Connector";
                stDSN.description = "RWS Client specific DB for #SESSION.auth.Temp_DSN#";
           

Page 1 of 1 (1 items)
© 2008 Pervasive Software Inc. All Rights Reserved.