01: /*
02: * Generated file - Do not edit!
03: */
04: package org.jboss.test.cmp2.fkmapping.ejb;
05:
06: /**
07: * Utility class for Parent.
08: */
09: public class ParentUtil {
10: private static ParentLocalHome 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 Parent. Lookup using JNDI_NAME
17: */
18: public static ParentLocalHome 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 = (ParentLocalHome) initialContext
26: .lookup(ParentLocalHome.JNDI_NAME);
27: } finally {
28: initialContext.close();
29: }
30: }
31: return cachedLocalHome;
32: }
33:
34: }
|