KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > repository > ResourceAdmin


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 package com.sun.enterprise.repository;
24
25 import java.util.Set JavaDoc;
26 import java.util.Properties JavaDoc;
27
28 public interface ResourceAdmin {
29
30     // Messaging style
31
int QUEUE = 1;
32     int TOPIC = 2;
33
34     /**
35      * Add and configure a connection factory
36      * @param AppName Name of application (can be null if the adapter
37      * @param connectorName Name of resource adapter
38      * is deployed standalone)
39      * @param jndiName JNDI name of Connection Factory
40      * @param xaRecoveryUser username for xa recovery purpose (optional)
41      * @param xaRecoveryPassword password for xa recovery purpose (optional)
42      * @param props properties to be set on the connection factory
43      */

44      ConnectorResource addConnectionFactory(String JavaDoc appName,
45                                             String JavaDoc connectorName,
46                                             String JavaDoc jndiName,
47                                             String JavaDoc xaRecoveryUser,
48                                             String JavaDoc xaRecoveryPassword,
49                                             Properties JavaDoc props)
50         throws J2EEResourceException;
51
52     void addResource(J2EEResource resource)
53         throws J2EEResourceException;
54
55     Set JavaDoc getResources(int resourceType)
56         throws J2EEResourceException;
57
58     void removeResource(String JavaDoc name, int resourceType)
59         throws J2EEResourceException;
60
61     void removeAllResources(int resourceType)
62         throws J2EEResourceException;
63
64 }
65
Popular Tags