User: user57 Date: 02/04/03 20:35:07 Modified: src/main/org/jboss/mq/pm/rollinglogged PersistenceManager.java Removed: src/main/org/jboss/mq/pm/rollinglogged PersistenceManagerMBean.java Log: o Using ServerConfigLocator instead of ServerConfigImplMBean o Using XDoclet to generate some *MBean interfaces Revision Changes Path 1.22 +34 -16 jbossmq/src/main/org/jboss/mq/pm/rollinglogged/PersistenceManager.java Index: PersistenceManager.java =================================================================== RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/pm/rollinglogged/PersistenceManager.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- PersistenceManager.java 9 Mar 2002 15:32:34 -0000 1.21 +++ PersistenceManager.java 4 Apr 2002 04:35:07 -0000 1.22 @@ -32,14 +32,17 @@ import org.jboss.system.ServiceMBeanSupport; import org.jboss.mq.server.MessageReference; import org.jboss.mq.server.MessageCache; -import org.jboss.system.server.ServerConfigImplMBean; + +import org.jboss.system.server.ServerConfigLocator; /** - * This class manages all persistence related services. + * This class manages all persistence related services. + * + * @jmx:mbean extends="org.jboss.system.ServiceMBean, org.jboss.mq.pm.PersistenceManagerMBean" * - * @author David Maplesden ([EMAIL PROTECTED]) + * @author David Maplesden ([EMAIL PROTECTED]) * @author <a href="mailto:[EMAIL PROTECTED]">David Jencks</a> - * @version $Revision: 1.21 $ + * @version $Revision: 1.22 $ */ public class PersistenceManager extends ServiceMBeanSupport @@ -103,25 +106,26 @@ return messageCache; } - /** - * Insert the method's description here. Creation date: (6/27/2001 12:53:12 - * AM) + * Sets the DataDirectory attribute of the PersistenceManagerMBean object + * + * @jmx:managed-attribute * - * @param newDataDirectory java.lang.String + * @param newDataDirectory The new DataDirectory value */ - public void setDataDirectory(java.lang.String newDataDirectory) + public void setDataDirectory(String newDataDirectory) { dataDirectory = newDataDirectory; } /** - * Insert the method's description here. Creation date: (6/27/2001 12:53:12 - * AM) + * Gets the DataDirectory attribute of the PersistenceManagerMBean object * - * @return java.lang.String + * @jmx:managed-attribute + * + * @return The DataDirectory value */ - public java.lang.String getDataDirectory() + public String getDataDirectory() { return dataDirectory; } @@ -131,11 +135,26 @@ this.rollOverSize = rollOverSize; } + /** + * Gets maximum number of messages until log rolls over + * + * @jmx:managed-attribute + * + * @return number of messages before log rolls over + */ public int getRollOverSize() { return rollOverSize; } + /** + * Sets the maxmimum number of messages before log rolls over + * + * @jmx:managed-attribute + * + * @param rollOverSize The maxmimum number of messages before + * rollover occurs + */ public Object getInstance() { return this; @@ -233,9 +252,8 @@ { log.debug("Using new rolling logged persistence manager."); - // Get the system home directory (may want to use dataDir) - File systemHomeDir = (File) - server.getAttribute(ServerConfigImplMBean.OBJECT_NAME, "ServerHomeDir"); + // Get the system home directory + File systemHomeDir = ServerConfigLocator.locate().getServerHomeDir(); dataDir = new File(systemHomeDir, dataDirectory); if (log.isDebugEnabled()) {
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development