1 23 24 28 29 package com.sun.jts.jta; 30 31 import javax.naming.*; 32 import javax.naming.spi.*; 33 34 40 public class UserTransactionFactory implements ObjectFactory { 41 42 54 public Object getObjectInstance(Object refObj, Name name, 55 Context nameCtx, java.util.Hashtable env) 56 throws Exception { 57 58 if (refObj == null || !(refObj instanceof Reference)) 59 return null; 60 61 Reference ref = (Reference) refObj; 62 63 if (ref.getClassName(). 64 equals(UserTransactionImpl.class.getName())) { 65 return new UserTransactionImpl(); 67 } 68 69 return null; 70 } 71 } 72 | Popular Tags |