1 28 29 package com.caucho.ejb.gen; 30 31 import com.caucho.java.JavaWriter; 32 import com.caucho.java.gen.CallChain; 33 import com.caucho.java.gen.FilterCallChain; 34 import com.caucho.util.L10N; 35 36 import java.io.IOException ; 37 38 41 public class EntityPoolChain extends FilterCallChain { 42 private static final L10N L = new L10N(EntityPoolChain.class); 43 44 private boolean _isHome; 45 private boolean _doLoad; 46 47 public EntityPoolChain(CallChain next, boolean isHome) 48 { 49 super(next); 50 51 _isHome = isHome; 52 _doLoad = ! isHome; 53 } 55 56 64 public void generateCall(JavaWriter out, String retVar, 65 String var, String []args) 66 throws IOException 67 { 68 out.println("Bean ptr = _context._ejb_begin(trans, " + _isHome +", " + _doLoad + ");"); 69 70 super.generateCall(out, retVar, "ptr", args); 71 } 72 } 73 | Popular Tags |