Examples of Management


Examples of javax.management.j2ee.Management

    * @throws Exception
    */
   public void testJTAResource() throws Exception
   {
      getLog().debug("+++ testJTAResource");
      Management jsr77MEJB = getManagementEJB();
      String domainName = jsr77MEJB.getDefaultDomain();
      ObjectName queryName = new ObjectName(domainName + ":" +
         J2EEManagedObject.TYPE + "=" + J2EETypeConstants.JTAResource + "," + "*");
      Set names = jsr77MEJB.queryNames(queryName, null);
      if (names.isEmpty())
      {
         fail("Could not find JSR-77 JTAResource '" + J2EETypeConstants.JTAResource + "'");
      }
      Iterator iter = names.iterator();
      while (iter.hasNext())
         getLog().debug("JTAResource: " + iter.next());
      jsr77MEJB.remove();
   }
View Full Code Here

Examples of javax.management.j2ee.Management

    * @throws Exception
    */
   public void testJMSResource() throws Exception
   {
      getLog().debug("+++ testJMSResource");
      Management jsr77MEJB = getManagementEJB();
      String domainName = jsr77MEJB.getDefaultDomain();
      ObjectName queryName = new ObjectName(domainName + ":" +
         J2EEManagedObject.TYPE + "=" + J2EETypeConstants.JMSResource + "," + "*");
      Set names = jsr77MEJB.queryNames(queryName, null);
      if (names.isEmpty())
      {
         fail("Could not find JSR-77 JMSResource '" + J2EETypeConstants.JMSResource + "'");
      }
      Iterator iter = names.iterator();
      while (iter.hasNext())
         getLog().debug("JMSResource: " + iter.next());
      jsr77MEJB.remove();
   }
View Full Code Here

Examples of javax.management.j2ee.Management

    * @throws Exception
    */
   public void testEJBModule() throws Exception
   {
      getLog().debug("+++ testEJBModule");
      Management jsr77MEJB = getManagementEJB();
      String domainName = jsr77MEJB.getDefaultDomain();
      ObjectName mejbModuleName = new ObjectName(domainName + ":" +
         "J2EEServer=Local,J2EEApplication=null,"
         + J2EEManagedObject.TYPE + "=" + J2EETypeConstants.EJBModule
         + ",name=ejb-management.jar");
      boolean isRegistered = jsr77MEJB.isRegistered(mejbModuleName);
      assertTrue(mejbModuleName + " is not registered", isRegistered);
      String[] ejbs = (String[]) jsr77MEJB.getAttribute(mejbModuleName, "ejbs");
      // TODO assertTrue("ejb-management.jar.Ejbs.length == 0", ejbs.length > 0);
      for (int n = 0; n < ejbs.length; n++)
      {
         ObjectName ejb = new ObjectName(ejbs[n]);
         getLog().debug("Ejbs[" + n + "]=" + ejb);
         StatelessSessionBeanStats stats = (StatelessSessionBeanStats)
            jsr77MEJB.getAttribute(ejb, "stats");
         String[] statNames = stats.getStatisticNames();
         for (int s = 0; s < statNames.length; s++)
         {
            Statistic theStat = stats.getStatistic(statNames[s]);
            getLog().debug(theStat);
         }
      }
      jsr77MEJB.remove();
   }
View Full Code Here

Examples of org.fcrepo.server.management.Management

            destinations.add("fedora.apim.update");
            mdMap.put(MessageType.apimUpdate.toString(), destinations);
            Messaging msg = new MessagingImpl(getBaseURL(), mdMap, jmsMgr);
            Object[] invocationHandlers =
                    {new NotificationInvocationHandler(msg)};
            Management mgmt = new MockManagementDelegate();
            Management proxy =
                    (Management) ProxyFactory
                            .getProxy(mgmt, invocationHandlers);
            proxy.purgeObject(new MockContext(), "demo:test", null);
        } catch (Exception e) {
            listener.interrupt();
            throw e;
        }
        // await message receipt & evaluation
View Full Code Here

Examples of org.jboss.ejb3.annotation.Management

   @Override
   protected List<Class<?>> resolveBusinessInterfaces()
   {
      List<Class<?>> interfaces = super.resolveBusinessInterfaces();
      Management man = (Management) resolveAnnotation(Management.class);
      if (man != null)
      {
         Class iface = man.value();
         if (iface != null)
         {
            interfaces.add(iface);
         }
      }
View Full Code Here

Examples of org.jboss.ejb3.annotation.Management

   private void registerManagementInterface()
   {
      try
      {
         Management annotation = (Management)resolveAnnotation(Management.class);

         Class intf = null;
         if (annotation != null)
            intf = annotation.value();

         if (intf ==null)
         {
            Class[] interfaces = this.getBeanClass().getInterfaces();
            int interfaceIndex = 0;
View Full Code Here

Examples of org.jboss.ejb3.annotation.Management

   @Override
   protected List<Class<?>> resolveBusinessInterfaces()
   {
      List<Class<?>> interfaces = super.resolveBusinessInterfaces();
      Management man = (Management) resolveAnnotation(Management.class);
      if (man != null)
      {
         Class<?> iface = man.value();
         if (iface != null)
         {
            interfaces.add(iface);
         }
      }
View Full Code Here

Examples of org.jboss.ejb3.annotation.Management

   private void registerManagementInterface()
   {
      try
      {
         Management annotation = this.getAnnotation(Management.class);

         Class<?> intf = null;
         if (annotation != null)
            intf = annotation.value();

         if (intf == null)
         {
            Class<?>[] interfaces = this.getBeanClass().getInterfaces();
            int interfaceIndex = 0;
View Full Code Here

Examples of org.jboss.ejb3.annotation.Management

   @Override
   protected List<Class<?>> resolveBusinessInterfaces()
   {
      List<Class<?>> interfaces = super.resolveBusinessInterfaces();
      Management man = (Management) resolveAnnotation(Management.class);
      if (man != null)
      {
         Class<?> iface = man.value();
         if (iface != null)
         {
            interfaces.add(iface);
         }
      }
View Full Code Here

Examples of org.jboss.ejb3.annotation.Management

   private void registerManagementInterface()
   {
      try
      {
         Management annotation = this.getAnnotation(Management.class);

         Class<?> intf = null;
         if (annotation != null)
            intf = annotation.value();

         if (intf == null)
         {
            Class<?>[] interfaces = this.getBeanClass().getInterfaces();
            int interfaceIndex = 0;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.