1 23 24 package com.sun.ejb.containers; 25 26 import java.util.*; 27 import javax.transaction.*; 28 import com.sun.enterprise.*; 29 30 31 37 public class PMTransactionManagerImpl implements TransactionManager, 38 java.io.Serializable { 39 40 transient private TransactionManager transactionManager = null; 41 42 45 PMTransactionManagerImpl() {} 46 47 54 public int getStatus() throws SystemException 55 { 56 if ( transactionManager == null ) 57 transactionManager = Switch.getSwitch().getTransactionManager(); 58 return transactionManager.getStatus(); 59 } 60 61 65 public Transaction getTransaction() throws SystemException 66 { 67 if ( transactionManager == null ) 68 transactionManager = Switch.getSwitch().getTransactionManager(); 69 Transaction tx = transactionManager.getTransaction(); 70 if ( tx == null ) 71 return null; 72 else 73 return new PMTransactionImpl(tx); 74 } 75 76 77 public void begin() 78 throws IllegalStateException , SystemException { 79 80 throw new IllegalStateException ("Operation not allowed"); 81 } 82 83 public void commit() throws RollbackException, 84 HeuristicMixedException, HeuristicRollbackException, 85 SecurityException , IllegalStateException , SystemException { 86 87 throw new IllegalStateException ("Operation not allowed"); 88 } 89 90 public void rollback() 91 throws IllegalStateException , SecurityException , SystemException { 92 93 throw new IllegalStateException ("Operation not allowed"); 94 } 95 96 public void setRollbackOnly() 97 throws IllegalStateException , SystemException { 98 99 throw new IllegalStateException ("Operation not allowed"); 100 } 101 102 public void resume(Transaction suspended) throws 103 InvalidTransactionException, IllegalStateException , SystemException { 104 105 throw new IllegalStateException ("Operation not allowed"); 106 } 107 108 public Transaction suspend() throws SystemException { 109 throw new IllegalStateException ("Operation not allowed"); 110 } 111 112 public void setTransactionTimeout(int seconds) 113 throws SystemException { 114 115 throw new IllegalStateException ("Operation not allowed"); 116 } 117 118 } 119 120 | Popular Tags |