@Test public void testSetConfigurationThrowsConfigurationException1() throws Throwable { BSHTransactionParticipant bSHTransactionParticipant = new BSHTransactionParticipant(); try { bSHTransactionParticipant.setConfiguration(null); fail("Expected ConfigurationException to be thrown"); } catch (ConfigurationException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); assertNull(ex.getNested().getMessage(), "ex.getNested().getMessage()"); } else { assertEquals("Cannot invoke \"org.jdom2.Element.getChild(String)\" because \"e\" is null", ex.getMessage(), "ex.getMessage()"); assertEquals("Cannot invoke \"org.jdom2.Element.getChild(String)\" because \"e\" is null", ex.getNested().getMessage(), "ex.getNested().getMessage()"); } assertNull(bSHTransactionParticipant.prepareForAbortMethod, "bSHTransactionParticipant.prepareForAbortMethod"); assertNull(bSHTransactionParticipant.abortMethod, "bSHTransactionParticipant.abortMethod"); assertNull(bSHTransactionParticipant.commitMethod, "bSHTransactionParticipant.commitMethod"); assertNull(bSHTransactionParticipant.prepareMethod, "bSHTransactionParticipant.prepareMethod"); assertFalse(bSHTransactionParticipant.trace, "bSHTransactionParticipant.trace"); } }
public void setConfiguration(Element e) throws ConfigurationException { try { prepareMethod = BSHMethod.createBshMethod(e.getChild("prepare")); prepareForAbortMethod = BSHMethod.createBshMethod(e.getChild("prepare-for-abort")); commitMethod = BSHMethod.createBshMethod(e.getChild("commit")); abortMethod = BSHMethod.createBshMethod(e.getChild("abort")); trace = "yes".equals (QFactory.getAttributeValue (e, "trace")); } catch (Exception ex) { throw new ConfigurationException(ex.getMessage(), ex); } }
BSHTransactionParticipant extends SimpleLogSource implements TransactionParticipant, AbortParticipant, XmlConfigurable { public void setConfiguration(Element e) throws ConfigurationException { try { prepareMethod = BSHMethod.createBshMethod(e.getChild("prepare")); prepareForAbortMethod = BSHMethod.createBshMethod(e.getChild("prepare-for-abort")); commitMethod = BSHMethod.createBshMethod(e.getChild("commit")); abortMethod = BSHMethod.createBshMethod(e.getChild("abort")); trace = "yes".equals (QFactory.getAttributeValue (e, "trace")); } catch (Exception ex) { throw new ConfigurationException(ex.getMessage(), ex); } } }
BSHTransactionParticipant extends SimpleLogSource implements TransactionParticipant, AbortParticipant, XmlConfigurable { public void setConfiguration(Element e) throws ConfigurationException { try { prepareMethod = BSHMethod.createBshMethod(e.getChild("prepare")); prepareForAbortMethod = BSHMethod.createBshMethod(e.getChild("prepare-for-abort")); commitMethod = BSHMethod.createBshMethod(e.getChild("commit")); abortMethod = BSHMethod.createBshMethod(e.getChild("abort")); trace = "yes".equals (QFactory.getAttributeValue (e, "trace")); } catch (Exception ex) { throw new ConfigurationException(ex.getMessage(), ex); } } BSHTransactionParticipant(); }
BSHTransactionParticipant extends SimpleLogSource implements TransactionParticipant, AbortParticipant, XmlConfigurable { public void setConfiguration(Element e) throws ConfigurationException { try { prepareMethod = BSHMethod.createBshMethod(e.getChild("prepare")); prepareForAbortMethod = BSHMethod.createBshMethod(e.getChild("prepare-for-abort")); commitMethod = BSHMethod.createBshMethod(e.getChild("commit")); abortMethod = BSHMethod.createBshMethod(e.getChild("abort")); trace = "yes".equals (QFactory.getAttributeValue (e, "trace")); } catch (Exception ex) { throw new ConfigurationException(ex.getMessage(), ex); } } BSHTransactionParticipant(); void abort(long id, java.io.Serializable context); void commit(long id, java.io.Serializable context); int prepare(long id, java.io.Serializable context); int prepareForAbort(long id, java.io.Serializable context); void setConfiguration(Element e); }
BSHTransactionParticipant extends SimpleLogSource implements TransactionParticipant, AbortParticipant, XmlConfigurable { public void setConfiguration(Element e) throws ConfigurationException { try { prepareMethod = BSHMethod.createBshMethod(e.getChild("prepare")); prepareForAbortMethod = BSHMethod.createBshMethod(e.getChild("prepare-for-abort")); commitMethod = BSHMethod.createBshMethod(e.getChild("commit")); abortMethod = BSHMethod.createBshMethod(e.getChild("abort")); trace = "yes".equals (QFactory.getAttributeValue (e, "trace")); } catch (Exception ex) { throw new ConfigurationException(ex.getMessage(), ex); } } BSHTransactionParticipant(); void abort(long id, java.io.Serializable context); void commit(long id, java.io.Serializable context); int prepare(long id, java.io.Serializable context); int prepareForAbort(long id, java.io.Serializable context); void setConfiguration(Element e);  }