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.ejb.EJB;
21: import javax.ejb.EJBs;
22:
23: @EJBs({@EJB(name="EJB1",description="description1",beanInterface=javax.ejb.EJBHome.class,beanName="beanName1",mappedName="mappedName1"),@EJB(name="EJB2",description="description2",beanInterface=javax.ejb.EJBLocalHome.class,beanName="beanName2",mappedName="mappedName2"),@EJB(name="EJB3",description="description3",beanInterface=java.lang.Object.class,beanName="beanName3",mappedName="mappedName3"),@EJB(name="EJB4",description="description4",beanInterface=javax.ejb.EJBLocalHome.class,beanName="beanName4",mappedName="mappedName4"),@EJB(name="EJB5",description="description5",beanInterface=javax.ejb.EJBHome.class,beanName="beanName5",mappedName="mappedName5"),@EJB(name="EJB6",description="description6",beanInterface=javax.ejb.EJBLocalHome.class,beanName="beanName6",mappedName="mappedName6"),@EJB(name="EJB7",description="description7",beanInterface=java.lang.Object.class,beanName="beanName7",mappedName="mappedName7")})
24: public class EJBAnnotationTest {
25:
26: @EJB
27: String annotatedField1;
28:
29: @EJB(name="EJB9",description="description9",beanName="beanName9",mappedName="mappedName9")
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: @EJB(name="EJB10",description="description10",beanInterface=javax.ejb.EJBLocalHome.class,mappedName="mappedName10")
39: public void setAnnotatedMethod1(int ii) {
40: }
41:
42: @EJB(name="EJB11",description="description11",beanName="beanName11",mappedName="mappedName11")
43: public void setAnnotatedMethod2(String string) {
44: }
45: }
|