Created
February 4, 2012 17:20
-
-
Save wolfc/1739016 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import javax.annotation.Resource; | |
import javax.ejb.SessionContext; | |
import javax.ejb.Stateless; | |
@Stateless | |
public class MyBean { | |
@Resource | |
private SessionContext ctx; | |
public void doSomething() { | |
ctx.getUserTransaction().begin(); | |
ctx.getUserTransaction().commit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment