com.caucho.jms.jdbc
Class JdbcDestination

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractQueue<E>
          extended by com.caucho.jms.queue.AbstractDestination
              extended by com.caucho.jms.jdbc.JdbcDestination
All Implemented Interfaces:
HandleAware, java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.concurrent.BlockingQueue, java.util.Queue, Destination

public abstract class JdbcDestination
extends AbstractDestination

Represents a JDBC destination.

See Also:
Serialized Form

Field Summary
protected  JdbcManager _jdbcManager
           
 
Constructor Summary
JdbcDestination()
           
 
Method Summary
protected  int createDestination(java.lang.String name, boolean isTopic)
          Creates a queue.
 JdbcManager getJdbcManager()
          Gets the JDBC manager.
 java.lang.String getName()
          Gets the name.
 void init()
          Initializes the JdbcDestination
 boolean isTopic()
          Returns true for a topic.
protected  void purgeExpiredMessages()
          Purges expired messages.
 void setDataSource(javax.sql.DataSource dataSource)
          Sets the data source.
 void setJdbcManager(JdbcManager jdbcManager)
          Sets the jdbc manager
 void setName(java.lang.String name)
          Sets the name.
 void setTablespace(java.lang.String tablespace)
          Sets the tablespace for Oracle.
 
Methods inherited from class com.caucho.jms.queue.AbstractDestination
acknowledge, close, generateMessageID, generateMessageID, getJMSDestination, getQueueName, getTopicName, getUrl, hasMessage, rollback, send, setSerializationHandle, toString
 
Methods inherited from class java.util.AbstractQueue
add, addAll, clear, element, remove
 
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.concurrent.BlockingQueue
add, contains, drainTo, drainTo, offer, offer, poll, put, remainingCapacity, remove, take
 
Methods inherited from interface java.util.Queue
element, peek, poll, remove
 
Methods inherited from interface java.util.Collection
addAll, clear, containsAll, equals, hashCode, isEmpty, iterator, removeAll, retainAll, size, toArray, toArray
 

Field Detail

_jdbcManager

protected JdbcManager _jdbcManager
Constructor Detail

JdbcDestination

public JdbcDestination()
Method Detail

setName

public void setName(java.lang.String name)
Sets the name.

Overrides:
setName in class AbstractDestination

getName

public java.lang.String getName()
Gets the name.

Overrides:
getName in class AbstractDestination

isTopic

public boolean isTopic()
Returns true for a topic.


setJdbcManager

public void setJdbcManager(JdbcManager jdbcManager)
Sets the jdbc manager


getJdbcManager

public JdbcManager getJdbcManager()
Gets the JDBC manager.


setDataSource

public void setDataSource(javax.sql.DataSource dataSource)
Sets the data source.


setTablespace

public void setTablespace(java.lang.String tablespace)
Sets the tablespace for Oracle.


init

@PostConstruct
public void init()
          throws ConfigException,
                 java.sql.SQLException
Initializes the JdbcDestination

Throws:
ConfigException
java.sql.SQLException

createDestination

protected int createDestination(java.lang.String name,
                                boolean isTopic)
                         throws java.sql.SQLException
Creates a queue.

Throws:
java.sql.SQLException

purgeExpiredMessages

protected void purgeExpiredMessages()
Purges expired messages.