private ProfileTableNotification parseProfileTableNotification(String text) { return new ProfileTableNotification(text.substring("table=".length())); }
public void execute() { // remove notification sources for profile table traceMBeanImpl.deregisterNotificationSource(new ProfileTableNotification(profileTableName)); } };
public void execute() { // remove notification sources for profile table final TraceManagement traceMBeanImpl = sleeContainer.getTraceManagement(); traceMBeanImpl.deregisterNotificationSource(new ProfileTableNotification(profileTableName)); // close uncommitted mbeans closeUncommittedProfileMBeans(); } };
public void registerTracer() { if (!traceRegistred) { // register tracer final TraceManagement traceMBeanImpl = sleeContainer.getTraceManagement(); traceMBeanImpl.registerNotificationSource(new ProfileTableNotification(profileTableName)); TransactionalAction action2 = new TransactionalAction() { public void execute() { // remove notification sources for profile table traceMBeanImpl.deregisterNotificationSource(new ProfileTableNotification(profileTableName)); } }; sleeContainer.getTransactionManager().getTransactionContext().getAfterRollbackActions().add(action2); traceRegistred = true; } }
/** * * @param profileTableName * @param component * @param sleeContainer */ public ProfileTableImpl(final String profileTableName, ProfileSpecificationComponent component, ProfileManagementImpl profileManagement) { ProfileTableImpl.validateProfileTableName(profileTableName); if (profileManagement == null || component == null) { throw new NullPointerException(); } this.component = component; this.profileManagement = profileManagement; this.sleeContainer = profileManagement.getSleeContainer(); this.profileTableName = profileTableName; this.profileTableNotification = new NotificationSourceWrapperImpl( new ProfileTableNotification(this.profileTableName)); this.fireEvents = component.getDescriptor().getEventsEnabled(); this.transactionView = new ProfileTableTransactionView(this); }
public ProfileTableUsageMBeanImpl(String profileTableName, ProfileSpecificationComponent component, SleeContainer sleeContainer) throws NotCompliantMBeanException, MalformedObjectNameException, NullPointerException { super(ProfileTableUsageMBean.class, component, new ProfileTableNotification(profileTableName), sleeContainer); this.profileTableName = profileTableName; setObjectName(new ObjectName(ProfileTableUsageMBean.BASE_OBJECT_NAME + ',' + ProfileTableUsageMBean.PROFILE_TABLE_NAME_KEY + '=' + ObjectName.quote(profileTableName))); try { sleeContainer.getMBeanServer().registerMBean( this, getObjectName()); // create default usage param set createUsageParameterSet(); } catch (Throwable e) { throw new SLEEException(e.getMessage(),e); } }