Home - this site is powered by TWiki(R)
PROBRAL/InternalArea > HealthWatcherDR (3 vs. 4)
TWiki webs: Main | TWiki | Sandbox   Log In or Register

Changes | Index | Search | Go
 <<O>>  Difference Topic HealthWatcherDR (4 - 2010-08-16 - RodrigoBonifacio)
Line: 1 to 1
 
META TOPICPARENT name="CaseStudies"

Health Watcher DRs

Line: 59 to 59
 

Business DR

Changed:
<
<
public abstract cclass DRBusinessCollaboration {
>
>
public abstract cclass DRTransactionalMethods { public abstract cclass SystemFacade { event abstract transactionalMethod(); } }

public abstract cclass DRBusinessCollaboration extends DRTransactionalMethods {

  public abstract cclass EmployeeManager { public abstract Employee authenticate(String login, String passwd); public abstract Employee search(String login);
Line: 75 to 81
  } ... public abstract cclass SystemFacade {
Changed:
<
<
event transactionalBlock() = this.registerComplaint(Complaint complaint) || this.registerEmployee(Employee employee) || ... ;
>
>
event transactionalMethod() = this.registerComplaint(Complaint complaint) || this.registerEmployee(Employee employee) || ... ;
  public abstract Employee authenticate(String login, String password); public abstract void registerComplaint(Complaint complaint); public abstract void registerEmployee(Employee employee);
Line: 84 to 90
 }
Changed:
<
<
Note that SystemFacade declares an event (transactionalBlock()) that is fired whenever occurs a call to registerComplaint, registerEmployee, and so on. This definition is quite similar to the definition of a pointcut, and I have not found any reason for making the definition of this event abstract. Perhaps, making the system facade reusable for different systems. But I have not designed this interface with this specific goal. As explained earlier, the driver for this interfaces is to promote the independent development of the features.
>
>
Note that SystemFacade declared within DRBusinessCollaboration "implements" the event (transactionalMethod()), which is triggered whenever a call to registerComplaint, registerEmployee, and so on occurs. This definition is quite similar to the definition of a pointcut, and I have not found any reason for delaying the definition of this event to the SystemFacade developers. Perhaps, making the system facade reusable for different systems, even though I have not designed this interface with this specific goal. As explained earlier, the driver for these interfaces is to promote the independent development of the features. Nevertheless, it seems that declaring an event (instead of a pointcut) localizes the definition of the transactional methods events within the SystemFacade.
 

Persistence Mechanism DRs

Line: 142 to 147
  But, at this time, I am not sure if CaesarJ supports Generics (I guess that Carlos told me something about this limitation).
Added:
>
>

Transaction Mechanism DR

According to the previous Health Watcher case studies, a DR for the Transaction Mechanism must state that:

I've tried to specify these constraints using a CaesarJ collaboration that "requires" the DRTransactionalMethods. This specification leads to several compile errors in my environment, but it might be useful to explain my idea. Must of the errors were motivated because I am not sure about how to express the binding between the pointcut definition (expressed as an event declared in the DRTransactionalMethods) and the pieces of advice declared within the TransactionalAspect (see bellow).

public abstract cclass DRTransactionManagement requires DRTransactionalMethods   
{
   protected abstract AbstractTransactionMechanism getTransactionMechanism();
   
   public abstract cclass AbstractTransactionMechanism {
      protected abstract void begin();
      protected abstract void commit();
      protected abstract void rollback();
   }
   
   public cclass TransactionAspect {
      before() : transactionalMethod () {
         getTransactionMechanism().begin();
      }
      
      after() : transactionalMethod () {
         getTransactionMechanism().commit();
      }
      
      after() throwing(Exception e) : transactionalMethod() {
         getTransactionMechanism().rollback();
      }
   }
}

Problems and questions:

  • The method getTransactionMechanism() is not visible to the TransactionalAspect advice
  • Does the declaration begin, commit, and rollback as protected prevent external calls to those methods?
  -- RodrigoBonifacio - 16 Aug 2010

View | History: r6 < r5 < r4 < r3 | More

View | History: r6 < r5 < r4 < r3 | More
This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback

mersin escort bayan adana escort bayan izmit escort ankara escort bursa escort