KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > connectors > ActiveResourceAdapter


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 package com.sun.enterprise.connectors;
25
26 import com.sun.enterprise.deployment.ConnectorDescriptor;
27 import com.sun.enterprise.repository.*;
28 import javax.resource.spi.ManagedConnectionFactory JavaDoc;
29
30
31 /**
32  * Interface class for different types (1.0 and 1.5 complient) resource
33  * adapter abstraction classes.
34  * Containes methods for setup(initialization), destroy and creation of MCF.
35  *
36  * @author Srikanth P and Binod PG
37  */

38
39
40 public interface ActiveResourceAdapter {
41
42     /**
43      * It initializes the resource adapter.
44      * @throws ConnectorRuntimeException. This exception is thrown if the
45      * setup/initialization fails.
46      */

47
48     public void setup() throws ConnectorRuntimeException;
49
50     /**
51      * uninitializes the resource adapter.
52      */

53
54     public void destroy();
55
56     /** Returns the Connector descriptor which represents/holds ra.xml
57      * @return ConnectorDescriptor Representation of ra.xml.
58      */

59
60     public ConnectorDescriptor getDescriptor();
61
62     /** Creates managed Connection factory instance.
63      * @param ccp Connector connection pool which contains the pool properties
64      * and ra.xml values pertaining to managed connection factory
65      * class. These values are used in MCF creation.
66      * @param jcl Classloader used to managed connection factory class.
67      * @return ManagedConnectionFactory created managed connection factory
68      * instance
69      */

70
71     public ManagedConnectionFactory JavaDoc createManagedConnectionFactory
72                       (ConnectorConnectionPool cpr, ClassLoader JavaDoc loader);
73
74     /**
75      * Returns the class loader that is used to load the RAR.
76      * @return <code>ClassLoader</code> object.
77      */

78     public ClassLoader JavaDoc getClassLoader();
79     
80     /**
81      * Returns the module Name of the RAR
82      * @return A <code>String</code> representing the name of the
83      * connector module
84      */

85     public String JavaDoc getModuleName();
86 }
87
Popular Tags