
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() |
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
| ERCNNotificationCoordinator | ( | ) | [private] |
| [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] |
ERCNConfiguration _configuration [private] |
ERCNConnectionKeeper _connectionKeeper [private] |
final ERCNNotificationCoordinator _coordinator = new ERCNNotificationCoordinator() [static, private] |
boolean _isInitialized = false [private] |
boolean _isTerminated = false [private] |
ERCNPublisher _publisher [private] |
ERCNSubscriber _subscriber [private] |
final String LOG_HEADER = "ERChangeNotification: " [static, package] |
1.5.8