Package javax.management

Examples of javax.management.AttributeChangeNotificationFilter


/*     */   public static final String ENABLE_ATTRNAME_ATTRIBUTE = "attribute-name";
/*     */
/*     */   public NotificationFilter createNotificationFilter(Element filterConfig)
/*     */     throws Exception
/*     */   {
/*  73 */     AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter();
/*     */
/*  77 */     NodeList filterChildren = filterConfig.getChildNodes();
/*     */
/*  79 */     for (int i = 0; i < filterChildren.getLength(); i++)
/*     */     {
/*  81 */       Node filterChildNode = filterChildren.item(i);
/*     */
/*  84 */       if (!filterChildNode.getNodeName().equals("enable")) {
/*     */         continue;
/*     */       }
/*  87 */       if (((Element)filterChildNode).hasAttribute("attribute-name"))
/*     */       {
/*  89 */         String attributeName = ((Element)filterChildNode).getAttribute("attribute-name");
/*     */
/*  91 */         filter.enableAttribute(attributeName);
/*     */       }
/*     */       else
/*     */       {
/*  95 */         throw new Exception("'enable' element must have a 'attribute-name' attribute");
/*     */       }
View Full Code Here


      ejbModuleName = ejbModule.getServiceName().toString();

      // we register our inner-class to retrieve STATE notifications from our container
      //
      AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter ();
      filter.enableAttribute ("State");

      this.container.getServer ().
         addNotificationListener (this.container.getEjbModule ().getServiceName (),
                                  new CleanShutdownInterceptor.StateChangeListener (),
                                  filter,
View Full Code Here

   public void createService() throws Exception
   {
      super.createService();
     
      // we register our inner-class to retrieve STATE notifications from our container
      AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter();
      filter.enableAttribute("State");
      listener = new StateChangeListener();
      getServer().addNotificationListener(getTargetName(), listener, filter, null);
   }
View Full Code Here

   {
      super.create ();
     
      // we register our inner-class to retrieve STATE notifications from our container
      //
      AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter ();
      filter.enableAttribute ("State");
     
      // ************************************************************************
      // NOTE: We could also subscribe for the container service events instead of the
      // ejbModule service events. This problem comes from beans using other beans
      // in the same ejbModule: we may receive an IllegalStateException thrown
View Full Code Here

TOP

Related Classes of javax.management.AttributeChangeNotificationFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.