User: chirino Date: 01/11/13 20:24:08 Added: src/main/org/jboss/mq/pm CacheStore.java CacheStoreMBean.java Log: Factored out a CacheStore object from the message store. This should lay the ground work needed so that the MessageCache can use a PM for saving and loading messages. Also fixed a small bug in the file PM. It was not properly restoring the message after a server restart. Revision Changes Path 1.1 jbossmq/src/main/org/jboss/mq/pm/CacheStore.java Index: CacheStore.java =================================================================== /* * JBossMQ, the OpenSource JMS implementation * * Distributable under LGPL license. * See terms of license at gnu.org. */ package org.jboss.mq.pm; import javax.jms.JMSException; import org.jboss.mq.SpyMessage; import org.jboss.mq.server.MessageReference; /** * This class provides the base for user supplied persistence packages. * * @author Hiram Chirino ([EMAIL PROTECTED]) * @author Paul Kendall ([EMAIL PROTECTED]) * @created August 16, 2001 * @version $Revision: 1.1 $ */ public interface CacheStore { /** * reads the message refered to by the MessagReference back as a SpyMessage * * @param message Description of Parameter * @param txId Description of Parameter * @exception javax.jms.JMSException Description of Exception */ SpyMessage loadFromStorage(MessageReference mh) throws JMSException; /** * Stores the given message to secondary storeage. You should be able to * use the MessagReference to load the message back later. * * @param message Description of Parameter * @param txId Description of Parameter * @exception javax.jms.JMSException Description of Exception */ void saveToStorage(MessageReference mh, SpyMessage message) throws JMSException; /** * Removes the message that was stored in secondary storage. * * @param message Description of Parameter * @param txId Description of Parameter * @exception javax.jms.JMSException Description of Exception */ void removeFromStorage(MessageReference mh) throws JMSException; } 1.1 jbossmq/src/main/org/jboss/mq/pm/CacheStoreMBean.java Index: CacheStoreMBean.java =================================================================== /* * JBoss, the OpenSource J2EE webOS * * Distributable under LGPL license. * See terms of license at gnu.org. */ package org.jboss.mq.pm; import javax.management.ObjectName; /** * CacheStoreMBean.java * * * @author <a href="mailto:[EMAIL PROTECTED]">david jencks</a> * @author <a href="mailto:[EMAIL PROTECTED]">Hiram Chirino</a> * @version */ public interface CacheStoreMBean { //methods needed for JBossMQService to set up connections //and to require the MessageCache. Object getInstance(); }// CacheStoreMBean
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development