ERCNNotificationCoordinator Class Reference

Collaboration diagram for ERCNNotificationCoordinator:

Collaboration graph
[legend]

List of all members.

Public Member Functions

ERCNConfiguration configuration ()
void finalize () throws Throwable
synchronized void initialize (NSNotification notification)
boolean isConnected ()
void publishChange (NSNotification notification)
void setSubscriberDelegate (ERCNSubscriberDelegate delegate)
ERCNSubscriberDelegate subscriberDelegate ()
synchronized void terminate ()

Static Public Member Functions

static ERCNNotificationCoordinator coordinator ()
static EODatabaseContext databaseContextForEntityNamed (String entityName, EOEditingContext editingContext)

Protected Member Functions

String id ()

Package Functions

TopicConnection connection ()
void didConnect (TopicConnection connection)
void didDisconnect (TopicConnection connection)
Topic topic ()

Static Package Functions

 [static initializer]

Static Package Attributes

static final String LOG_HEADER = "ERChangeNotification: "

Private Member Functions

 ERCNNotificationCoordinator ()

Private Attributes

ERCNConfiguration _configuration
ERCNConnectionKeeper _connectionKeeper
boolean _isInitialized = false
boolean _isTerminated = false
ERCNPublisher _publisher
ERCNSubscriber _subscriber

Static Private Attributes

static final
ERCNNotificationCoordinator 
_coordinator = new ERCNNotificationCoordinator()


Detailed Description

ERCNNotificationCoordinator is the primary controller of the change notification for enterprise objects. It manages the single connection to the JMS server, and creates ERCNPublisher and ERCNSubscriber objects and registers them as the observers to handle change notifications.

When the application finishes launching, it checks properties and initializes the framework. It can also perform necessary clean-up operations when the application is about to terminate.

The framework works transparently and you will not have to call any methods on the framework. Just add this framework to application project as an external framework and put necessary properties to your property file.

The current implementation supports concurrent request handling (multi threaded operations.) It only supports the changes in the default EOObjectStoreCoordinator.

Properties:
Put the following properties into WebObjects.properties file under your home directory, or into Properties file and register it under the applications project's Resources group.

 # The host name that the JMS server is running on
 er.changenotification.jms.serverHostName = localhost

 # Entities *not* to synchronize
 er.changenotification.entitiesNotToSynchronize = (TalentPhoto)
 er.changenotification.entitiesNotToSynchronize = ()

 # Change types to track; Can contain inserted, updated and deleted. 
 er.changenotification.changeTypesToTrack = (inserted, updated, deleted)

 # JMS topic name (Destination object) to pass the notifications. 
 # Specify one and register it from the OpenJMS administration tool or 
 # configuration file. 
 er.changenotification.jms.topicName = business logic group 1

 # Whether or not the JMS subscriber is durable; 
 # prevents to miss change notifications by temporaly 
 # network disruptions. 
 # 
 # false - suggested for both development and deployment
 #
 #         Please do *not* set it true, otherwise OpenJMS 0.7.3.1 server 
 #         will fail with some databases (PostgreSQL, FrontBase, etc.)
 # 
 # If it's set to true, you need properly to shut down the applications 
 # (e.g. shut down it from JavaMonitor or calling application's 
 # terminate() method), otherwise JMS provider will try to keep  
 # all changes even after application is shut down. 
 #
 er.changenotification.jms.durableSubscribers = false

 

Constructor & Destructor Documentation

ERCNNotificationCoordinator (  )  [private]


Member Function Documentation

[static initializer] (  )  [static, package]

ERCNConfiguration configuration (  ) 

TopicConnection connection (  )  [package]

static ERCNNotificationCoordinator coordinator (  )  [static]

static EODatabaseContext databaseContextForEntityNamed ( String  entityName,
EOEditingContext  editingContext 
) [static]

void didConnect ( TopicConnection  connection  )  [package]

void didDisconnect ( TopicConnection  connection  )  [package]

void finalize (  )  throws Throwable

String id (  )  [protected]

synchronized void initialize ( NSNotification  notification  ) 

boolean isConnected (  ) 

void publishChange ( NSNotification  notification  ) 

void setSubscriberDelegate ( ERCNSubscriberDelegate  delegate  ) 

ERCNSubscriberDelegate subscriberDelegate (  ) 

synchronized void terminate (  ) 

releases JMS resouces, including closing the connection.

This method is supposed to be called by the applicaiton's terminate method.

Topic topic (  )  [package]


Member Data Documentation

boolean _isInitialized = false [private]

boolean _isTerminated = false [private]

final String LOG_HEADER = "ERChangeNotification: " [static, package]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:46 2012 for Project Wonder by  doxygen 1.5.8