01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with 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,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */package org.apache.geronimo.j2ee.deployment.annotation;
19:
20: import javax.persistence.PersistenceUnit;
21: import javax.persistence.PersistenceUnits;
22:
23: @PersistenceUnits({@PersistenceUnit(name="PersistenceUnit1",unitName="unitName1"),@PersistenceUnit(name="PersistenceUnit2",unitName="unitName2"),@PersistenceUnit(unitName="unitName3"),@PersistenceUnit(name="PersistenceUnit4")})
24: public class PersistenceUnitAnnotationTest {
25:
26: @PersistenceUnit(name="PersistenceUnit5",unitName="unitName5")
27: long annotatedField1;
28:
29: @PersistenceUnit
30: String annotatedField2;
31:
32: //------------------------------------------------------------------------------------------
33: // Method name (for setter-based injection) must follow JavaBeans conventions:
34: // -- Must start with "set"
35: // -- Have one parameter
36: // -- Return void
37: //------------------------------------------------------------------------------------------
38: @PersistenceUnit(name="PersistenceUnit7",unitName="unitName7")
39: public void setAnnotatedMethod1(int ii) {
40: }
41:
42: @PersistenceUnit(name="PersistenceUnit8",unitName="unitName8")
43: public void setAnnotatedMethod2(boolean bool) {
44: }
45:
46: }
|