1 28 29 package com.caucho.ejb.burlap; 30 31 import com.caucho.burlap.io.BurlapInput; 32 import com.caucho.burlap.io.BurlapOutput; 33 import com.caucho.ejb.protocol.Skeleton; 34 import com.caucho.log.Log; 35 36 import javax.jms.JMSException ; 37 import java.io.InputStream ; 38 import java.io.OutputStream ; 39 import java.util.logging.Level ; 40 import java.util.logging.Logger ; 41 42 50 public class ExceptionSkeleton extends Skeleton { 51 protected static Logger log = Log.open(ExceptionSkeleton.class); 52 53 ExceptionSkeleton() 54 throws JMSException 55 { 56 } 57 58 64 public void _service(InputStream rawIs, OutputStream rawOs) 65 throws Exception 66 { 67 throw new UnsupportedOperationException (); 68 } 69 70 76 public void _service(InputStream rawIs, OutputStream rawOs, 77 Throwable e) 78 throws Exception 79 { 80 BurlapInput in = new BurlapInput(rawIs); 81 BurlapOutput out = new BurlapWriter(rawOs); 82 83 try { 84 in.startCall(); 85 86 String method = in.getMethod(); 87 88 in.completeCall(); 89 90 out.startReply(); 91 out.writeFault("SystemFault", String.valueOf(e), e); 92 out.completeReply(); 93 } catch (Exception e1) { 94 log.log(Level.WARNING, e1.toString(), e1); 95 96 out.startReply(); 97 out.writeFault("SystemFault", String.valueOf(e1), e1); 98 out.completeReply(); 99 } 100 } 101 } 102 103 104 | Popular Tags |