org.sharengo.wikitty.jms
Class WikittyStorageJMS
java.lang.Object
org.sharengo.wikitty.jms.WikittyStorageJMS
- All Implemented Interfaces:
- WikittyStorage
public class WikittyStorageJMS
- extends Object
- implements WikittyStorage
- Version:
- $Revision: 1 $
Last update: $Date: 2010-04-16 10:29:38 +0200 (ven., 16 avril 2010) $
by : $Author: echatellier $
- Author:
- ruchaud
connectionFactory
protected final javax.jms.XATopicConnectionFactory connectionFactory
topic
protected final javax.jms.Topic topic
topicConnection
protected final javax.jms.XATopicConnection topicConnection
topicSession
protected final javax.jms.XATopicSession topicSession
topicPublisher
protected final javax.jms.TopicPublisher topicPublisher
WikittyStorageJMS
public WikittyStorageJMS(Properties properties)
throws NamingException,
javax.jms.JMSException
- Creates a publisher on a topic named
WikittyStorageTopic.
Methods invoked on this WikittyStorage are forwarded to the jms broker.
- Parameters:
properties - properties passed to InitialContext,
it must contains at least a value for the Context.PROVIDER_URL
- Throws:
NamingException
javax.jms.JMSException
close
public void close()
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize in class Object
- Throws:
Throwable
store
public UpdateResponse store(WikittyTransaction transaction,
Collection<Wikitty> wikitties,
boolean disableAutoVersionIncrement)
- Forwards the specified
wikitties to the jms broker.
The message forwarded is an ObjectMessage.
It is composed of:
- the specified
wikitties
- a string property: action=
store
- a boolean property: disableAutoVersionIncrement=
specified disableAutoVersionIncrement
- Specified by:
store in interface WikittyStorage
- Parameters:
transaction - extensions -
delete
public UpdateResponse delete(WikittyTransaction transaction,
Collection<String> ids)
throws WikittyException
- Forwards the specified
ids to the jms broker.
The message forwarded is a TextMessage.
It is composed of:
- a string property: action=
delete
- an object property: ids=
specified ids
- Specified by:
delete in interface WikittyStorage
- Parameters:
transaction - ids -
- Throws:
WikittyException
clear
public void clear(WikittyTransaction transaction)
- Forwards a
TextMessage to the jms broker.
The message forwarded is a TextMessage.
It is composed of:
- a string property: action=
clear
- Specified by:
clear in interface WikittyStorage
- Parameters:
transaction -
exists
public boolean exists(WikittyTransaction transaction,
String id)
- Specified by:
exists in interface WikittyStorage
isDeleted
public boolean isDeleted(WikittyTransaction transaction,
String id)
- Specified by:
isDeleted in interface WikittyStorage
restore
public Wikitty restore(WikittyTransaction transaction,
String id,
String... fqFieldName)
throws WikittyException
- Specified by:
restore in interface WikittyStorage
- Throws:
WikittyException
scanWikitties
public void scanWikitties(WikittyTransaction transaction,
WikittyStorage.Scanner scanner)
- Specified by:
scanWikitties in interface WikittyStorage
Copyright © 2010 CodeLutin. All Rights Reserved.