KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > je > jca > ra > JEConnectionFactory


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002,2006 Oracle. All rights reserved.
5  *
6  * $Id: JEConnectionFactory.java,v 1.9 2006/10/30 21:14:18 bostic Exp $
7  */

8
9 package com.sleepycat.je.jca.ra;
10
11 import java.io.Serializable JavaDoc;
12
13 import javax.resource.Referenceable JavaDoc;
14
15 import com.sleepycat.je.EnvironmentConfig;
16 import com.sleepycat.je.TransactionConfig;
17
18 /**
19  * An application may obtain a {@link JEConnection} in this manner:
20  * <pre>
21  * InitialContext iniCtx = new InitialContext();
22  * Context enc = (Context) iniCtx.lookup("java:comp/env");
23  * Object ref = enc.lookup("ra/JEConnectionFactory");
24  * JEConnectionFactory dcf = (JEConnectionFactory) ref;
25  * JEConnection dc = dcf.getConnection(envDir, envConfig);
26  * </pre>
27  *
28  * See &lt;JEHOME&gt;/examples/jca/HOWTO-**.txt and
29  * &lt;JEHOME&gt;/examples/jca/simple/SimpleBean.java for more information
30  * on how to build the resource adapter and use a JEConnection.
31  */

32 public interface JEConnectionFactory
33     extends Referenceable JavaDoc, Serializable JavaDoc {
34
35     public JEConnection getConnection(String JavaDoc jeRootDir,
36                       EnvironmentConfig envConfig)
37     throws JEException;
38
39     public JEConnection getConnection(String JavaDoc jeRootDir,
40                       EnvironmentConfig envConfig,
41                       TransactionConfig transConfig)
42     throws JEException;
43 }
44
Popular Tags