01: /*
02: * Generated file - Do not edit!
03: */
04: package org.jboss.test.cmp2.enums.ejb;
05:
06: /**
07: * Utility class for Child.
08: */
09: public class ChildUtil {
10: private static ChildLocalHome cachedLocalHome = null;
11:
12: // Home interface lookup methods
13:
14: /**
15: * Obtain local home interface from default initial context
16: * @return Local home interface for Child. Lookup using JNDI_NAME
17: */
18: public static ChildLocalHome getLocalHome()
19: throws javax.naming.NamingException {
20: // Local homes shouldn't be narrowed, as there is no RMI involved.
21: if (cachedLocalHome == null) {
22: // Obtain initial context
23: javax.naming.InitialContext initialContext = new javax.naming.InitialContext();
24: try {
25: cachedLocalHome = (ChildLocalHome) initialContext
26: .lookup(ChildLocalHome.JNDI_NAME);
27: } finally {
28: initialContext.close();
29: }
30: }
31: return cachedLocalHome;
32: }
33:
34: }
|