/** * */ private void startAllProfileTableActivities() { if (logger.isDebugEnabled()) { logger.debug("starting all profile table activities"); } for (String profileTableName : this.getDeclaredProfileTableNames()) { try { ProfileTableImpl pt = getProfileTable(profileTableName); ActivityContext ac = pt.getActivityContext(); if (ac == null) { pt.startActivity(); } } catch (Throwable e) { if (logger.isDebugEnabled()){ logger.debug("Not starting activity for profile table named "+profileTableName+". The profile spec component is not deployed."); } } } }
public Collection<ProfileID> getProfiles(String profileTableName) throws NullPointerException, UnrecognizedProfileTableNameException, ManagementException { if (logger.isDebugEnabled()) { logger.debug("getProfiles( profileTableName = " + profileTableName + " )"); } boolean b = sleeTransactionManagement.requireTransaction(); try { return sleeProfileManagement.getProfileTable(profileTableName).getProfiles(); } catch (NullPointerException e) { throw e; } catch (UnrecognizedProfileTableNameException e) { throw e; } catch (Throwable e) { throw new ManagementException(e.getMessage(), e); } finally { try { sleeTransactionManagement.requireTransactionEnd(b,false); } catch (Throwable e) { throw new ManagementException(e.getMessage(),e); } } }
/** * * @param profileTableName * @param component * @return * @throws ProfileTableAlreadyExistsException * @throws SLEEException */ public ProfileTableImpl addProfileTable(final String profileTableName, ProfileSpecificationComponent component) throws ProfileTableAlreadyExistsException, SLEEException { try { getProfileTable(profileTableName); throw new ProfileTableAlreadyExistsException("there is already a profile table named "+profileTableName); } catch (UnrecognizedProfileTableNameException e) { // expected } return addProfileTableLocally(createProfileTableInstance(profileTableName, component),true,true); }
public ProfileSpecificationID getProfileSpecification(String profileTableName) throws NullPointerException, UnrecognizedProfileTableNameException, ManagementException { if (logger.isDebugEnabled()) { logger.debug("getProfileSpecification( profileTableName = " + profileTableName +" )"); } if (profileTableName == null) throw new NullPointerException("Argument[ProfileTableName] must not be null"); boolean b = false; try { b = this.sleeTransactionManagement.requireTransaction(); ProfileTableImpl profileTable = this.sleeProfileManagement.getProfileTable(profileTableName); return profileTable.getProfileSpecificationComponent().getProfileSpecificationID(); } catch (SLEEException e) { throw new ManagementException("Failed to obtain ProfileSpecID name for ProfileTable: " + profileTableName, e); } catch (UnrecognizedProfileTableNameException e) { throw e; } catch (Exception e) { throw new ManagementException("Failed to obtain ProfileSpecID name for ProfileTable: " + profileTableName, e); } finally { // never rollbacks try { sleeTransactionManagement.requireTransactionEnd(b,false); } catch (Throwable e) { throw new ManagementException(e.getMessage(),e); } } }
ProfileTableImpl profileTable = ((ProfileManagementImpl)sleeContainer.getSleeProfileTableManager()).getProfileTable(profileId.getProfileTableName()); return profileTable.profileExists(profileId.getProfileName());
ProfileTableImpl profileTable = sleeProfileManagement.getProfileTable(profileTableName); if (!profileTable.getProfileSpecificationComponent().isSlee11()) { throw new UnsupportedOperationException("JAIN SLEE 1.1 Specs forbiddens the usage of this method on SLEE 1.0 Profile Tables");
ProfileTableImpl profileTable = sleeProfileManagement.getProfileTable(profileTableName); if (profileTable.getProfileSpecificationComponent().isSlee11()) { throw new UnsupportedOperationException("JAIN SLEE 1.1 Specs forbiddens the usage of this method on SLEE 1.1 Profile Tables");
return profileManagement.getProfileTable( profileTableName).getProfiles(); } catch (NullPointerException e) {
private void removeProfileTable(final String profileTableName, boolean isUninstall) throws NullPointerException, UnrecognizedProfileTableNameException { ProfileTableImpl profileTable = getProfileTable(profileTableName); TransactionalAction action = new TransactionalAction() { public void execute() { profileTablesLocalObjects.remove(profileTableName); } }; try { sleeContainer.getTransactionManager().getTransactionContext().getAfterCommitActions().add(action); } catch (IllegalStateException e) { throw new SLEEException(e.getMessage(),e); } profileTable.remove(isUninstall); if(!isUninstall) { profileTableFramework.removeProfileTable(profileTable.getProfileTableName()); } }
/** * * @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); }
ProfileTableImpl profileTable = sleeProfileManagement.getProfileTable(profileTableName); if (!profileTable.getProfileSpecificationComponent().isSlee11()) { throw new UnsupportedOperationException("JAIN SLEE 1.1 Specs forbiddens the usage of this method on SLEE 1.0 Profile Tables");
boolean rb = true; try { ProfileTableImpl profileTable = this.sleeProfileManagement.getProfileTable(profileTableName); if (!profileTable.profileExists(profileName)) { throw new UnrecognizedProfileNameException("There is no such profile: " + profileName + ", in profile table: " + profileTableName);
boolean terminateTx = sleeTransactionManager.requireTransaction(); try { return profileManagement.getProfileTable(profileTableName); } catch (NullPointerException e) { throw e;
ProfileTableUsageMBean usageMBeanImpl = this.sleeProfileManagement.getProfileTable(profileTableName).getProfileTableUsageMBean(); if (usageMBeanImpl == null) { throw new InvalidArgumentException();
ProfileTableImpl profileTable = sleeProfileManagement.getProfileTable(profileTableName); if (!profileTable.getProfileSpecificationComponent().isSlee11()) { throw new UnsupportedOperationException("JAIN SLEE 1.1 Specs forbiddens the usage of this method on SLEE 1.0 Profile Tables");
boolean terminateTx = sleeTransactionManager.requireTransaction(); try { return profileManagement.getProfileTable(profileTableName).getActivity(); } catch (NullPointerException e) { throw e;
ProfileTableImpl profileTable = null; try { profileTable = this.sleeProfileManagement.getProfileTable(profileTableName); if (profileName != null && !profileTable.profileExists(profileName)) { throw new UnrecognizedProfileNameException(profileName);
ProfileTableImpl profileTable = profileManagement.getProfileTable( profileTableName); if (profileTable.getProfileSpecificationComponent().isSlee11()) {
public ActivityContextInterface getActivityContextInterface( ProfileTableActivity profileTableActivity) throws NullPointerException, TransactionRequiredLocalException, UnrecognizedActivityException, FactoryException { if (profileTableActivity == null || profileTableActivity.getProfileTableName() == null) { throw new NullPointerException("null profile table activity"); } serviceContainer.getTransactionManager().mandateTransaction(); ProfileTableImpl profileTableImpl = null; try { // check if this is an assigned profile table // name. profileTableImpl = profileManagementImpl.getProfileTable(profileTableActivity.getProfileTableName()); } catch (UnrecognizedProfileTableNameException e) { throw new UnrecognizedActivityException(profileTableActivity.getProfileTableName(),e); } ActivityContext ac = profileTableImpl.getActivityContext(); if (ac == null) { throw new UnrecognizedActivityException("No resource for: "+profileTableActivity.getProfileTableName(),profileTableActivity); } return ac.getActivityContextInterface(); } }
final ProfileTableImpl profileTable = this.sleeProfileManagement.getProfileTable(profileTableName);