KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > services > ejb > local > LocalHomeFactory


1 /*
2  * The contents of this file are subject to the Sapient Public License
3  * Version 1.0 (the "License"); you may not use this file except in compliance
4  * with the License. You may obtain a copy of the License at
5  * http://carbon.sf.net/License.html.
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
9  * the specific language governing rights and limitations under the License.
10  *
11  * The Original Code is The Carbon Component Framework.
12  *
13  * The Initial Developer of the Original Code is Sapient Corporation
14  *
15  * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
16  */

17
18 package org.sape.carbon.services.ejb.local;
19
20
21 import javax.ejb.EJBLocalHome JavaDoc;
22 import javax.naming.Context JavaDoc;
23
24 import org.sape.carbon.core.component.FunctionalInterface;
25 import org.sape.carbon.services.ejb.EnterpriseBeanConfiguration;
26 import org.sape.carbon.services.ejb.HomeFactoryException;
27
28 /**
29  * <p>This interface defines the functional APIs for a home factory component
30  * that provides facilities for retrieving the home interfaces of locally
31  * deployed Enterprise Java Beans (<code>EJBLocalHome</code> objects).</p>
32  * <p>Copyright 2002 Sapient</p>
33  * @since carbon 1.0
34  * @author Erik M Gottesman, June 2002
35  * @version $Revision: 1.6 $($Author: dvoet $ / $Date: 2003/05/05 21:21:28 $)
36  * @stereotype interface
37  */

38 public interface LocalHomeFactory extends FunctionalInterface {
39
40     /**
41      * <p>Handles JNDI lookups for locally deployed EJBs using the default
42      * context properties declared in the associated configuration.</p>
43      * @param logicalName String representation of the EJB's logical name
44      * in JNDI
45      * @return EJBLocalHome The home interface object for the local EJB
46      * @throws HomeFactoryException Wraps any checked exception that occurs
47      * during the JNDI lookup
48      */

49     EJBLocalHome JavaDoc lookup(String JavaDoc logicalName) throws HomeFactoryException;
50
51
52     /**
53      * <p>Handles JNDI lookups for locally deployed EJBs using a context
54      * object specified at run-time.</p>
55      * @param logicalName String representation of the EJB's logical name
56      * in JNDI
57      * @param context A <code>javax.naming.Context</code> object to be used
58      * in performing the JNDI lookup
59      * @return EJBLocalHome The home interface object for the local EJB
60      * @throws HomeFactoryException Wraps any checked exception that occurs
61      * during the JNDI lookup
62      */

63     EJBLocalHome JavaDoc lookup(String JavaDoc logicalName, Context JavaDoc context)
64         throws HomeFactoryException;
65
66
67     /**
68      * <p>Handles JNDI lookups for locally deployed EJBs using the default
69      * context properties declared in the associated configuration with the
70      * exception of the security principal and credentials which are passed
71      * at run-time.</p>
72      * @param logicalName a String representation of the EJB's logical name
73      * in JNDI
74      * @param principal String representation of the security principal
75      * @param credentials The credentials associated with the security principal
76      * in String format
77      * @return EJBLocalHome The home interface object for the local EJB
78      * @throws HomeFactoryException Wraps any checked exception that occurs
79      * during the JNDI lookup
80      */

81     EJBLocalHome JavaDoc lookup(String JavaDoc logicalName,
82         String JavaDoc principal,
83         String JavaDoc credentials)
84         throws HomeFactoryException;
85
86     /**
87      * <p>Utility method for retrieving an EJB's configuration information
88      * as declared in the associated configuration.</p>
89      * @param logicalName String representation of the EJB's logical name
90      * in JNDI
91      * @return EnterpriseBeanConfiguration An encapsulation of the EJB's
92      * declared configuration details
93      */

94     EnterpriseBeanConfiguration getEJBDetails(String JavaDoc logicalName);
95 }
Popular Tags