Package org.objectweb.celtix.bus.ws.rm

Examples of org.objectweb.celtix.bus.ws.rm.DestinationSequence


                InputStream is = res.getBinaryStream(4);
                SequenceAcknowledgement ack = null;
                if (null != is) {
                    ack = RMUtils.getPersistenceUtils().getSequenceAcknowledgment(is);
                }
                DestinationSequence seq = new DestinationSequence(sid, acksTo,
                                                                  lm == null ? null : lm.toBigInteger(), ack);
                seqs.add(seq);                                                
            }
        } catch (SQLException ex) {
            LOG.log(Level.WARNING, new Message("SELECT_DEST_SEQ_FAILED_MSG", LOG).toString(), ex);
View Full Code Here


        }
    }
   
    private Identifier setupDestinationSequence(String s) throws IOException, SQLException {
        IMocksControl control = EasyMock.createNiceControl();
        DestinationSequence seq = control.createMock(DestinationSequence.class);
       
        Identifier sid = RMUtils.getWSRMFactory().createIdentifier();
        sid.setValue(s);
        EndpointReferenceType epr = RMUtils.createReference(Names.WSA_ANONYMOUS_ADDRESS);
       
           
        SequenceAcknowledgement ack = RMUtils.getWSRMFactory().createSequenceAcknowledgement();
        AcknowledgementRange range =
            RMUtils.getWSRMFactory().createSequenceAcknowledgementAcknowledgementRange();
        range.setLower(BigInteger.ONE);
        range.setUpper(BigInteger.ONE);
        ack.getAcknowledgementRange().add(range);
        BigInteger lmn = null;
       
        if ("sequence2".equals(s)) {
            range =
                RMUtils.getWSRMFactory().createSequenceAcknowledgementAcknowledgementRange();
            range.setLower(new BigInteger("3"));
            range.setUpper(BigInteger.TEN);
            ack.getAcknowledgementRange().add(range);
            lmn = BigInteger.TEN;
        }
       
        EasyMock.expect(seq.getIdentifier()).andReturn(sid);
        EasyMock.expect(seq.getAcksTo()).andReturn(epr);
        EasyMock.expect(seq.getEndpointIdentifier()).andReturn(SERVER_ENDPOINT_ID);
        EasyMock.expect(seq.getLastMessageNr()).andReturn(lmn);
        InputStream is = RMUtils.getPersistenceUtils().getAcknowledgementAsInputStream(ack);
        EasyMock.expect(seq.getAcknowledgmentAsStream()).andReturn(is);
        EasyMock.expect(seq.getIdentifier()).andReturn(sid);
       
        control.replay();
        store.createDestinationSequence(seq);          
        store.beginTransaction();
        store.updateDestinationSequence(seq);
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.bus.ws.rm.DestinationSequence

Copyright © 2018 www.massapicom. 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.