Created
August 5, 2011 16:07
-
-
Save nschlimm/1127871 to your computer and use it in GitHub Desktop.
Decorator example 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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