1 26 27 package org.objectweb.openccm.plugins.transaction.deployment.util; 28 29 30 37 public class ResourcePrepare 38 implements ResourceTreatment 39 { 40 48 protected org.omg.CosTransactions.Vote the_vote_; 49 50 51 59 public 60 ResourcePrepare() 61 { 62 the_vote_ = org.omg.CosTransactions.Vote.VoteCommit; 63 } 64 65 66 72 82 public org.omg.CosTransactions.Vote 83 final_vote() 84 { 85 return the_vote_; 86 } 87 88 89 103 public void 104 apply (org.omg.CosTransactions.Resource resource) 105 throws Exception 106 { 107 try 108 { 109 org.omg.CosTransactions.Vote _vote = resource.prepare(); 110 if (_vote == org.omg.CosTransactions.Vote.VoteRollback) 111 the_vote_ = org.omg.CosTransactions.Vote.VoteRollback ; 112 } catch(Exception ex) { 113 the_vote_ = org.omg.CosTransactions.Vote.VoteRollback ; 114 } 115 } 116 } 117 118 119 120 121 122 123 124 | Popular Tags |