1 5 8 package com.opensymphony.workflow.spi.ejb; 9 10 11 16 public class HistoryStepHomeFactory { 17 19 public static final String COMP_NAME = "java:comp/env/ejb/HistoryStep"; 20 public static final String JNDI_NAME = "HistoryStep"; 21 22 23 private static com.opensymphony.workflow.spi.ejb.HistoryStepLocalHome cachedLocalHome = null; 24 25 27 29 33 public static com.opensymphony.workflow.spi.ejb.HistoryStepLocalHome getLocalHome() throws javax.naming.NamingException { 34 if (cachedLocalHome == null) { 36 javax.naming.InitialContext initialContext = new javax.naming.InitialContext (); 38 39 try { 40 cachedLocalHome = (com.opensymphony.workflow.spi.ejb.HistoryStepLocalHome) initialContext.lookup(com.opensymphony.workflow.spi.ejb.HistoryStepLocalHome.COMP_NAME); 41 } finally { 42 initialContext.close(); 43 } 44 } 45 46 return cachedLocalHome; 47 } 48 } 49 | Popular Tags |