Skip to content

Commit

Permalink
connector glassfish runner.
Browse files Browse the repository at this point in the history
Signed-off-by: Gurunandan Rao <[email protected]>
  • Loading branch information
gurunrao committed Nov 19, 2024
1 parent 950e6c8 commit 2fec7be
Show file tree
Hide file tree
Showing 29 changed files with 6,126 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public TSConnection getConnection() throws Exception {
.logAPI("TSConnectionImpl.getConnection", "", "");
return ctscon;
} catch (Exception ex) {
ex.printStackTrace();
ex.getMessage();
return null;
}
Expand All @@ -62,6 +63,7 @@ public TSConnection getConnection(String user, char[] passwd)
.logAPI("TSConnectionImpl.getConnection", "", "");
return ctscon;
} catch (Exception ex) {
ex.printStackTrace();
ex.getMessage();
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ TSConnection getTSEISConnection() {
return null;
}
} catch (Exception ex) {
ex.printStackTrace();
return null;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@ public void setup(String[] args, Properties p) throws Exception {
logMsg("Using: " + whitebox_tx_param);

// For application level sign on
uname = p.getProperty("rauser1");
uname = p.getProperty("rauser1");
password = p.getProperty("rapassword1");

// Construct our DBSupport object. This object performs interactions
// on a table, based on the properties object supplied.
try {
dbutil = new DBSupport();
} catch (Exception e) {
e.printStackTrace();
TestUtil.printStackTrace(e);
TestUtil.logErr("###", e);
throw new Exception(
Expand All @@ -99,6 +100,7 @@ public void setup(String[] args, Properties p) throws Exception {
ds1 = (TSDataSource) nctx.lookup(whitebox_tx);
ds2 = (TSDataSource) nctx.lookup(whitebox_tx_param);
} catch (Exception e) {
e.printStackTrace();
TestUtil.printStackTrace(e);
TestUtil.logErr("####", e);
TestUtil.logMsg("Exception during JNDI lookup: " + e.getMessage());
Expand All @@ -120,13 +122,14 @@ public void setup(String[] args, Properties p) throws Exception {
*
*/
public void testGetConnection1() throws Exception {

// Get connection object using no parameters. Container managed
// signon.
try {
con = ds1.getConnection();
TestUtil.logMsg("Got connection from the DataSource.");
} catch (Exception e) {
e.printStackTrace();
TestUtil.logErr("Exception caught on creating connection.", e);
TestUtil.printStackTrace(e);
TestUtil.logErr("###", e);
Expand All @@ -141,6 +144,7 @@ public void testGetConnection1() throws Exception {
dbutil.insertIntoTable(con);
TestUtil.logMsg("Values inserted into table!");
} catch (Exception sqle) {
sqle.printStackTrace();
TestUtil.logErr("Exception inserting into table.", sqle);
TestUtil.printStackTrace(sqle);
throw new Exception(sqle.getMessage());
Expand All @@ -151,6 +155,7 @@ public void testGetConnection1() throws Exception {
dbutil.dropTable(con);
TestUtil.logMsg("Table has been dropped!");
} catch (Exception sqle) {
sqle.printStackTrace();
TestUtil.logErr("Exception dropping table.", sqle);
TestUtil.printStackTrace(sqle);
throw new Exception(sqle.getMessage());
Expand All @@ -172,7 +177,7 @@ public void testGetConnection1() throws Exception {
*
*/
public void testgetConnectionWithParameter1() throws Exception {

Vector log = null;
boolean b1 = false;
boolean b2 = false;
Expand All @@ -188,6 +193,7 @@ public void testgetConnectionWithParameter1() throws Exception {
log = ds2.getLog();
TestUtil.logTrace("Got connection.");
} catch (Exception sqle) {
sqle.printStackTrace();
TestUtil.logMsg("Exception caught on creating connection:");
TestUtil.printStackTrace(sqle);
throw new Exception(sqle.getMessage());
Expand Down Expand Up @@ -224,6 +230,7 @@ public void testgetConnectionWithParameter1() throws Exception {
dbutil.insertIntoTable(con);
TestUtil.logMsg("Values inserted into table!");
} catch (Exception sqle) {
sqle.printStackTrace();
TestUtil.logMsg("Exception inserting into table.");
TestUtil.printStackTrace(sqle);
throw new Exception(sqle.getMessage());
Expand All @@ -234,6 +241,7 @@ public void testgetConnectionWithParameter1() throws Exception {
dbutil.dropTable(con);
TestUtil.logMsg("Table has been dropped!");
} catch (Exception sqle) {
sqle.printStackTrace();
TestUtil.logMsg("Exception dropping table.");
TestUtil.printStackTrace(sqle);
throw new Exception(sqle.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public void setup(String[] args, Properties p) throws Exception {
try {
dbutil = new DBSupport();
} catch (Exception e) {
e.printStackTrace();
throw new Exception(
"Exception constructing DBSupport object: " + e.getMessage(), e);
}
Expand All @@ -80,6 +81,7 @@ public void setup(String[] args, Properties p) throws Exception {
ncxa = new TSNamingContext();
ds1 = (TSDataSource) ncxa.lookup(whitebox_xa);
} catch (Exception e) {
e.printStackTrace();
TestUtil.printStackTrace(e);
TestUtil.logMsg("Exception during JNDI lookup: " + e.getMessage());
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 2fec7be

Please sign in to comment.