2 Replies Latest reply on Jan 10, 2007 5:29 AM by timfox

    Full JMX functionality

    timfox

      I have fleshed out the ServerPeer, Queue and Topic MBean interfaces so now we have complete equivalent JMX functionality to JBossMQ.

      I also sorted out the mess that was the Queue/Topic mbean interface

      There's basically a whole stack of new stuff in here:

      public interface ServerPeerMBean
      {
       // JMX attributes
      
       int getServerPeerID();
      
       String getJMSVersion();
      
       int getJMSMajorVersion();
      
       int getJMSMinorVersion();
      
       String getJMSProviderName();
      
       String getProviderVersion();
      
       int getProviderMajorVersion();
      
       int getProviderMinorVersion();
      
       String getDefaultQueueJNDIContext();
      
       String getDefaultTopicJNDIContext();
      
       void setSecurityDomain(String securityDomain) throws Exception;
      
       String getSecurityDomain();
      
       void setDefaultSecurityConfig(Element conf) throws Exception;
      
       Element getDefaultSecurityConfig();
      
       ObjectName getPersistenceManager();
      
       void setPersistenceManager(ObjectName on);
      
       ObjectName getPostOffice();
      
       void setPostOffice(ObjectName on);
      
       ObjectName getJmsUserManager();
      
       void setJMSUserManager(ObjectName on);
      
       ObjectName getDefaultDLQ();
      
       void setDefaultDLQ(ObjectName on);
      
       ObjectName getDefaultExpiryQueue();
      
       void setDefaultExpiryQueue(ObjectName on);
      
      
       int getQueuedExecutorPoolSize();
      
       void setQueuedExecutorPoolSize(int poolSize);
      
       long getFailoverStartTimeout();
      
       void setFailoverStartTimeout(long timeout);
      
       long getFailoverCompleteTimeout();
      
       void setFailoverCompleteTimeout(long timeout);
      
       int getDefaultMaxDeliveryAttempts();
      
       void setDefaultMaxDeliveryAttempts(int attempts);
      
       long getQueueStatsSamplePeriod();
      
       void setQueueStatsSamplePeriod(long newPeriod);
      
       long getDefaultRedeliveryDelay();
      
       void setDefaultRedeliveryDelay(long delay);
      
       int getDefaultMessageCounterHistoryDayLimit();
      
       void setDefaultMessageCounterHistoryDayLimit(int limit);
      
       // JMX operations
      
       String createQueue(String name, String jndiName) throws Exception;
      
       String createQueue(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception;
      
       boolean destroyQueue(String name) throws Exception;
      
       String createTopic(String name, String jndiName) throws Exception;
      
       String createTopic(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception;
      
       boolean destroyTopic(String name) throws Exception;
      
       Set getDestinations() throws Exception;
      
       List getMessageCounters() throws Exception;
      
       List getMessageStatistics() throws Exception;
      
       String listMessageCountersAsHTML() throws Exception;
      
       void resetAllMessageCounters();
      
       void resetAllMessageCounterHistories();
      
       List retrievePreparedTransactions();
      
       String showPreparedTransactionsAsHTML();
      }
      
      public interface DestinationMBean
      {
       // JMX attributes
      
       String getName();
      
       String getJNDIName();
      
       void setJNDIName(String jndiName) throws Exception;
      
       ObjectName getServerPeer();
      
       void setServerPeer(ObjectName on);
      
       ObjectName getDLQ();
      
       void setDLQ(ObjectName on) throws Exception;
      
       ObjectName getExpiryQueue();
      
       void setExpiryQueue(ObjectName on) throws Exception;
      
       long getRedeliveryDelay();
      
       void setRedeliveryDelay(long delay);
      
       int getMaxSize();
      
       void setMaxSize(int maxSize) throws Exception;
      
       Element getSecurityConfig();
      
       void setSecurityConfig(Element securityConfig) throws Exception;
      
       int getFullSize();
      
       void setFullSize(int fullSize);
      
       int getPageSize();
      
       void setPageSize(int pageSize);
      
       int getDownCacheSize();
      
       void setDownCacheSize(int downCacheSize);
      
       boolean isClustered();
      
       void setClustered(boolean clustered);
      
       boolean isCreatedProgrammatically();
      
       int getMessageCounterHistoryDayLimit();
      
       void setMessageCounterHistoryDayLimit(int limit) throws Exception;
      
       // JMX operations
      
       void removeAllMessages() throws Exception;
      
      }
      
      ublic interface QueueMBean
      {
       // JMX attributes
      
       int getMessageCount() throws Exception;
      
       int getScheduledMessageCount() throws Exception;
      
       MessageCounter getMessageCounter();
      
       MessageStatistics getMessageStatistics() throws Exception;
      
       int getConsumerCount() throws Exception;
      
       // JMX operations
      
       void resetMessageCounter();
      
       void resetMessageCounterHistory();
      
       List listAllMessages() throws Exception;
      
       List listAllMessages(String selector) throws Exception;
      
       List listDurableMessages() throws Exception;
      
       List listDurableMessages(String selector) throws Exception;
      
       List listNonDurableMessages() throws Exception;
      
       List listNonDurableMessages(String selector) throws Exception;
      
       String getMessageCounterAsHTML();
      
       String getMessageCounterHistoryAsHTML();
      }
      
      public interface TopicMBean
      {
       //JMX attributes
      
       int getAllMessageCount() throws Exception;
      
       int getDurableMessageCount() throws Exception;
      
       int getNonDurableMessageCount() throws Exception;
      
       int getAllSubscriptionsCount() throws Exception;
      
       int getDurableSubscriptionsCount() throws Exception;
      
       int getNonDurableSubscriptionsCount() throws Exception;
      
       // JMX operations
      
       void removeAllMessages() throws Exception;
      
       List listAllSubscriptions() throws Exception;
      
       List listDurableSubscriptions() throws Exception;
      
       List listNonDurableSubscriptions() throws Exception;
      
       String listAllSubscriptionsAsHTML() throws Exception;
      
       String listDurableSubscriptionsAsHTML() throws Exception;
      
       String listNonDurableSubscriptionsAsHTML() throws Exception;
      
       List listAllMessages(String subscriptionId) throws Exception;
      
       List listAllMessages(String subscriptionId, String selector) throws Exception;
      
       List listDurableMessages(String subscriptionId) throws Exception;
      
       List listDurableMessages(String subscriptionId, String selector) throws Exception;
      
       List listNonDurableMessages(String subscriptionId) throws Exception;
      
       List listNonDurableMessages(String subscriptionId, String selector) throws Exception;
      
       List getMessageCounters() throws Exception;
      }
      
      



        • 1. Re: Full JMX functionality
          genman

          What are the types for the List objects? If JBM requires JDK 1.5 it would be good to include them in the interface file.

          • 2. Re: Full JMX functionality
            timfox

            For listing subscriptions it returns a list of SubscriptionInfo objects, which are basically value objects holding subscription related data.

            For listing messages, it currently just returns the actual message objects. I was thinking whether to create value objects for the messages too, but I'm not sure.

            Currently the caller will have to include the JBM jar on the caller side - not sure how putting in the interface file would help - can you elucidate?