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