01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */package org.apache.openejb.test.entity.cmp2;
17:
18: import java.util.Properties;
19: import javax.ejb.EJBMetaData;
20: import javax.ejb.Handle;
21: import javax.ejb.HomeHandle;
22: import javax.naming.Context;
23: import javax.naming.InitialContext;
24:
25: import org.apache.openejb.test.TestManager;
26:
27: /**
28: *
29: */
30: public abstract class Cmp2TestClient extends
31: org.apache.openejb.test.NamedTestCase {
32:
33: protected InitialContext initialContext;
34:
35: protected EJBMetaData ejbMetaData;
36: protected HomeHandle ejbHomeHandle;
37: protected Handle ejbHandle;
38: protected Object ejbPrimaryKey;
39:
40: public Cmp2TestClient(String name) {
41: super ("Entity.CMP." + name);
42: }
43:
44: /**
45: * Sets up the fixture, for example, open a network connection.
46: * This method is called before a test is executed.
47: */
48: protected void setUp() throws Exception {
49:
50: Properties properties = TestManager.getServer()
51: .getContextEnvironment();
52: //properties.put(Context.SECURITY_PRINCIPAL, "ENTITY_TEST_CLIENT");
53: //properties.put(Context.SECURITY_CREDENTIALS, "ENTITY_TEST_CLIENT");
54:
55: initialContext = new InitialContext(properties);
56:
57: }
58:
59: protected void tearDown() throws Exception {
60:
61: }
62:
63: }
|