Subversion Repositories DevTools

Rev

Rev 5923 | Rev 7387 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5923 Rev 6776
Line 1... Line 1...
1
########################################################################
1
########################################################################
2
# Copyright (c) VIX TECHNOLOGY (AUST) LTD
2
# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
3
#
3
#
4
# Module name   : jats.sh
4
# Module name   : DBI.pm
5
# Module type   : Makefile system
5
# Module type   : Makefile system
6
# Compiler(s)   : n/a
6
# Compiler(s)   : n/a
7
# Environment(s): jats
7
# Environment(s): jats
8
#
8
#
9
# Description   : This package has been created to simplify the migration
9
# Description   : This package has been created to simplify the migration
Line 11... Line 11...
11
#                 to Release Manager, to a JDBC interface.
11
#                 to Release Manager, to a JDBC interface.
12
#
12
#
13
#                 The package provides suffient methods to trick the existing
13
#                 The package provides suffient methods to trick the existing
14
#                 code into working. No More. No less.
14
#                 code into working. No More. No less.
15
#
15
#
16
# Usage:
-
 
17
#
-
 
18
# Version   Who      Date        Description
-
 
19
#
-
 
20
#......................................................................#
16
#......................................................................#
21
 
17
 
22
require 5.006_001;
18
require 5.006_001;
23
use strict;
19
use strict;
24
use warnings;
20
use warnings;
Line 119... Line 115...
119
    push @cmd, $full_app;
115
    push @cmd, $full_app;
120
    push @cmd, $self->{DB};
116
    push @cmd, $self->{DB};
121
    push @cmd, $self->{USER};
117
    push @cmd, $self->{USER};
122
    push @cmd, $self->{PASSWORD};
118
    push @cmd, $self->{PASSWORD};
123
 
119
 
-
 
120
    print "[DBI] Command: @cmd\n" if $verbose;
124
    $self->{PID} = IPC::Open2::open2($self->{FH_READ}, $self->{FH_WRITE}, @cmd );
121
    $self->{PID} = IPC::Open2::open2($self->{FH_READ}, $self->{FH_WRITE}, @cmd );
125
 
122
 
126
    $self->{ERROR} = 1;
123
    $self->{ERROR} = 1;
127
    $errstr = "Failed to start server app";
124
    $errstr = "Failed to start server app";
128
    if ( $self->{PID} )
125
    if ( $self->{PID} )
Line 131... Line 128...
131
        #   Extract status and any error information
128
        #   Extract status and any error information
132
        #
129
        #
133
        my $fh = $self->{FH_READ};
130
        my $fh = $self->{FH_READ};
134
        while ( <$fh> )
131
        while ( <$fh> )
135
        {
132
        {
136
            chomp;
133
            $_ =~ s~\s+$~~;
137
            print "[DBI] Connect: $_\n" if $verbose;
134
            print "[DBI] Connect: $_\n" if $verbose;
138
 
135
 
139
            if ( m/^ConnectionOpened:/ )
136
            if ( m/^ConnectionOpened:/ )
140
            {
137
            {
141
                $self->{ERROR} = 0;
138
                $self->{ERROR} = 0;