Skip to content

Instantly share code, notes, and snippets.

@nschlimm
Created August 5, 2011 16:07
Show Gist options
  • Save nschlimm/1127871 to your computer and use it in GitHub Desktop.
Save nschlimm/1127871 to your computer and use it in GitHub Desktop.
Decorator example 4
package com.mycompany.springapp.springcdi;
import javax.decorator.Decorator;
import javax.decorator.Delegate;
@Decorator
public class MyServiceTransactionDecorator implements MyService{
@Delegate
private MyService delegate;
public String sayHello() {
// do some transaction stuff
return delegate.sayHello();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment