/** * @throws java.lang.Exception */ @After public void tearDown() throws Exception { userTransaction.begin(); // Delete by query. String deleteQuery = "Delete from CouchDBPersonJTAEntity p"; Query query = em.createQuery(deleteQuery); query.executeUpdate(); deleteQuery = "Delete from CouchDBAddressJTAEntity p"; query = em.createQuery(deleteQuery); query.executeUpdate(); userTransaction.commit(); initialContext.unbind("java:comp/UserTransaction"); initialContext.destroySubcontext("java:comp"); super.dropDatabase(); } }
@Override public void destroySubcontext(Name name) throws NamingException { if (this.initialContext == null) { this.defaultInitCtx.destroySubcontext(name); } else { this.initialContext.destroySubcontext(name); } }
@Override public void destroySubcontext(String name) throws NamingException { if (this.initialContext == null) { this.defaultInitCtx.destroySubcontext(name); } else { this.initialContext.destroySubcontext(name); } }
@Override public void destroySubcontext(Name name) throws NamingException { if (this.initialContext == null) { this.defaultInitCtx.destroySubcontext(name); } else { this.initialContext.destroySubcontext(name); } }
@Override public void destroySubcontext(String name) throws NamingException { if (this.initialContext == null) { this.defaultInitCtx.destroySubcontext(name); } else { this.initialContext.destroySubcontext(name); } }
/** * {@inheritDoc} */ public void destroySubcontext(String name) throws NamingException { if (isInitialContextInitializerCall()) { super.destroySubcontext(name); return; } getContext().destroySubcontext(name); }
/** * {@inheritDoc} */ public void destroySubcontext(Name name) throws NamingException { if (isInitialContextInitializerCall()) { super.destroySubcontext(name); return; } getContext().destroySubcontext(name); }