em.getTransaction().commit();
} catch(Exception e){
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
em.getTransaction().rollback();
}
em.close();
dbd = PolicyDBDao.getPolicyDBDaoInstance(emf);
dbd2 = PolicyDBDao.getPolicyDBDaoInstance(emf);
} catch (Exception e) {
- //e.printStackTrace();
+ //logger.error("Exception Occured"+e);
Assert.fail();
}
try{
result = (PolicyEntity)getDataQuery.getSingleResult();
} catch(Exception e){
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
Assert.assertEquals(xmlFile, result.getPolicyData());
transac = dbd.getNewTransaction();
transac.deletePolicy(filePath);
} catch(Exception e){
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
Assert.assertTrue(transac.isTransactionOpen());
transac = dbd.getNewTransaction();
transac.deletePolicy(filePath);
} catch(Exception e){
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
transac.commitTransaction();
try{
result = (PolicyEntity)getDataQuery.getSingleResult();
} catch(Exception e){
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
String expectedData;
transaction = dbd.getNewTransaction();
transaction.deletePolicy(policyFile.getAbsolutePath());
} catch(Exception e){
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
Assert.assertTrue(transaction.isTransactionOpen());
transaction = dbd.getNewTransaction();
transaction.deletePolicy(policyFile.getAbsolutePath());
} catch(Exception e){
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
//Assert.assertFalse(transaction.isTransactionOpen());
group.commitTransaction();
} catch(Exception e){
group.rollbackTransaction();
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
EntityManager em = emf.createEntityManager();
group.commitTransaction();
} catch(Exception e){
group.rollbackTransaction();
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
em = emf.createEntityManager();
group.commitTransaction();
} catch(Exception e){
group.rollbackTransaction();
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
group = dbd.getNewTransaction();
group.commitTransaction();
} catch(Exception e){
group.rollbackTransaction();
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
em = emf.createEntityManager();
group.commitTransaction();
} catch(Exception e){
group.rollbackTransaction();
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
em = emf.createEntityManager();
group.commitTransaction();
} catch(Exception e){
group.rollbackTransaction();
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
group = dbd.getNewTransaction();
group.commitTransaction();
} catch(Exception e){
group.rollbackTransaction();
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
group.commitTransaction();
} catch(Exception e){
group.rollbackTransaction();
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
group = dbd.getNewTransaction();
group.commitTransaction();
} catch(Exception e){
group.rollbackTransaction();
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
em = emf.createEntityManager();
group.commitTransaction();
} catch(Exception e){
group.rollbackTransaction();
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
em = emf.createEntityManager();
group.rollbackTransaction();
} catch(Exception e){
group.rollbackTransaction();
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
group.updateGroup(pdpGroup, "testuser");
group.commitTransaction();
}catch (Exception e){
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
group.rollbackTransaction();
Assert.fail();
}
System.out.println("Decrypted password: "+decr);
Assert.assertEquals("testpassword", decr);
} catch (Exception e) {
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}
}
Thread.sleep(sleepTime);
} catch (InterruptedException e) {
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
}
if(logger.isDebugEnabled()){
Date date= new java.util.Date();
}
Thread.sleep(sleepTime);
} catch (InterruptedException e) {
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
}
if(logger.isDebugEnabled()){
Date date= new java.util.Date();
+ "\n TimeStamp = " + date.getTime()
+ "\n\n");
}
- e.printStackTrace();
+ logger.error("Exception Occured"+e);
Assert.fail();
}