01: /*
02: * @(#)XAConnection.java 1.8 02/04/09
03: *
04: * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved.
05: *
06: * SUN PROPRIETARY/CONFIDENTIAL.
07: * This software is the proprietary information of Sun Microsystems, Inc.
08: * Use is subject to license terms.
09: *
10: */
11:
12: package javax.jms;
13:
14: /** The <CODE>XAConnection</CODE> interface extends the capability of
15: * <CODE>Connection</CODE> by providing an <CODE>XASession</CODE> (optional).
16: *
17: *<P>The <CODE>XAConnection</CODE> interface is optional. JMS providers
18: * are not required to support this interface. This interface is for
19: * use by JMS providers to support transactional environments.
20: * Client programs are strongly encouraged to use the transactional support
21: * available in their environment, rather than use these XA
22: * interfaces directly.
23: *
24: * @version 1.1 February 2, 2002
25: * @author Mark Hapner
26: * @author Rich Burridge
27: * @author Kate Stout
28: *
29: * @see javax.jms.XAQueueConnection
30: * @see javax.jms.XATopicConnection
31: */
32:
33: public interface XAConnection extends Connection {
34:
35: /** Creates an <CODE>XASession</CODE> object.
36: *
37: * @return a newly created <CODE>XASession</CODE>
38: *
39: * @exception JMSException if the <CODE>XAConnection</CODE> object
40: * fails to create an <CODE>XASession</CODE> due to
41: * some internal error.
42: *
43: * @since 1.1
44: */
45:
46: XASession createXASession() throws JMSException;
47:
48: /** Creates an <CODE>Session</CODE> object.
49: *
50: * @param transacted usage undefined
51: * @param acknowledgeMode usage undefined
52: *
53: * @return a <CODE>Session</CODE> object
54: *
55: * @exception JMSException if the <CODE>XAConnection</CODE> object
56: * fails to create an <CODE>Session</CODE> due to
57: * some internal error.
58: *
59: * @since 1.1
60: */
61: Session createSession(boolean transacted, int acknowledgeMode)
62: throws JMSException;
63: }
|