598599600601602603604605606607608
tm.begin(); TestConnection c = (TestConnection)cm.allocateConnection(mcf, cri); try { c.simulateConnectionError(); fail("No exception thrown"); } catch (Exception expected) { }
637638639640641642643644645646647
599600601602603604605606607608609
638639640641642643644645646647648
150151152153154155156157158159160
InitialContext ctx = new InitialContext(); ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:/JBossTestCF"); TestConnection c = (TestConnection) cf.getConnection(); try { c.simulateConnectionError(); } finally { c.close(); }
187188189190191192193194195196197
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:/JBossTestCFByTx"); TestConnection c1 = (TestConnection) cf.getConnection(); TestConnection c2 = (TestConnection) cf.getConnection(); try { c2.simulateConnectionError(); } finally { try {