public class ERCNNotificationCoordinator extends Object
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
Modifier and Type | Method and Description |
---|---|
ERCNConfiguration |
configuration() |
static ERCNNotificationCoordinator |
coordinator() |
static EODatabaseContext |
databaseContextForEntityNamed(String entityName,
EOEditingContext editingContext) |
void |
finalize() |
protected String |
id() |
void |
initialize(NSNotification notification) |
boolean |
isConnected() |
void |
publishChange(NSNotification notification) |
void |
setSubscriberDelegate(ERCNSubscriberDelegate delegate) |
ERCNSubscriberDelegate |
subscriberDelegate() |
void |
terminate()
releases JMS resouces, including closing the connection.
|
public static ERCNNotificationCoordinator coordinator()
protected String id()
public void initialize(NSNotification notification)
public void terminate()
This method is supposed to be called by the application's terminate method.
public void finalize() throws Throwable
public void publishChange(NSNotification notification)
public ERCNConfiguration configuration()
public ERCNSubscriberDelegate subscriberDelegate()
public void setSubscriberDelegate(ERCNSubscriberDelegate delegate)
public boolean isConnected()
public static EODatabaseContext databaseContextForEntityNamed(String entityName, EOEditingContext editingContext)
Copyright © 2002 – 2024 Project Wonder.