Apache CXF API

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 Object
implements RMStore


Field Summary
static 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(String dbName, boolean now)
           
 DestinationSequence getDestinationSequence(Identifier sid, ProtocolVariation protocol)
          Retrieve the destination sequence with the specified identifier from persistent store.
 Collection<DestinationSequence> getDestinationSequences(String endpointIdentifier, ProtocolVariation protocol)
          Retrieves all sequences managed by the identified RM destination endpoint from persistent store.
 String getDriverClassName()
           
 Collection<RMMessage> getMessages(Identifier sid, boolean outbound)
          Retrieves the outbound/inbound messages stored for the source/destination sequence with the given identifier.
 String getPassword()
           
 SourceSequence getSourceSequence(Identifier sid, ProtocolVariation protocol)
          Retrieve the source sequence with the specified identifier from persistent store.
 Collection<SourceSequence> getSourceSequences(String endpointIdentifier, ProtocolVariation protocol)
          Retrieves all sequences managed by the identified RM source endpoint from persistent store.
 int getTableExistsCode()
           
 String getTableExistsState()
           
 String getUrl()
           
 String getUserName()
           
 void init()
           
protected  boolean isTableExistsError(SQLException ex)
           
 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(Identifier sid)
          Remove the destination sequence with the specified identifier from persistent store.
 void removeMessages(Identifier sid, Collection<Long> messageNrs, boolean outbound)
          Removes the messages with the given message numbers and identifiers from the store of outbound/inbound messages.
 void removeSourceSequence(Identifier sid)
          Remove the source sequence with the specified identifier from persistent store.
 void setConnection(Connection c)
           
 void setDriverClassName(String dcn)
           
 void setPassword(String p)
           
 void setTableExistsCode(int tableExistsCode)
           
 void setTableExistsState(String tableExistsState)
           
 void setUrl(String u)
           
 void setUserName(String un)
           
protected  void storeMessage(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 String DEFAULT_DATABASE_NAME
See Also:
Constant Field Values
Constructor Detail

RMTxStore

public RMTxStore()
Method Detail

setDriverClassName

public void setDriverClassName(String dcn)

getDriverClassName

public String getDriverClassName()

setPassword

public void setPassword(String p)

getPassword

public String getPassword()

setUrl

public void setUrl(String u)

getUrl

public String getUrl()

setUserName

public void setUserName(String un)

getUserName

public String getUserName()

getTableExistsState

public String getTableExistsState()

setTableExistsState

public void setTableExistsState(String tableExistsState)

getTableExistsCode

public int getTableExistsCode()

setTableExistsCode

public void setTableExistsCode(int tableExistsCode)

setConnection

public void setConnection(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

getDestinationSequence

public DestinationSequence getDestinationSequence(Identifier sid,
                                                  ProtocolVariation protocol)
Description copied from interface: RMStore
Retrieve the destination sequence with the specified identifier from persistent store.

Specified by:
getDestinationSequence in interface RMStore
Parameters:
sid - the sequence
Returns:
the sequence if present; otherwise null

getSourceSequence

public SourceSequence getSourceSequence(Identifier sid,
                                        ProtocolVariation protocol)
Description copied from interface: RMStore
Retrieve the source sequence with the specified identifier from persistent store.

Specified by:
getSourceSequence in interface RMStore
Parameters:
sid - the sequence
Returns:
the sequence if present; otherwise null

removeDestinationSequence

public void removeDestinationSequence(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(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 Collection<DestinationSequence> getDestinationSequences(String endpointIdentifier,
                                                               ProtocolVariation protocol)
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 Collection<SourceSequence> getSourceSequences(String endpointIdentifier,
                                                     ProtocolVariation protocol)
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 Collection<RMMessage> getMessages(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(Identifier sid,
                           Collection<Long> 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 SQLException
Throws:
SQLException

abort

protected void abort()

storeMessage

protected void storeMessage(Identifier sid,
                            RMMessage msg,
                            boolean outbound)
                     throws IOException,
                            SQLException
Throws:
IOException
SQLException

updateSourceSequence

protected void updateSourceSequence(SourceSequence seq)
                             throws SQLException
Throws:
SQLException

updateDestinationSequence

protected void updateDestinationSequence(DestinationSequence seq)
                                  throws SQLException,
                                         IOException
Throws:
SQLException
IOException

createTables

protected void createTables()
                     throws SQLException
Throws:
SQLException

init

@PostConstruct
public void init()

deleteDatabaseFiles

public static void deleteDatabaseFiles()

deleteDatabaseFiles

public static void deleteDatabaseFiles(String dbName,
                                       boolean now)

isTableExistsError

protected boolean isTableExistsError(SQLException ex)

Apache CXF API

Apache CXF