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