KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > verifier > tests > connector > managed > ManagedConnectionExistence


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 /*
24  * ManagedConnectionExistence.java
25  *
26  * Created on September 28, 2000, 9:47 AM
27  */

28
29 package com.sun.enterprise.tools.verifier.tests.connector.managed;
30
31 import java.io.File JavaDoc;
32 import com.sun.enterprise.tools.verifier.tests.connector.ConnectorTest;
33 import com.sun.enterprise.tools.verifier.tests.connector.ConnectorCheck;
34 import com.sun.enterprise.tools.verifier.Result;
35 import com.sun.enterprise.tools.verifier.Verifier;
36 import com.sun.enterprise.deployment.ConnectorDescriptor;
37 import com.sun.enterprise.tools.verifier.tests.*;
38
39 /**
40  * Test the implementation of the javax.resource.spi.ManagedConnection
41  * interface in the rar file
42  *
43  * @author Jerome Dochez
44  * @version
45  */

46 public class ManagedConnectionExistence
47     extends ConnectorTest
48     implements ConnectorCheck
49 {
50
51     /** <p>
52      * Test the implementation of the javax.resource.spi.ManagedConnection
53      * interface in the rar file
54      * </p>
55      *
56      * @paramm descriptor deployment descriptor for the rar file
57      * @return result object containing the result of the individual test
58      * performed
59      */

60     public Result check(ConnectorDescriptor descriptor) {
61                 
62         Result result = getInitializedResult();
63         ComponentNameConstructor compName =
64           getVerifierContext().getComponentNameConstructor();
65         // test NA for inboundRA
66
if(!descriptor.getOutBoundDefined())
67         {
68           result.addNaDetails(smh.getLocalString
69               ("tests.componentNameConstructor",
70                "For [ {0} ]",
71                new Object JavaDoc[] {compName.toString()}));
72           result.notApplicable(smh.getLocalString
73               ("com.sun.enterprise.tools.verifier.tests.connector.managed.notApplicableForInboundRA",
74                "Resource Adapter does not provide outbound communication"));
75           return result;
76         }
77     //File jarFile = Verifier.getJarFile(descriptor.getModuleDescriptor().getArchiveUri());
78
// File f=Verifier.getArchiveFile(descriptor.getModuleDescriptor().getArchiveUri());
79
findImplementorOf(descriptor, "javax.resource.spi.ManagedConnection", result);
80         return result;
81     }
82 }
83
Popular Tags