01: /*
02: * The contents of this file are subject to the Sapient Public License
03: * Version 1.0 (the "License"); you may not use this file except in compliance
04: * with the License. You may obtain a copy of the License at
05: * http://carbon.sf.net/License.html.
06: *
07: * Software distributed under the License is distributed on an "AS IS" basis,
08: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
09: * 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.remote;
19:
20: import javax.ejb.EJBHome;
21: import javax.naming.Context;
22:
23: import org.sape.carbon.core.component.FunctionalInterface;
24: import org.sape.carbon.services.ejb.EnterpriseBeanConfiguration;
25: import org.sape.carbon.services.ejb.HomeFactoryException;
26:
27: /**
28: * <p>This interface defines the functional APIs for a home factory component
29: * that provides facilities for retrieving the home interfaces of remotely
30: * deployed Enterprise Java Beans (<code>EJBHome</code> objects).</p>
31: * <p>Copyright 2002 Sapient</p>
32: * @since carbon 1.0
33: * @author Erik M Gottesman, June 2002
34: * @version $Revision: 1.7 $($Author: dvoet $ / $Date: 2003/05/05 21:21:28 $)
35: * @stereotype interface
36: */
37: public interface RemoteHomeFactory extends FunctionalInterface {
38:
39: /**
40: * <p>Handles JNDI lookups for remotely deployed EJBs using the default
41: * context properties declared in the associated configuration.</p>
42: * @param logicalName String representation of the EJB's logical name
43: * in JNDI
44: * @return EJBHome The home interface object for the remote EJB
45: * @throws HomeFactoryException Wraps any checked exception that occurs
46: * during the JNDI lookup
47: */
48: EJBHome lookup(String logicalName) throws HomeFactoryException;
49:
50: /**
51: * <p>Handles JNDI lookups for remotely deployed EJBs using a context
52: * object specified at run-time.</p>
53: * @param logicalName a String representation of the EJB's logical name
54: * in JNDI
55: * @param context A <code>javax.naming.Context</code> object to be used
56: * in performing the JNDI lookup
57: * @return EJBHome The home interface object for the remote EJB
58: * @throws HomeFactoryException Wraps any checked exception that occurs
59: * during the JNDI lookup
60: */
61: EJBHome lookup(String logicalName, Context context)
62: throws HomeFactoryException;
63:
64: /**
65: * <p>Handles JNDI lookups for remotely deployed EJBs using the default
66: * context properties declared in the associated configuration with the
67: * exception of the security principal and credentials which are passed
68: * at run-time.</p>
69: * @param logicalName a String representation of the EJB's logical name
70: * in JNDI
71: * @param principal String representation of the security principal
72: * @param credentials The credentials associated with the security principal
73: * in String format
74: * @return EJBHome The home interface object for the remote EJB
75: * @throws HomeFactoryException Wraps any checked exception that occurs
76: * during the JNDI lookup
77: */
78: EJBHome lookup(String logicalName, String principal,
79: String credentials) throws HomeFactoryException;
80:
81: /**
82: * <p>Utility method for retrieving an EJB's configuration information
83: * as declared in the associated XML configuration.</p>
84: * @param logicalName String representation of the EJB's logical name
85: * in JNDI
86: * @return EnterpriseBeanConfiguration An encapsulation of the EJB's
87: * declared configuration details
88: */
89: EnterpriseBeanConfiguration getEJBDetails(String logicalName);
90:
91: }
|