Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@909 1c488680-804c-0410-94cd-c6b725194a0e
- Loading branch information
Showing
1 changed file
with
15 additions
and
42 deletions.
There are no files selected for viewing
57 changes: 15 additions & 42 deletions
57
webbeans-ri/src/main/java/org/jboss/webbeans/transaction/Transaction.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,27 @@ | ||
package org.jboss.webbeans.transaction; | ||
|
||
import javax.transaction.HeuristicMixedException; | ||
import javax.transaction.HeuristicRollbackException; | ||
import javax.transaction.NotSupportedException; | ||
import javax.transaction.RollbackException; | ||
import javax.transaction.SystemException; | ||
import javax.webbeans.Current; | ||
import javax.webbeans.Produces; | ||
|
||
import org.jboss.webbeans.ManagerImpl; | ||
|
||
/** | ||
* Transaction manager component | ||
* | ||
* @author Pete Muir | ||
* | ||
*/ | ||
public class Transaction | ||
{ | ||
|
||
|
||
public static final String USER_TRANSACTION_JNDI_NAME = "java:comp/UserTransaction"; | ||
|
||
@Current ManagerImpl manager; | ||
|
||
@Produces | ||
public UserTransaction getCurrentTransaction() | ||
{ | ||
return new UTTransaction(new javax.transaction.UserTransaction() | ||
{ | ||
|
||
public void begin() throws NotSupportedException, SystemException | ||
{ | ||
|
||
} | ||
|
||
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException | ||
{ | ||
|
||
} | ||
|
||
public int getStatus() throws SystemException | ||
{ | ||
return javax.transaction.Status.STATUS_UNKNOWN; | ||
} | ||
|
||
public void rollback() throws IllegalStateException, SecurityException, SystemException | ||
{ | ||
|
||
} | ||
|
||
public void setRollbackOnly() throws IllegalStateException, SystemException | ||
{ | ||
|
||
} | ||
|
||
public void setTransactionTimeout(int arg0) throws SystemException | ||
{ | ||
|
||
} | ||
|
||
|
||
|
||
}); | ||
return new UTTransaction(manager.getNaming().lookup(USER_TRANSACTION_JNDI_NAME, javax.transaction.UserTransaction.class)); | ||
} | ||
|
||
} |