Skip to content

Commit

Permalink
PAYARA-2166 Deploy without checking the database (#2027)
Browse files Browse the repository at this point in the history
Signed-off-by: jGauravGupta <gaurav.gupta.jc@gmail.com>
  • Loading branch information
jGauravGupta authored and smillidge committed Sep 23, 2017
1 parent 5c4bee9 commit e86deeb
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,12 @@ private void iterateInitializedPUsAtApplicationPrepare(final DeploymentContext c
} catch (PersistenceException e) {
// Exception indicates something went wrong while performing validation. Clean up and rethrow to fail deployment
emf.close();
throw new DeploymentException(e); // Need to wrap exception in DeploymentException else deployment will not fail !!
DeployCommandParameters dcp = context.getCommandParameters(DeployCommandParameters.class);
if (dcp.isSkipDSFailure() && ExceptionUtil.isDSFailure(e)) {
logger.log(Level.WARNING, "Resource communication failure exception skipped while loading the pu " + pud.getName(), e);
} else {
throw new DeploymentException(e); // Need to wrap exception in DeploymentException else deployment will not fail !!
}
} finally {
if (em != null) {
em.close();
Expand Down

0 comments on commit e86deeb

Please sign in to comment.