KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > gjc > spi > ResourceAdapter


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.gjc.spi;
25
26 import javax.resource.spi.endpoint.MessageEndpointFactory JavaDoc;
27 import javax.resource.spi.ActivationSpec JavaDoc;
28 import javax.resource.NotSupportedException JavaDoc;
29 import javax.transaction.xa.XAResource JavaDoc;
30 import javax.resource.spi.BootstrapContext JavaDoc;
31
32 /**
33  * <code>ResourceAdapter</code> implementation for Generic JDBC Connector.
34  *
35  * @version 1.0, 02/08/05
36  * @author Evani Sai Surya Kiran
37  */

38 public class ResourceAdapter implements javax.resource.spi.ResourceAdapter JavaDoc {
39
40     /**
41      * Empty method implementation for endpointActivation
42      * which just throws <code>NotSupportedException</code>
43      *
44      * @param mef <code>MessageEndpointFactory</code>
45      * @param as <code>ActivationSpec</code>
46      * @throws <code>NotSupportedException</code>
47      */

48     public void endpointActivation(MessageEndpointFactory JavaDoc mef, ActivationSpec JavaDoc as) throws NotSupportedException JavaDoc {
49         throw new NotSupportedException JavaDoc("This method is not supported for this JDBC connector");
50     }
51     
52     /**
53      * Empty method implementation for endpointDeactivation
54      *
55      * @param mef <code>MessageEndpointFactory</code>
56      * @param as <code>ActivationSpec</code>
57      */

58     public void endpointDeactivation(MessageEndpointFactory JavaDoc mef, ActivationSpec JavaDoc as) {
59         
60     }
61     
62     /**
63      * Empty method implementation for getXAResources
64      * which just throws <code>NotSupportedException</code>
65      *
66      * @param specs <code>ActivationSpec</code> array
67      * @throws <code>NotSupportedException</code>
68      */

69     public XAResource JavaDoc[] getXAResources(ActivationSpec JavaDoc[] specs) throws NotSupportedException JavaDoc {
70         throw new NotSupportedException JavaDoc("This method is not supported for this JDBC connector");
71     }
72     
73     /**
74      * Empty implementation of start method
75      *
76      * @param ctx <code>BootstrapContext</code>
77      */

78     public void start(BootstrapContext JavaDoc ctx) {
79     
80     }
81     
82     /**
83      * Empty implementation of stop method
84      */

85     public void stop() {
86     
87     }
88     
89 }
90
Popular Tags