/** * * @param profileTableName * @throws NullPointerException * @throws UnrecognizedProfileTableNameException */ public void removeProfileTable(final String profileTableName) throws NullPointerException, UnrecognizedProfileTableNameException { removeProfileTable(profileTableName, false); }
public void uninstallProfileSpecification(ProfileSpecificationComponent component) throws UnrecognizedProfileSpecificationException { Collection<String> profileTableNames = getDeclaredProfileTableNames(component.getProfileSpecificationID()); for(String profileTableName:profileTableNames) { try { this.removeProfileTable(profileTableName, true); } catch (Throwable e) { throw new SLEEException(e.getMessage(),e); } } // FIXME: For JBoss 7.2.0.Final: // we have a problem with org.hibernate.service.UnknownServiceException: // Unknown service requested [org.hibernate.event.service.spi.EventListenerRegistry] // see https://hibernate.atlassian.net/browse/HHH-8586 //component.getProfileEntityFramework().uninstall(); }
public void removeProfileTable(String profileTableName) throws NullPointerException, UnrecognizedProfileTableNameException, ManagementException { if (logger.isDebugEnabled()) { logger.debug("removeProfileTable( profileTableName = " + profileTableName + " )"); } if (profileTableName == null) throw new NullPointerException("profileTableName is null"); boolean b = this.sleeTransactionManagement.requireTransaction(); boolean rb = false; try { this.sleeProfileManagement.removeProfileTable(profileTableName); } catch (UnrecognizedProfileTableNameException e) { rb = true; throw e; } catch (Throwable e) { rb = true; throw new ManagementException("Failed to remove due to system level failure.", e); } finally { try { sleeTransactionManagement.requireTransactionEnd(b,rb); } catch (Throwable e) { throw new ManagementException(e.getMessage(),e); } } }
/** * * @param oldProfileTableName * @param newProfileTableName * @throws ProfileTableAlreadyExistsException * @throws NullPointerException * @throws UnrecognizedProfileTableNameException */ public void renameProfileTable(String oldProfileTableName, String newProfileTableName) throws ProfileTableAlreadyExistsException, NullPointerException, UnrecognizedProfileTableNameException { // Get the old table ProfileTableImpl oldProfileTable = getProfileTable(oldProfileTableName); // Create the new one addProfileTable(newProfileTableName, oldProfileTable.getProfileSpecificationComponent()); // Move contents oldProfileTable.rename(newProfileTableName); // Remove the old one - this wont remove profiles/mbeans, since they are already part of new table, this has to be done // above. removeProfileTable(oldProfileTableName); }