01: /**
02: *
03: * Licensed to the Apache Software Foundation (ASF) under one or more
04: * contributor license agreements. See the NOTICE file distributed with
05: * this work for additional information regarding copyright ownership.
06: * The ASF licenses this file to You under the Apache License, Version 2.0
07: * (the "License"); you may not use this file except in compliance with
08: * the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */package org.apache.openejb.test.entity.cmp;
18:
19: import javax.rmi.PortableRemoteObject;
20: import javax.ejb.EJBHome;
21:
22: /**
23: * [6] Should be run as the sixth test suite of the UnknownCmpTestClients
24: *
25: * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
26: * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
27: */
28: public class UnknownHomeHandleTests extends UnknownCmpTestClient {
29:
30: public UnknownHomeHandleTests() {
31: super ("HomeHandle.");
32: }
33:
34: protected void setUp() throws Exception {
35: super .setUp();
36: Object obj = initialContext
37: .lookup("client/tests/entity/cmp/UnknownCmpHome");
38: ejbHome = (UnknownCmpHome) PortableRemoteObject.narrow(obj,
39: UnknownCmpHome.class);
40: ejbHomeHandle = ejbHome.getHomeHandle();
41: }
42:
43: //=================================
44: // Test home handle methods
45: //
46: public void test01_getEJBHome() {
47: try {
48: EJBHome home = ejbHomeHandle.getEJBHome();
49: assertNotNull("The EJBHome is null", home);
50: } catch (Exception e) {
51: fail("Received Exception " + e.getClass() + " : "
52: + e.getMessage());
53: }
54: }
55: //
56: // Test home handle methods
57: //=================================
58:
59: }
|