ws-fx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jal...@apache.org
Subject cvs commit: ws-fx/sandesha/src/org/apache/sandesha/server ServerStorageManager.java
Date Mon, 09 May 2005 04:51:50 GMT
jaliya      2005/05/08 21:51:50

  Modified:    sandesha/src/org/apache/sandesha/client
                        ClientStorageManager.java
               sandesha/src/org/apache/sandesha/server
                        ServerStorageManager.java
  Log:
  Remove the printlns
  
  Revision  Changes    Path
  1.32      +30 -33    ws-fx/sandesha/src/org/apache/sandesha/client/ClientStorageManager.java
  
  Index: ClientStorageManager.java
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/src/org/apache/sandesha/client/ClientStorageManager.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- ClientStorageManager.java	9 May 2005 03:45:26 -0000	1.31
  +++ ClientStorageManager.java	9 May 2005 04:51:50 -0000	1.32
  @@ -36,7 +36,7 @@
       protected static Log log = LogFactory.getLog(ClientStorageManager.class.getName());
   
       private ISandeshaDAO accessor;
  -	private static Callback callBack = null;
  +    private static Callback callBack = null;
   
       public void init() {
       }
  @@ -135,10 +135,8 @@
   
               // checks whether all the request messages hv been acked
           }
  -        System.out.println("GET NEXT MSG TO SEND: invoking callback");
  -        if(callBack != null && msg!=null)
  -        	informOutgoingMessage(msg);
  -        System.out.println("GET NEXT MSG TO SEND: end callback");
  +        if (callBack != null && msg != null)
  +            informOutgoingMessage(msg);
           return msg;
       }
   
  @@ -207,14 +205,13 @@
   
       public void insertIncomingMessage(RMMessageContext rmMessageContext) {
           RMHeaders rmHeaders = rmMessageContext.getRMHeaders();
  -        RelatesTo relatesTo = (RelatesTo) rmMessageContext.getAddressingHeaders().getRelatesTo().get(
  -                0);
  +        RelatesTo relatesTo = (RelatesTo) rmMessageContext.getAddressingHeaders().getRelatesTo()
  +                .get(0);
           String messageId = relatesTo.getURI().toString();
           String sequenceId = null;
  -        
  -        SandeshaQueue.getInstance().displayOutgoingMap();
  +
           sequenceId = accessor.searchForSequenceId(messageId);
  -        
  +
           SandeshaQueue sq = SandeshaQueue.getInstance();
           boolean exists = accessor.isIncomingSequenceExists(sequenceId);
   
  @@ -380,29 +377,29 @@
           return accessor.getOffer(msgID);
       }
   
  -	public  void setCallback(Callback cb){
  -			callBack = cb;
  -	}
  -
  -	public void removeCallback(){
  -		callBack = null;
  -	}
  -
  -	private void informOutgoingMessage(RMMessageContext rmMsgContext){
  -	
  -		CallbackData cbData = new CallbackData ();
  -		
  -		//  setting callback data;
  -		if(rmMsgContext!=null){
  -			cbData.setSequenceId(rmMsgContext.getSequenceID());
  -			cbData.setMessageId(rmMsgContext.getMessageID());
  -			cbData.setMessageType(rmMsgContext.getMessageType());	 
  -	    	
  -		}
  -		
  -		if(callBack != null)
  -			callBack.onOutgoingMessage(cbData);
  -	}
  +    public void setCallback(Callback cb) {
  +        callBack = cb;
  +    }
  +
  +    public void removeCallback() {
  +        callBack = null;
  +    }
  +
  +    private void informOutgoingMessage(RMMessageContext rmMsgContext) {
  +
  +        CallbackData cbData = new CallbackData();
  +
  +        //  setting callback data;
  +        if (rmMsgContext != null) {
  +            cbData.setSequenceId(rmMsgContext.getSequenceID());
  +            cbData.setMessageId(rmMsgContext.getMessageID());
  +            cbData.setMessageType(rmMsgContext.getMessageType());
  +
  +        }
  +
  +        if (callBack != null)
  +            callBack.onOutgoingMessage(cbData);
  +    }
   
   
   }
  \ No newline at end of file
  
  
  
  1.28      +12 -21    ws-fx/sandesha/src/org/apache/sandesha/server/ServerStorageManager.java
  
  Index: ServerStorageManager.java
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/src/org/apache/sandesha/server/ServerStorageManager.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- ServerStorageManager.java	8 May 2005 19:10:51 -0000	1.27
  +++ ServerStorageManager.java	9 May 2005 04:51:50 -0000	1.28
  @@ -24,7 +24,6 @@
   import org.apache.sandesha.storage.Callback;
   import org.apache.sandesha.storage.dao.ISandeshaDAO;
   import org.apache.sandesha.storage.dao.SandeshaDAOFactory;
  -import org.apache.sandesha.storage.queue.SandeshaQueue;
   import org.apache.sandesha.ws.rm.RMHeaders;
   
   import java.util.HashMap;
  @@ -47,13 +46,12 @@
           //To change body of implemented methods use File | Settings | File Templates.
       }
   
  -    protected static Log log = LogFactory.getLog(ServerStorageManager.class
  -            .getName());
  +    protected static Log log = LogFactory.getLog(ServerStorageManager.class.getName());
       private String tempSeqId = null; // used by getNextMessageToProcess();
       ISandeshaDAO accessor;
   
  -	private static Callback callBack = null;
  -	
  +    private static Callback callBack = null;
  +
       public ServerStorageManager() {
           accessor = SandeshaDAOFactory.getStorageAccessor(Constants.SERVER_QUEUE_ACCESSOR);
       }
  @@ -73,8 +71,7 @@
           if (tempSeqId == null)
               return null;
   
  -        RMMessageContext nextMsg = accessor
  -                .getNextMsgContextToProcess(tempSeqId);
  +        RMMessageContext nextMsg = accessor.getNextMsgContextToProcess(tempSeqId);
   
           if (nextMsg == null) {
               tempSeqId = accessor.getRandomSeqIdToProcess();
  @@ -214,9 +211,6 @@
           String tempOutSeq = oldOutsequenceId1;
           if (tempOutSeq == null)
               tempOutSeq = createSeqId;
  -
  -
  -        SandeshaQueue.getInstance().displayOutgoingMap();
           String sequenceID = accessor.getSequenceOfOutSequence(tempOutSeq);
   
           if (sequenceID == null) {
  @@ -251,22 +245,19 @@
   
       public void insertIncomingMessage(RMMessageContext rmMessageContext) {
           RMHeaders rmHeaders = rmMessageContext.getRMHeaders();
  -        String sequenceId = rmHeaders.getSequence().getIdentifier()
  -                .getIdentifier();
  +        String sequenceId = rmHeaders.getSequence().getIdentifier().getIdentifier();
           boolean exists = accessor.isIncomingSequenceExists(sequenceId);
           if (!exists)
               addSequence(sequenceId); //Creating new sequence
   
           //TODO: add getRmHeaders method to MessageContext
  -        long messageNumber = rmHeaders.getSequence().getMessageNumber()
  -                .getMessageNumber();
  +        long messageNumber = rmHeaders.getSequence().getMessageNumber().getMessageNumber();
   
           if (messageNumber <= 0)
               return; //TODO: throw some exception
   
           Long msgNo = new Long(messageNumber);
  -        accessor.addMessageToIncomingSequence(sequenceId, msgNo,
  -                rmMessageContext);
  +        accessor.addMessageToIncomingSequence(sequenceId, msgNo, rmMessageContext);
   
       }
   
  @@ -416,12 +407,12 @@
           return accessor.getAcksTo(seqId);
       }
   
  -    public void setCallback(Callback cb){
  -	callBack = cb;
  +    public void setCallback(Callback cb) {
  +        callBack = cb;
       }
  -	
  -    public void removeCallback(){
  -	 callBack = null;
  +
  +    public void removeCallback() {
  +        callBack = null;
       }
   
       public void addOffer(String msgID, String offerID) {
  
  
  

Mime
View raw message