Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 78233 invoked from network); 4 Apr 2007 21:20:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Apr 2007 21:20:32 -0000 Received: (qmail 14915 invoked by uid 500); 4 Apr 2007 21:20:39 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 14869 invoked by uid 500); 4 Apr 2007 21:20:39 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 14853 invoked by uid 99); 4 Apr 2007 21:20:38 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2007 14:20:38 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2007 14:20:27 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id E7F1F1A983E; Wed, 4 Apr 2007 14:20:06 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r525609 [2/3] - in /geronimo/server/trunk/modules: geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/annotation/ geronimo-con... Date: Wed, 04 Apr 2007 21:20:05 -0000 To: scm@geronimo.apache.org From: djencks@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070404212006.E7F1F1A983E@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/AnnotationHelperTest.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/AnnotationHelperTest.java?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/AnnotationHelperTest.java (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/AnnotationHelperTest.java Wed Apr 4 14:20:03 2007 @@ -0,0 +1,265 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.geronimo.j2ee.deployment.annotation; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.net.URL; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import javax.ejb.EJB; +import javax.ejb.EJBs; +import javax.jws.HandlerChain; +import javax.persistence.PersistenceContext; +import javax.persistence.PersistenceContexts; +import javax.persistence.PersistenceUnit; +import javax.persistence.PersistenceUnits; +import javax.xml.ws.WebServiceRef; +import javax.xml.ws.WebServiceRefs; + +import org.apache.geronimo.kernel.config.Configuration; +import org.apache.geronimo.testsupport.XmlBeansTestSupport; +import org.apache.geronimo.xbeans.javaee.WebAppDocument; +import org.apache.geronimo.xbeans.javaee.WebAppType; +import org.apache.xbean.finder.ClassFinder; +import org.apache.xmlbeans.XmlCursor; +import org.apache.xmlbeans.XmlException; +import org.apache.xmlbeans.XmlObject; +import org.apache.xmlbeans.XmlOptions; + +/** + * Testcases for each of the various AnnotationHelper class + */ +public class AnnotationHelperTest extends XmlBeansTestSupport { + + private Class[] classes = {EJBAnnotationTest.class, HandlerChainAnnotationTest.class, + PersistenceContextAnnotationTest.class, PersistenceUnitAnnotationTest.class, + WebServiceRefAnnotationTest.class}; + + private ClassFinder classFinder = new ClassFinder(classes); + private ClassLoader classLoader = this.getClass().getClassLoader(); + private XmlOptions options = new XmlOptions(); + + + public void testEJBAnnotationHelper() throws Exception { + + //------------------------------------------------- + // Ensure annotations are discovered correctly + //------------------------------------------------- + List annotatedClasses = classFinder.findAnnotatedClasses(EJBs.class); + assertNotNull(annotatedClasses); + assertEquals(1, annotatedClasses.size()); + assertTrue(annotatedClasses.contains(EJBAnnotationTest.class)); + + List annotatedMethods = classFinder.findAnnotatedMethods(EJB.class); + assertNotNull(annotatedMethods); + assertEquals(2, annotatedMethods.size()); + assertTrue(annotatedMethods.contains(EJBAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod1", new Class[]{int.class}))); + assertTrue(annotatedMethods.contains(EJBAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod2", new Class[]{String.class}))); + + List annotatedFields = classFinder.findAnnotatedFields(EJB.class); + assertNotNull(annotatedFields); + assertEquals(2, annotatedFields.size()); + assertTrue(annotatedFields.contains(EJBAnnotationTest.class.getDeclaredField("annotatedField1"))); + assertTrue(annotatedFields.contains(EJBAnnotationTest.class.getDeclaredField("annotatedField2"))); + + //------------------------------------------------- + // Ensure annotations are processed correctly + //------------------------------------------------- + URL srcXML = classLoader.getResource("annotation/empty-web-src.xml"); + XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options); + WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type); + WebAppType webApp = webAppDoc.getWebApp(); + AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp); + EJBAnnotationHelper.processAnnotations(annotatedWebApp, classFinder); + URL expectedXML = classLoader.getResource("annotation/ejb-expected.xml"); + XmlObject expected = XmlObject.Factory.parse(expectedXML); + log.debug("[@EJB Source XML] " + '\n' + webApp.toString() + '\n'); + log.debug("[@EJB Expected XML]" + '\n' + expected.toString() + '\n'); + List problems = new ArrayList(); + boolean ok = compareXmlObjects(webApp, expected, problems); + assertTrue("Differences: " + problems, ok); + } + + + public void testHandlerChainAnnotationHelper() throws Exception { + + //------------------------------------------------- + // Ensure annotations are discovered correctly + //------------------------------------------------- + List annotatedClasses = classFinder.findAnnotatedClasses(HandlerChain.class); + assertNotNull(annotatedClasses); + assertEquals(1, annotatedClasses.size()); + assertTrue(annotatedClasses.contains(HandlerChainAnnotationTest.class)); + + List annotatedMethods = classFinder.findAnnotatedMethods(HandlerChain.class); + assertNotNull(annotatedMethods); + assertEquals(2, annotatedMethods.size()); + assertTrue(annotatedMethods.contains(HandlerChainAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod1", new Class[]{String.class}))); + assertTrue(annotatedMethods.contains(HandlerChainAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod2", new Class[]{int.class}))); + + List annotatedFields = classFinder.findAnnotatedFields(HandlerChain.class); + assertNotNull(annotatedFields); + assertEquals(2, annotatedFields.size()); + assertTrue(annotatedFields.contains(HandlerChainAnnotationTest.class.getDeclaredField("annotatedField1"))); + assertTrue(annotatedFields.contains(HandlerChainAnnotationTest.class.getDeclaredField("annotatedField2"))); + + //------------------------------------------------- + // Ensure annotations are processed correctly + //------------------------------------------------- + URL srcXML = classLoader.getResource("annotation/handler-chain-src.xml"); + XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options); + WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type); + WebAppType webApp = webAppDoc.getWebApp(); + AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp); + HandlerChainAnnotationHelper.processAnnotations(annotatedWebApp, classFinder); + URL expectedXML = classLoader.getResource("annotation/handler-chain-expected.xml"); + XmlObject expected = XmlObject.Factory.parse(expectedXML); + log.debug("[@HandlerChain Source XML] " + '\n' + webApp.toString() + '\n'); + log.debug("[@HandlerChain Expected XML]" + '\n' + expected.toString() + '\n'); + List problems = new ArrayList(); + boolean ok = compareXmlObjects(webApp, expected, problems); + assertTrue("Differences: " + problems, ok); + } + + + public void testPersistenceContextAnnotationHelper() throws Exception { + + //------------------------------------------------- + // Ensure annotations are discovered correctly + //------------------------------------------------- + List annotatedClasses = classFinder.findAnnotatedClasses(PersistenceContexts.class); + assertNotNull(annotatedClasses); + assertEquals(1, annotatedClasses.size()); + assertTrue(annotatedClasses.contains(PersistenceContextAnnotationTest.class)); + + List annotatedMethods = classFinder.findAnnotatedMethods(PersistenceContext.class); + assertNotNull(annotatedMethods); + assertEquals(2, annotatedMethods.size()); + assertTrue(annotatedMethods.contains(PersistenceContextAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod1", new Class[]{String.class}))); + assertTrue(annotatedMethods.contains(PersistenceContextAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod2", new Class[]{String.class}))); + + List annotatedFields = classFinder.findAnnotatedFields(PersistenceContext.class); + assertNotNull(annotatedFields); + assertEquals(2, annotatedFields.size()); + assertTrue(annotatedFields.contains(PersistenceContextAnnotationTest.class.getDeclaredField("annotatedField1"))); + assertTrue(annotatedFields.contains(PersistenceContextAnnotationTest.class.getDeclaredField("annotatedField2"))); + + //------------------------------------------------- + // Ensure annotations are processed correctly + //------------------------------------------------- + URL srcXML = classLoader.getResource("annotation/empty-web-src.xml"); + XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options); + WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type); + WebAppType webApp = webAppDoc.getWebApp(); + AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp); + PersistenceContextAnnotationHelper.processAnnotations(annotatedWebApp, classFinder); + URL expectedXML = classLoader.getResource("annotation/persistence-context-expected.xml"); + XmlObject expected = XmlObject.Factory.parse(expectedXML); + log.debug("[@PersistenceContext Source XML] " + '\n' + webApp.toString() + '\n'); + log.debug("[@PersistenceContext Expected XML]" + '\n' + expected.toString() + '\n'); + List problems = new ArrayList(); + boolean ok = compareXmlObjects(webApp, expected, problems); + assertTrue("Differences: " + problems, ok); + } + + + public void testPersistenceUnitAnnotationHelper() throws Exception { + + List annotatedClasses = classFinder.findAnnotatedClasses(PersistenceUnits.class); + assertNotNull(annotatedClasses); + assertEquals(1, annotatedClasses.size()); + assertTrue(annotatedClasses.contains(PersistenceUnitAnnotationTest.class)); + + List annotatedMethods = classFinder.findAnnotatedMethods(PersistenceUnit.class); + assertNotNull(annotatedMethods); + assertEquals(2, annotatedMethods.size()); + assertTrue(annotatedMethods.contains(PersistenceUnitAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod1", new Class[]{int.class}))); + assertTrue(annotatedMethods.contains(PersistenceUnitAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod2", new Class[]{boolean.class}))); + + List annotatedFields = classFinder.findAnnotatedFields(PersistenceUnit.class); + assertNotNull(annotatedFields); + assertEquals(2, annotatedFields.size()); + assertTrue(annotatedFields.contains(PersistenceUnitAnnotationTest.class.getDeclaredField("annotatedField1"))); + assertTrue(annotatedFields.contains(PersistenceUnitAnnotationTest.class.getDeclaredField("annotatedField2"))); + + //------------------------------------------------- + // Ensure annotations are processed correctly + //------------------------------------------------- + URL srcXML = classLoader.getResource("annotation/empty-web-src.xml"); + XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options); + WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type); + WebAppType webApp = webAppDoc.getWebApp(); + AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp); + PersistenceUnitAnnotationHelper.processAnnotations(annotatedWebApp, classFinder); + URL expectedXML = classLoader.getResource("annotation/persistence-unit-expected.xml"); + XmlObject expected = XmlObject.Factory.parse(expectedXML); + log.debug("[@PersistenceUnit Source XML] " + '\n' + webApp.toString() + '\n'); + log.debug("[@PersistenceUnit Expected XML]" + '\n' + expected.toString() + '\n'); + List problems = new ArrayList(); + boolean ok = compareXmlObjects(webApp, expected, problems); + assertTrue("Differences: " + problems, ok); + } + + + public void testWebServiceRefAnnotationHelper() throws Exception { + + //------------------------------------------------- + // Ensure annotations are discovered correctly + //------------------------------------------------- + List annotatedClasses = classFinder.findAnnotatedClasses(WebServiceRefs.class); + assertNotNull(annotatedClasses); + assertEquals(1, annotatedClasses.size()); + assertTrue(annotatedClasses.contains(WebServiceRefAnnotationTest.class)); + + List annotatedMethods = classFinder.findAnnotatedMethods(WebServiceRef.class); + assertNotNull(annotatedMethods); + assertEquals(4, annotatedMethods.size()); + assertTrue(annotatedMethods.contains(WebServiceRefAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod1", new Class[]{boolean.class}))); + assertTrue(annotatedMethods.contains(WebServiceRefAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod2", new Class[]{String.class}))); + assertTrue(annotatedMethods.contains(HandlerChainAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod1", new Class[]{String.class}))); + assertTrue(annotatedMethods.contains(HandlerChainAnnotationTest.class.getDeclaredMethod("setAnnotatedMethod2", new Class[]{int.class}))); + + List annotatedFields = classFinder.findAnnotatedFields(WebServiceRef.class); + assertNotNull(annotatedFields); + assertEquals(4, annotatedFields.size()); + assertTrue(annotatedFields.contains(WebServiceRefAnnotationTest.class.getDeclaredField("annotatedField1"))); + assertTrue(annotatedFields.contains(WebServiceRefAnnotationTest.class.getDeclaredField("annotatedField2"))); + assertTrue(annotatedFields.contains(HandlerChainAnnotationTest.class.getDeclaredField("annotatedField1"))); + assertTrue(annotatedFields.contains(HandlerChainAnnotationTest.class.getDeclaredField("annotatedField2"))); + + //------------------------------------------------- + // Ensure annotations are processed correctly + //------------------------------------------------- + URL srcXML = classLoader.getResource("annotation/empty-web-src.xml"); + XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options); + WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type); + WebAppType webApp = webAppDoc.getWebApp(); + AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp); + WebServiceRefAnnotationHelper.processAnnotations(annotatedWebApp, classFinder); + URL expectedXML = classLoader.getResource("annotation/webservice-ref-expected.xml"); + XmlObject expected = XmlObject.Factory.parse(expectedXML); + log.debug("[@WebServiceRef Source XML] " + '\n' + webApp.toString() + '\n'); + log.debug("[@WebServiceRef Expected XML]" + '\n' + expected.toString() + '\n'); + List problems = new ArrayList(); + boolean ok = compareXmlObjects(webApp, expected, problems); + assertTrue("Differences: " + problems, ok); + } +} Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/AnnotationHelperTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/AnnotationHelperTest.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/AnnotationHelperTest.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/EJBAnnotationTest.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/EJBAnnotationTest.java?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/EJBAnnotationTest.java (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/EJBAnnotationTest.java Wed Apr 4 14:20:03 2007 @@ -0,0 +1,93 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.geronimo.j2ee.deployment.annotation; + +import javax.ejb.EJB; +import javax.ejb.EJBs; + +@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") + }) +public class EJBAnnotationTest { + + @EJB + String annotatedField1; + + @EJB(name = "EJB9", + description = "description9", + beanName = "beanName9", + mappedName = "mappedName9") + String annotatedField2; + + //------------------------------------------------------------------------------------------ + // Method name (for setter-based injection) must follow JavaBeans conventions: + // -- Must start with "set" + // -- Have one parameter + // -- Return void + //------------------------------------------------------------------------------------------ + @EJB(name = "EJB10", + description = "description10", + beanInterface = javax.ejb.EJBLocalHome.class, + mappedName = "mappedName10") + public void setAnnotatedMethod1(int ii) { + } + + @EJB(name = "EJB11", + description = "description11", + beanName = "beanName11", + mappedName = "mappedName11") + public void setAnnotatedMethod2(String string) { + } +} + Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/EJBAnnotationTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/EJBAnnotationTest.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/EJBAnnotationTest.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationTest.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationTest.java?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationTest.java (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationTest.java Wed Apr 4 14:20:03 2007 @@ -0,0 +1,64 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.geronimo.j2ee.deployment.annotation; + +import javax.jws.HandlerChain; +import javax.xml.ws.WebServiceRef; + +@HandlerChain(file = "annotation/handlers1.xml") // Ignored by Geronimo at the class-level +public class HandlerChainAnnotationTest { + + @WebServiceRef(name = "WebServiceRef1", + value = javax.xml.ws.Service.class, + wsdlLocation = "WEB-INF/wsdl/WebServiceRef1.wsdl", + mappedName = "mappedName") + @HandlerChain(file = "annotation/handlers2.xml") + int annotatedField1; + + @WebServiceRef(name = "WebServiceRef2", + value = javax.xml.ws.Service.class, + wsdlLocation = "WEB-INF/wsdl/WebServiceRef2.wsdl", + mappedName = "mappedName") + @HandlerChain(file = "annotation/handlers3.xml") + boolean annotatedField2; + + //------------------------------------------------------------------------------------------ + // Method name (for setter-based injection) must follow JavaBeans conventions: + // -- Must start with "set" + // -- Have one parameter + // -- Return void + //------------------------------------------------------------------------------------------ + @WebServiceRef(name = "WebServiceRef3", + value = javax.xml.ws.Service.class, + wsdlLocation = "WEB-INF/wsdl/WebServiceRef3.wsdl", + mappedName = "mappedName") + @HandlerChain(file = "annotation/handlers4.xml") + public void setAnnotatedMethod1(String string) { + } + + @WebServiceRef(name = "WebServiceRef4", + value = javax.xml.ws.Service.class, + wsdlLocation = "WEB-INF/wsdl/WebServiceRef4.wsdl", + mappedName = "mappedName") + @HandlerChain(file = "annotation/handlers5.xml") + public void setAnnotatedMethod2(int ii) { + } + +} Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationTest.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/HandlerChainAnnotationTest.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/PersistenceContextAnnotationTest.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/PersistenceContextAnnotationTest.java?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/PersistenceContextAnnotationTest.java (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/PersistenceContextAnnotationTest.java Wed Apr 4 14:20:03 2007 @@ -0,0 +1,70 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.geronimo.j2ee.deployment.annotation; + +import javax.persistence.PersistenceContext; +import javax.persistence.PersistenceContexts; +import javax.persistence.PersistenceContextType; +import javax.persistence.PersistenceProperty; + +@PersistenceContexts ({ + @PersistenceContext(name = "PersistenceContext1", + properties={@PersistenceProperty(name="property1", value="value1"), + @PersistenceProperty(name="property2", value="value2")}, + type = PersistenceContextType.TRANSACTION), + @PersistenceContext(name = "PersistenceContext2", + unitName = "unitName2", + properties={@PersistenceProperty(name="property3", value="value3"), + @PersistenceProperty(name="property4", value="value4")}, + type = PersistenceContextType.EXTENDED) + }) +public class PersistenceContextAnnotationTest { + + @PersistenceContext(name = "PersistenceContext3", + properties={@PersistenceProperty(name="property5", value="value5"), + @PersistenceProperty(name="property6", value="value6")}, + type = PersistenceContextType.TRANSACTION) + String annotatedField1; + + @PersistenceContext(name = "PersistenceContext3", + unitName = "unitName4", + type = PersistenceContextType.EXTENDED) + String annotatedField2; + + //------------------------------------------------------------------------------------------ + // Method name (for setter-based injection) must follow JavaBeans conventions: + // -- Must start with "set" + // -- Have one parameter + // -- Return void + //------------------------------------------------------------------------------------------ + @PersistenceContext(name = "PersistenceContext4", + unitName = "unitName5", + properties={@PersistenceProperty(name="property9", value="value9"), + @PersistenceProperty(name="property10", value="value10")}, + type = PersistenceContextType.TRANSACTION) + public void setAnnotatedMethod1(String string) { + } + + @PersistenceContext + public void setAnnotatedMethod2(String string) { + } + +} + Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/PersistenceContextAnnotationTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/PersistenceContextAnnotationTest.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/PersistenceContextAnnotationTest.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/PersistenceUnitAnnotationTest.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/PersistenceUnitAnnotationTest.java?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/PersistenceUnitAnnotationTest.java (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/PersistenceUnitAnnotationTest.java Wed Apr 4 14:20:03 2007 @@ -0,0 +1,58 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.geronimo.j2ee.deployment.annotation; + +import javax.persistence.PersistenceUnit; +import javax.persistence.PersistenceUnits; + +@PersistenceUnits ({ + @PersistenceUnit(name = "PersistenceUnit1", + unitName = "unitName1"), + @PersistenceUnit(name = "PersistenceUnit2", + unitName = "unitName2"), + @PersistenceUnit( unitName = "unitName3"), + @PersistenceUnit(name = "PersistenceUnit4") + }) +public class PersistenceUnitAnnotationTest { + + @PersistenceUnit(name = "PersistenceUnit5", + unitName = "unitName5") + long annotatedField1; + + @PersistenceUnit + String annotatedField2; + + //------------------------------------------------------------------------------------------ + // Method name (for setter-based injection) must follow JavaBeans conventions: + // -- Must start with "set" + // -- Have one parameter + // -- Return void + //------------------------------------------------------------------------------------------ + @PersistenceUnit(name = "PersistenceUnit7", + unitName = "unitName7") + public void setAnnotatedMethod1(int ii) { + } + + @PersistenceUnit(name = "PersistenceUnit8", + unitName = "unitName8") + public void setAnnotatedMethod2(boolean bool) { + } + +} Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/PersistenceUnitAnnotationTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/PersistenceUnitAnnotationTest.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/PersistenceUnitAnnotationTest.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/WebServiceRefAnnotationTest.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/WebServiceRefAnnotationTest.java?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/WebServiceRefAnnotationTest.java (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/WebServiceRefAnnotationTest.java Wed Apr 4 14:20:03 2007 @@ -0,0 +1,67 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.geronimo.j2ee.deployment.annotation; + +import javax.xml.ws.WebServiceRef; +import javax.xml.ws.WebServiceRefs; + +@WebServiceRefs ({ + @WebServiceRef(name = "WebServiceRef10", + type = javax.xml.ws.Service.class, + value = javax.xml.ws.Service.class, + wsdlLocation = "WEB-INF/wsdl/WebServiceRef10.wsdl"), + @WebServiceRef(name = "WebServiceRef11", + type = javax.xml.ws.Service.class, + value = javax.xml.ws.Service.class, + wsdlLocation = "WEB-INF/wsdl/WebServiceRef11.wsdl", + mappedName = "mappedName11") + }) +public class WebServiceRefAnnotationTest { + + @WebServiceRef(name = "WebServiceRef12", + type = javax.xml.ws.Service.class, + value = javax.xml.ws.Service.class, + mappedName = "mappedName12") + String annotatedField1; + + @WebServiceRef + int annotatedField2; + + //------------------------------------------------------------------------------------------ + // Method name (for setter-based injection) must follow JavaBeans conventions: + // -- Must start with "set" + // -- Have one parameter + // -- Return void + //------------------------------------------------------------------------------------------ + @WebServiceRef(name = "WebServiceRef14", + value = java.lang.Object.class, + wsdlLocation = "WEB-INF/wsdl/WebServiceRef14.wsdl", + mappedName = "mappedName14") + public void setAnnotatedMethod1(boolean bool) { + } + + @WebServiceRef(name = "WebServiceRef15", + value = javax.xml.ws.Service.class, + wsdlLocation = "WEB-INF/wsdl/WebServiceRef15.wsdl", + mappedName = "mappedName15") + public void setAnnotatedMethod2(String string) { + } + +} Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/WebServiceRefAnnotationTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/WebServiceRefAnnotationTest.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/WebServiceRefAnnotationTest.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/ejb-expected.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/ejb-expected.xml?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/ejb-expected.xml (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/ejb-expected.xml Wed Apr 4 14:20:03 2007 @@ -0,0 +1,72 @@ + + + + + + Empty web application + Empty web application + + description1 + EJB1 + javax.ejb.EJBHome + beanName1 + mappedName1 + + + description2 + EJB2 + javax.ejb.EJBLocalHome + beanName2 + mappedName2 + + + description4 + EJB4 + javax.ejb.EJBLocalHome + beanName4 + mappedName4 + + + description5 + EJB5 + javax.ejb.EJBHome + beanName5 + mappedName5 + + + description6 + EJB6 + javax.ejb.EJBLocalHome + beanName6 + mappedName6 + + + description10 + EJB10 + javax.ejb.EJBLocalHome + mappedName10 + + org.apache.geronimo.j2ee.deployment.annotation.EJBAnnotationTest + AnnotatedMethod1 + + + + Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/ejb-expected.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/ejb-expected.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/ejb-expected.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/empty-web-src.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/empty-web-src.xml?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/empty-web-src.xml (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/empty-web-src.xml Wed Apr 4 14:20:03 2007 @@ -0,0 +1,27 @@ + + + + + + Empty web application + Empty web application + + Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/empty-web-src.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/empty-web-src.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/empty-web-src.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-expected.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-expected.xml?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-expected.xml (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-expected.xml Wed Apr 4 14:20:03 2007 @@ -0,0 +1,105 @@ + + + + + + HandlerChain web application + HandlerChain web application + + WebServiceRef1 + javax.xml.ws.Service + javax.xml.ws.Service + WEB-INF/wsdl/WebServiceRef1.wsdl + + + + WebService5 + org.apache.handler.WebServiceHandler5 + + + + + + WebServiceRef2 + javax.xml.ws.Service + javax.xml.ws.Service + WEB-INF/wsdl/WebServiceRef1.wsdl + + + + WebService4 + org.apache.handler.WebServiceHandler4 + + + + mappedName2 + + + WebServiceRef5 + boolean + boolean + WEB-INF/wsdl/WebServiceRef5.wsdl + mappedName5 + + org.apache.geronimo.j2ee.deployment.annotation.WebServiceRefAnnotationTest + annotatedMethod1 + + + + WebServiceRef6 + javax.xml.ws.Service + java.lang.String + WEB-INF/wsdl/WebServiceRef6.wsdl + mappedName6 + + org.apache.geronimo.j2ee.deployment.annotation.WebServiceRefAnnotationTest + annotatedMethod2 + + + + WebServiceRef3 + javax.xml.ws.Service + javax.xml.ws.Service + + + + WebService3 + org.apache.handler.WebServiceHandler3 + + + + mappedName3 + + org.apache.geronimo.j2ee.deployment.annotation.WebServiceRefAnnotationTest + annotatedField1 + + + + org.apache.geronimo.j2ee.deployment.annotation.WebServiceRefAnnotationTest/annotatedField2 + int + int + + org.apache.geronimo.j2ee.deployment.annotation.WebServiceRefAnnotationTest + annotatedField2 + + + + Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-expected.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-expected.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-expected.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-src.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-src.xml?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-src.xml (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-src.xml Wed Apr 4 14:20:03 2007 @@ -0,0 +1,81 @@ + + + + + + HandlerChain web application + HandlerChain web application + + WebServiceRef1 + javax.xml.ws.Service + javax.xml.ws.Service + WEB-INF/wsdl/WebServiceRef1.wsdl + + + WebServiceRef2 + javax.xml.ws.Service + javax.xml.ws.Service + WEB-INF/wsdl/WebServiceRef1.wsdl + mappedName2 + + + WebServiceRef5 + boolean + boolean + WEB-INF/wsdl/WebServiceRef5.wsdl + mappedName5 + + org.apache.geronimo.j2ee.deployment.annotation.WebServiceRefAnnotationTest + annotatedMethod1 + + + + WebServiceRef6 + javax.xml.ws.Service + java.lang.String + WEB-INF/wsdl/WebServiceRef6.wsdl + mappedName6 + + org.apache.geronimo.j2ee.deployment.annotation.WebServiceRefAnnotationTest + annotatedMethod2 + + + + WebServiceRef3 + javax.xml.ws.Service + javax.xml.ws.Service + mappedName3 + + org.apache.geronimo.j2ee.deployment.annotation.WebServiceRefAnnotationTest + annotatedField1 + + + + org.apache.geronimo.j2ee.deployment.annotation.WebServiceRefAnnotationTest/annotatedField2 + int + int + + org.apache.geronimo.j2ee.deployment.annotation.WebServiceRefAnnotationTest + annotatedField2 + + + + Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-src.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-src.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-src.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers1.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers1.xml?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers1.xml (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers1.xml Wed Apr 4 14:20:03 2007 @@ -0,0 +1,9 @@ + + + + + WebService1 + org.apache.handler.WebServiceHandler1 + + + Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers1.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers1.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers1.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers2.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers2.xml?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers2.xml (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers2.xml Wed Apr 4 14:20:03 2007 @@ -0,0 +1,9 @@ + + + + + WebService5 + org.apache.handler.WebServiceHandler5 + + + Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers2.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers2.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers2.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers3.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers3.xml?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers3.xml (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers3.xml Wed Apr 4 14:20:03 2007 @@ -0,0 +1,9 @@ + + + + + WebService4 + org.apache.handler.WebServiceHandler4 + + + Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers3.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers3.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers3.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers4.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers4.xml?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers4.xml (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers4.xml Wed Apr 4 14:20:03 2007 @@ -0,0 +1,9 @@ + + + + + WebService3 + org.apache.handler.WebServiceHandler3 + + + Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers4.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers4.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers4.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers5.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers5.xml?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers5.xml (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers5.xml Wed Apr 4 14:20:03 2007 @@ -0,0 +1,9 @@ + + + + + WebService2 + org.apache.handler.WebServiceHandler2 + + + Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers5.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers5.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/handlers5.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/persistence-context-expected.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/persistence-context-expected.xml?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/persistence-context-expected.xml (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/persistence-context-expected.xml Wed Apr 4 14:20:03 2007 @@ -0,0 +1,97 @@ + + + + + + Empty web application + Empty web application + + PersistenceContext1 + Transaction + + property1 + value1 + + + property2 + value2 + + + + PersistenceContext2 + unitName2 + Extended + + property3 + value3 + + + property4 + value4 + + + + PersistenceContext4 + unitName5 + Transaction + + property9 + value9 + + + property10 + value10 + + + org.apache.geronimo.j2ee.deployment.annotation.PersistenceContextAnnotationTest + annotatedMethod1 + + + + org.apache.geronimo.j2ee.deployment.annotation.PersistenceContextAnnotationTest/annotatedMethod2 + Transaction + + org.apache.geronimo.j2ee.deployment.annotation.PersistenceContextAnnotationTest + annotatedMethod2 + + + + PersistenceContext3 + Transaction + + property5 + value5 + + + property6 + value6 + + + org.apache.geronimo.j2ee.deployment.annotation.PersistenceContextAnnotationTest + annotatedField1 + + + org.apache.geronimo.j2ee.deployment.annotation.PersistenceContextAnnotationTest + annotatedField2 + + + + Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/persistence-context-expected.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/persistence-context-expected.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/persistence-context-expected.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/persistence-unit-expected.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/persistence-unit-expected.xml?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/persistence-unit-expected.xml (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/persistence-unit-expected.xml Wed Apr 4 14:20:03 2007 @@ -0,0 +1,73 @@ + + + + + + Empty web application + Empty web application + + PersistenceUnit1 + unitName1 + + + PersistenceUnit2 + unitName2 + + + + unitName3 + + + PersistenceUnit4 + + + PersistenceUnit7 + unitName7 + + org.apache.geronimo.j2ee.deployment.annotation.PersistenceUnitAnnotationTest + annotatedMethod1 + + + + PersistenceUnit8 + unitName8 + + org.apache.geronimo.j2ee.deployment.annotation.PersistenceUnitAnnotationTest + annotatedMethod2 + + + + PersistenceUnit5 + unitName5 + + org.apache.geronimo.j2ee.deployment.annotation.PersistenceUnitAnnotationTest + annotatedField1 + + + + org.apache.geronimo.j2ee.deployment.annotation.PersistenceUnitAnnotationTest/annotatedField2 + + org.apache.geronimo.j2ee.deployment.annotation.PersistenceUnitAnnotationTest + annotatedField2 + + + + Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/persistence-unit-expected.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/persistence-unit-expected.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/persistence-unit-expected.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/webservice-ref-expected.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/webservice-ref-expected.xml?view=auto&rev=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/webservice-ref-expected.xml (added) +++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/webservice-ref-expected.xml Wed Apr 4 14:20:03 2007 @@ -0,0 +1,125 @@ + + + + + + Empty web application + Empty web application + + WebServiceRef10 + javax.xml.ws.Service + javax.xml.ws.Service + WEB-INF/wsdl/WebServiceRef10.wsdl + + + WebServiceRef11 + javax.xml.ws.Service + javax.xml.ws.Service + WEB-INF/wsdl/WebServiceRef11.wsdl + mappedName11 + + + WebServiceRef3 + javax.xml.ws.Service + java.lang.String + WEB-INF/wsdl/WebServiceRef3.wsdl + mappedName + + org.apache.geronimo.j2ee.deployment.annotation.HandlerChainAnnotationTest + annotatedMethod1 + + + + WebServiceRef4 + javax.xml.ws.Service + int + WEB-INF/wsdl/WebServiceRef4.wsdl + mappedName + + org.apache.geronimo.j2ee.deployment.annotation.HandlerChainAnnotationTest + annotatedMethod2 + + + + WebServiceRef14 + boolean + boolean + WEB-INF/wsdl/WebServiceRef14.wsdl + mappedName14 + + org.apache.geronimo.j2ee.deployment.annotation.WebServiceRefAnnotationTest + annotatedMethod1 + + + + WebServiceRef15 + javax.xml.ws.Service + java.lang.String + WEB-INF/wsdl/WebServiceRef15.wsdl + mappedName15 + + org.apache.geronimo.j2ee.deployment.annotation.WebServiceRefAnnotationTest + annotatedMethod2 + + + + WebServiceRef1 + javax.xml.ws.Service + int + WEB-INF/wsdl/WebServiceRef1.wsdl + mappedName + + org.apache.geronimo.j2ee.deployment.annotation.HandlerChainAnnotationTest + annotatedField1 + + + + WebServiceRef2 + javax.xml.ws.Service + boolean + WEB-INF/wsdl/WebServiceRef2.wsdl + mappedName + + org.apache.geronimo.j2ee.deployment.annotation.HandlerChainAnnotationTest + annotatedField2 + + + + WebServiceRef12 + javax.xml.ws.Service + javax.xml.ws.Service + mappedName12 + + org.apache.geronimo.j2ee.deployment.annotation.WebServiceRefAnnotationTest + annotatedField1 + + + + org.apache.geronimo.j2ee.deployment.annotation.WebServiceRefAnnotationTest/annotatedField2 + int + int + + org.apache.geronimo.j2ee.deployment.annotation.WebServiceRefAnnotationTest + annotatedField2 + + + + Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/webservice-ref-expected.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/webservice-ref-expected.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/resources/annotation/webservice-ref-expected.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: geronimo/server/trunk/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/EnvironmentEntryBuilder.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/EnvironmentEntryBuilder.java?view=diff&rev=525609&r1=525608&r2=525609 ============================================================================== --- geronimo/server/trunk/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/EnvironmentEntryBuilder.java (original) +++ geronimo/server/trunk/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/EnvironmentEntryBuilder.java Wed Apr 4 14:20:03 2007 @@ -128,7 +128,7 @@ return QNameSet.EMPTY; } - static class EnvEntryRefProcessor extends ResourceAnnotationHelper.ResourceProcessor { + public static class EnvEntryRefProcessor extends ResourceAnnotationHelper.ResourceProcessor { public static final EnvEntryRefProcessor INSTANCE = new EnvEntryRefProcessor(); @@ -185,8 +185,12 @@ } // env-entry-value - XsdStringType value = envEntry.addNewEnvEntryValue(); - value.setStringValue(annotation.mappedName()); + String mappdedNameAnnotation = annotation.mappedName(); + if (!mappdedNameAnnotation.equals("")) { + XsdStringType value = envEntry.addNewEnvEntryValue(); + value.setStringValue(mappdedNameAnnotation); + envEntry.setMappedName(value); + } //------------------------------------------------------------------------------ // optional elements: