KickJava   Java API By Example, From Geeks To Geeks.

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


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 CurrentStep.
13  * @author <a HREF="mailto:hani@formicary.net">Hani Suleiman</a>
14  * @author <a HREF="mailto:plightbo@hotmail.com">Pat Lightbody</a>
15  */

16 public class CurrentStepHomeFactory {
17     //~ Static fields/initializers /////////////////////////////////////////////
18

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

27     // Home interface lookup methods
28

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

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