Search in sources :

Example 11 with DestinationSequence

use of org.apache.cxf.ws.rm.DestinationSequence in project cxf by apache.

the class AbstractClientPersistenceTest method verifyStorePopulation.

void verifyStorePopulation() {
    RMManager manager = bus.getExtension(RMManager.class);
    assertNotNull(manager);
    RMStore store = manager.getStore();
    assertNotNull(store);
    Client client = ClientProxy.getClient(greeter);
    String id = RMUtils.getEndpointIdentifier(client.getEndpoint());
    Collection<DestinationSequence> dss = store.getDestinationSequences(id);
    assertEquals(1, dss.size());
    Collection<SourceSequence> sss = store.getSourceSequences(id);
    assertEquals(1, sss.size());
    Collection<RMMessage> msgs = store.getMessages(sss.iterator().next().getIdentifier(), true);
    assertEquals(2, msgs.size());
    msgs = store.getMessages(sss.iterator().next().getIdentifier(), false);
    assertEquals(0, msgs.size());
}
Also used : DestinationSequence(org.apache.cxf.ws.rm.DestinationSequence) RMManager(org.apache.cxf.ws.rm.RMManager) RMMessage(org.apache.cxf.ws.rm.persistence.RMMessage) RMStore(org.apache.cxf.ws.rm.persistence.RMStore) Client(org.apache.cxf.endpoint.Client) SourceSequence(org.apache.cxf.ws.rm.SourceSequence)

Aggregations

DestinationSequence (org.apache.cxf.ws.rm.DestinationSequence)11 Identifier (org.apache.cxf.ws.rm.v200702.Identifier)7 EndpointReferenceType (org.apache.cxf.ws.addressing.EndpointReferenceType)6 Test (org.junit.Test)5 Connection (java.sql.Connection)4 RMMessage (org.apache.cxf.ws.rm.persistence.RMMessage)4 SequenceAcknowledgement (org.apache.cxf.ws.rm.v200702.SequenceAcknowledgement)4 SQLException (java.sql.SQLException)3 ProtocolVariation (org.apache.cxf.ws.rm.ProtocolVariation)3 InputStream (java.io.InputStream)2 PreparedStatement (java.sql.PreparedStatement)2 ResultSet (java.sql.ResultSet)2 ArrayList (java.util.ArrayList)2 Message (org.apache.cxf.common.i18n.Message)2 Client (org.apache.cxf.endpoint.Client)2 RMManager (org.apache.cxf.ws.rm.RMManager)2 SourceSequence (org.apache.cxf.ws.rm.SourceSequence)2 RMStore (org.apache.cxf.ws.rm.persistence.RMStore)2 Endpoint (javax.xml.ws.Endpoint)1 RMStoreException (org.apache.cxf.ws.rm.persistence.RMStoreException)1