org.apache.cxf.ws.rm.persistence.jdbc
Class RMTxStore

java.lang.Object
  extended by org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore
All Implemented Interfaces:
RMStore

public class RMTxStore
extends java.lang.Object
implements RMStore


Field Summary
static java.lang.String DEFAULT_DATABASE_NAME
           
 
Constructor Summary
RMTxStore()
           
 
Method Summary
protected  void abort()
           
protected  void beginTransaction()
           
protected  void commit()
           
 void createDestinationSequence(DestinationSequence seq)
          Create a destination sequence in the persistent store, with the sequence attributes as specified in the RMSDestinationSequence object.
 void createSourceSequence(SourceSequence seq)
          Create a source sequence in the persistent store, with the sequence attributes as specified in the RMSourceSequence object.
protected  void createTables()
           
static void deleteDatabaseFiles()
           
static void deleteDatabaseFiles(java.lang.String dbName, boolean now)
           
 java.util.Collection<DestinationSequence> getDestinationSequences(java.lang.String endpointIdentifier)
          Retrieves all sequences managed by the identified RM destination endpoint from persistent store.
 java.util.Collection<RMMessage> getMessages(org.apache.cxf.ws.rm.Identifier sid, boolean outbound)
          Retrieves the outbound/inbound messages stored for the source/destination sequence with the given identifier.
 java.util.Collection<SourceSequence> getSourceSequences(java.lang.String endpointIdentifier)
          Retrieves all sequences managed by the identified RM source endpoint from persistent store.
 void persistIncoming(DestinationSequence seq, RMMessage msg)
          Called by an RM source upon processing an outbound message.
 void persistOutgoing(SourceSequence seq, RMMessage msg)
          Called by an RM source upon processing an outbound message.
 void removeDestinationSequence(org.apache.cxf.ws.rm.Identifier sid)
          Remove the destination sequence with the specified identifier from persistent store.
 void removeMessages(org.apache.cxf.ws.rm.Identifier sid, java.util.Collection<java.math.BigInteger> messageNrs, boolean outbound)
          Removes the messages with the given message numbers and identifiers from the store of outbound/inbound messages.
 void removeSourceSequence(org.apache.cxf.ws.rm.Identifier sid)
          Remove the source sequence with the specified identifier from persistent store.
 void setConnection(java.sql.Connection c)
           
 void setDriverClassName(java.lang.String dcn)
           
 void setPassword(java.lang.String p)
           
 void setUrl(java.lang.String u)
           
 void setUserName(java.lang.String un)
           
protected  void storeMessage(org.apache.cxf.ws.rm.Identifier sid, RMMessage msg, boolean outbound)
           
protected  void updateDestinationSequence(DestinationSequence seq)
           
protected  void updateSourceSequence(SourceSequence seq)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DATABASE_NAME

public static final java.lang.String DEFAULT_DATABASE_NAME
See Also:
Constant Field Values
Constructor Detail

RMTxStore

public RMTxStore()
Method Detail

setDriverClassName

public void setDriverClassName(java.lang.String dcn)

setPassword

public void setPassword(java.lang.String p)

setUrl

public void setUrl(java.lang.String u)

setUserName

public void setUserName(java.lang.String un)

setConnection

public void setConnection(java.sql.Connection c)

createDestinationSequence

public void createDestinationSequence(DestinationSequence seq)
Description copied from interface: RMStore
Create a destination sequence in the persistent store, with the sequence attributes as specified in the RMSDestinationSequence object.

Specified by:
createDestinationSequence in interface RMStore
Parameters:
seq - the sequence

createSourceSequence

public void createSourceSequence(SourceSequence seq)
Description copied from interface: RMStore
Create a source sequence in the persistent store, with the sequence attributes as specified in the RMSourceSequence object.

Specified by:
createSourceSequence in interface RMStore
Parameters:
seq - the sequence

removeDestinationSequence

public void removeDestinationSequence(org.apache.cxf.ws.rm.Identifier sid)
Description copied from interface: RMStore
Remove the destination sequence with the specified identifier from persistent store.

Specified by:
removeDestinationSequence in interface RMStore
Parameters:
sid - the sequence

removeSourceSequence

public void removeSourceSequence(org.apache.cxf.ws.rm.Identifier sid)
Description copied from interface: RMStore
Remove the source sequence with the specified identifier from persistent store.

Specified by:
removeSourceSequence in interface RMStore
Parameters:
sid - the sequence

getDestinationSequences

public java.util.Collection<DestinationSequence> getDestinationSequences(java.lang.String endpointIdentifier)
Description copied from interface: RMStore
Retrieves all sequences managed by the identified RM destination endpoint from persistent store.

Specified by:
getDestinationSequences in interface RMStore
Parameters:
endpointIdentifier - the identifier for the destination
Returns:
the collection of sequences

getSourceSequences

public java.util.Collection<SourceSequence> getSourceSequences(java.lang.String endpointIdentifier)
Description copied from interface: RMStore
Retrieves all sequences managed by the identified RM source endpoint from persistent store.

Specified by:
getSourceSequences in interface RMStore
Parameters:
endpointIdentifier - the identifier for the source
Returns:
the collection of sequences

getMessages

public java.util.Collection<RMMessage> getMessages(org.apache.cxf.ws.rm.Identifier sid,
                                                   boolean outbound)
Description copied from interface: RMStore
Retrieves the outbound/inbound messages stored for the source/destination sequence with the given identifier.

Specified by:
getMessages in interface RMStore
Parameters:
sid - the source sequence identifier
outbound - true if the message is outbound
Returns:
the collection of messages *

persistIncoming

public void persistIncoming(DestinationSequence seq,
                            RMMessage msg)
Description copied from interface: RMStore
Called by an RM source upon processing an outbound message. The RMMessage parameter is null for non application (RM protocol) messages.

Specified by:
persistIncoming in interface RMStore
Parameters:
seq - the destination sequence
msg - the incoming message

persistOutgoing

public void persistOutgoing(SourceSequence seq,
                            RMMessage msg)
Description copied from interface: RMStore
Called by an RM source upon processing an outbound message. The RMMessage parameter is null for non application (RM protocol) messages.

Specified by:
persistOutgoing in interface RMStore
Parameters:
seq - the source sequence
msg - the outgoing message

removeMessages

public void removeMessages(org.apache.cxf.ws.rm.Identifier sid,
                           java.util.Collection<java.math.BigInteger> messageNrs,
                           boolean outbound)
Description copied from interface: RMStore
Removes the messages with the given message numbers and identifiers from the store of outbound/inbound messages.

Specified by:
removeMessages in interface RMStore
Parameters:
sid - the identifier of the source sequence
messageNrs - the collection of message numbers
outbound - true if the message is outbound

beginTransaction

protected void beginTransaction()

commit

protected void commit()
               throws java.sql.SQLException
Throws:
java.sql.SQLException

abort

protected void abort()

storeMessage

protected void storeMessage(org.apache.cxf.ws.rm.Identifier sid,
                            RMMessage msg,
                            boolean outbound)
                     throws java.io.IOException,
                            java.sql.SQLException
Throws:
java.io.IOException
java.sql.SQLException

updateSourceSequence

protected void updateSourceSequence(SourceSequence seq)
                             throws java.sql.SQLException
Throws:
java.sql.SQLException

updateDestinationSequence

protected void updateDestinationSequence(DestinationSequence seq)
                                  throws java.sql.SQLException,
                                         java.io.IOException
Throws:
java.sql.SQLException
java.io.IOException

createTables

protected void createTables()
                     throws java.sql.SQLException
Throws:
java.sql.SQLException

deleteDatabaseFiles

public static void deleteDatabaseFiles()

deleteDatabaseFiles

public static void deleteDatabaseFiles(java.lang.String dbName,
                                       boolean now)


Apache CXF