1 28 29 30 package com.caucho.management.j2ee; 31 32 import com.caucho.transaction.TransactionManagerImpl; 33 34 import javax.management.j2ee.statistics.CountStatistic ; 35 import javax.management.j2ee.statistics.JTAStats ; 36 37 40 public class JTAResource 41 extends J2EEResource 42 implements StatisticsProvider<JTAStats > 43 { 44 private final TransactionManagerImpl _tm; 45 46 public JTAResource(TransactionManagerImpl tm) 47 { 48 _tm = tm; 49 } 50 51 protected boolean isJ2EEApplication() 52 { 53 return false; 54 } 55 56 protected String getName() 57 { 58 return "global"; 59 } 60 61 public JTAStats getStats() 62 { 63 return new JTAStatsImpl(this); 64 } 65 66 class JTAStatsImpl 67 extends StatsSupport 68 implements JTAStats 69 { 70 public JTAStatsImpl(J2EEManagedObject j2eeManagedObject) 71 { 72 super(j2eeManagedObject); 73 } 74 75 public CountStatistic getActiveCount() 76 { 77 return new UnimplementedCountStatistic("ActiveCount"); 78 } 79 80 public CountStatistic getCommittedCount() 81 { 82 return new UnimplementedCountStatistic("CommittedCount"); 83 } 84 85 public CountStatistic getRolledbackCount() 86 { 87 return new UnimplementedCountStatistic("RolledbackCount"); 88 } 89 } 90 } 91 | Popular Tags |