KickJava   Java API By Example, From Geeks To Geeks.

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


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  * ManagedConnectionFactoryImplementation.java
25  *
26  * Created on September 25, 2000, 11:30 AM
27  */

28
29 package com.sun.enterprise.tools.verifier.tests.connector.managed;
30
31 import com.sun.enterprise.tools.verifier.Result;
32 import com.sun.enterprise.deployment.ConnectorDescriptor;
33 import com.sun.enterprise.tools.verifier.tests.*;
34 import com.sun.enterprise.tools.verifier.tests.connector.ConnectorCheck;
35
36 /**
37  * verify the declared ManagedConnectionFactory implements the
38  * javax.resource.spi.ManagedConnectionFactory interface
39  *
40  * @author Jerome Dochez
41  * @version
42  */

43 public class ManagedConnectionFactoryImplementation
44     extends ManagedConnectionFactoryTest
45     implements ConnectorCheck {
46
47         
48     
49     /** <p>
50      * all connector tests should implement this method. it run an individual
51      * test against the resource adapter deployment descriptor.
52      * </p>
53      *
54      * @paramm descriptor deployment descriptor for the rar file
55      * @return result object containing the result of the individual test
56      * performed
57      */

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