SQL On-Update Trigger notifying
Java;
Service Activator
Pattern?
Hi all,
imagine the following scenario:
- using a RDBMS / SQL in a very optimistic way due to performance:
- locally storing quasi-constant values retrieved by one initial database query and after that considering them to be constant until an ON-UPDATE trigger is raised in the database
- on such a very seldom on-update (on-delete...) trigger notifying all objects in the Java app server (unfortunately using those quasi-constants at the moment) somehow (exception, rollback, ...) that they must refetch the quasi-constants and repeat or rollback their last task.
My questions are:
1) Did anybody solve that?
2) In a standard manner?
3) How?
4) Would you call this an implementation of the Service Activator pattern? D. Alur et al.: "Core
J2EE Patters", page 410, sais about the Service Activator pattern:
"Forces: ...
- An application needs to provide daemon-like service so that an enterprise bean can be in a quiet mode until an event (or a message) triggers its activity. ...
Solution: ...
The Service Activator may optionally send an acknowledgement to the client after successfully completing the request processing. The Service Activator may also notify the client or other services on failure events if it fails to complete the asynchroneous request processing. ..."
In my scenario there is no real request processing but a daemon-like service.
5) How did your sql-trigger/storedProcedure/... call back the Java method (implementing "Invoke Business Processing" provided in Fig. 6.2 on page 141)?
What do you think?
Thomas.
[ February 04, 2003: Message edited by: Thomas Taeger ]