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