1 5 8 package com.opensymphony.workflow.spi.ejb; 9 10 11 15 public class CurrentStepPrevHomeFactory { 16 18 public static final String COMP_NAME = "java:comp/env/ejb/CurrentStepPrev"; 19 public static final String JNDI_NAME = "CurrentStepPrev"; 20 21 22 private static com.opensymphony.workflow.spi.ejb.CurrentStepPrevLocalHome cachedLocalHome = null; 23 24 26 28 32 public static com.opensymphony.workflow.spi.ejb.CurrentStepPrevLocalHome getLocalHome() throws javax.naming.NamingException { 33 if (cachedLocalHome == null) { 35 javax.naming.InitialContext initialContext = new javax.naming.InitialContext (); 37 38 try { 39 cachedLocalHome = (com.opensymphony.workflow.spi.ejb.CurrentStepPrevLocalHome) initialContext.lookup(com.opensymphony.workflow.spi.ejb.CurrentStepPrevLocalHome.COMP_NAME); 40 } finally { 41 initialContext.close(); 42 } 43 } 44 45 return cachedLocalHome; 46 } 47 } 48 | Popular Tags |