KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > workflow > spi > ejb > HistoryStepPrevHomeFactory


1 /*
2  * Copyright (c) 2002-2003 by OpenSymphony
3  * All rights reserved.
4  */

5 /*
6  * Generated file - Do not edit!
7  */

8 package com.opensymphony.workflow.spi.ejb;
9
10
11 /**
12  * Utility class for HistoryStepPrev.
13  * @author Hani Suleiman (hani@formicary.net) Date: Apr 7, 2003 Time: 8:17:09 PM
14  */

15 public class HistoryStepPrevHomeFactory {
16     //~ Static fields/initializers /////////////////////////////////////////////
17

18     public static final String JavaDoc COMP_NAME = "java:comp/env/ejb/HistoryStepPrev";
19     public static final String JavaDoc JNDI_NAME = "HistoryStepPrev";
20
21     /** Cached local home (EJBLocalHome). Uses lazy loading to obtain its value (loaded by getLocalHome() methods). */
22     private static com.opensymphony.workflow.spi.ejb.HistoryStepPrevLocalHome cachedLocalHome = null;
23
24     //~ Methods ////////////////////////////////////////////////////////////////
25

26     // Home interface lookup methods
27

28     /**
29      * Obtain local home interface from default initial context
30      * @return Local home interface for HistoryStepPrev. Lookup using COMP_NAME
31      */

32     public static com.opensymphony.workflow.spi.ejb.HistoryStepPrevLocalHome getLocalHome() throws javax.naming.NamingException JavaDoc {
33         // Local homes shouldn't be narrowed, as there is no RMI involved.
34
if (cachedLocalHome == null) {
35             // Obtain initial context
36
javax.naming.InitialContext JavaDoc initialContext = new javax.naming.InitialContext JavaDoc();
37
38             try {
39                 cachedLocalHome = (com.opensymphony.workflow.spi.ejb.HistoryStepPrevLocalHome) initialContext.lookup(com.opensymphony.workflow.spi.ejb.HistoryStepPrevLocalHome.COMP_NAME);
40             } finally {
41                 initialContext.close();
42             }
43         }
44
45         return cachedLocalHome;
46     }
47 }
48
Popular Tags