org.exolab.jms.client.rmi
Class RmiJmsConnectionStub

java.lang.Object
  |
  +--org.exolab.jms.client.rmi.RmiJmsConnectionStub
All Implemented Interfaces:
JmsConnectionStubIfc

public class RmiJmsConnectionStub
extends java.lang.Object
implements JmsConnectionStubIfc

This class is repsonsible for returning a reference to a remote JMS connection. If it cannot access get a remote connection then the constructor will fail with a JMSException

Version:
$Revision: 1.20 $ $Date: 2003/08/07 13:32:54 $
Author:
Jim Alateras

Field Summary
protected  RemoteJmsServerConnectionIfc _delegate
          This is a reference to the remote connection stub that is constructed during object initialisation.
protected  RmiJmsServerStub _owner
          This is a reference to the server stub that created this connection
 java.lang.String MAX_RETRY_PROP
          System property to override the max retries for failed rmi requests.
 java.lang.String RETRY_INTERVAL_PROP
          System property, which specifies the interval between successive retries.
 
Constructor Summary
RmiJmsConnectionStub(RemoteJmsServerConnectionIfc connection, int pingInterval, RmiJmsServerStub server)
          Instantiate an instance of this class with the specified remote object.
 
Method Summary
 void close()
          Close the connection and deallocate any resources.
 JmsSessionStubIfc createSession(int ackMode, boolean transacted)
          Create a session.
 void destroy()
          Release all local resources used by this object.
 java.lang.String getConnectionId()
          Retrieve the identity of this conection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_delegate

protected volatile RemoteJmsServerConnectionIfc _delegate
This is a reference to the remote connection stub that is constructed during object initialisation.

_owner

protected RmiJmsServerStub _owner
This is a reference to the server stub that created this connection

MAX_RETRY_PROP

public final java.lang.String MAX_RETRY_PROP
System property to override the max retries for failed rmi requests. The default is 10

RETRY_INTERVAL_PROP

public final java.lang.String RETRY_INTERVAL_PROP
System property, which specifies the interval between successive retries. The value is specified in milliseconds and defaults to 100ms
Constructor Detail

RmiJmsConnectionStub

public RmiJmsConnectionStub(RemoteJmsServerConnectionIfc connection,
                            int pingInterval,
                            RmiJmsServerStub server)
                     throws javax.jms.JMSException
Instantiate an instance of this class with the specified remote object. This object is a delegate for all other requests. If a null connection is specified then throw a JMSException exception
Parameters:
RemoteJmsServerConnectionIfc -  
pingInterval - interval between client pings
server - the server creating the connection
Throws:
javax.jms.JMSException -  
Method Detail

createSession

public JmsSessionStubIfc createSession(int ackMode,
                                       boolean transacted)
                                throws javax.jms.JMSException
Description copied from interface: JmsConnectionStubIfc
Create a session.
Specified by:
createSession in interface JmsConnectionStubIfc
Following copied from interface: org.exolab.jms.client.JmsConnectionStubIfc
Parameters:
ackMode - the session ack mode
transacted - true if it is a transacted session
Throws:
javax.jms.JMSException - for any JMS error

close

public void close()
           throws javax.jms.JMSException
Description copied from interface: JmsConnectionStubIfc
Close the connection and deallocate any resources.
Specified by:
close in interface JmsConnectionStubIfc
Following copied from interface: org.exolab.jms.client.JmsConnectionStubIfc
Throws:
javax.jms.JMSException - for any JMS error

getConnectionId

public java.lang.String getConnectionId()
                                 throws javax.jms.JMSException
Description copied from interface: JmsConnectionStubIfc
Retrieve the identity of this conection.
Specified by:
getConnectionId in interface JmsConnectionStubIfc
Following copied from interface: org.exolab.jms.client.JmsConnectionStubIfc
Returns:
the identity of this conection
Throws:
javax.jms.JMSException - for any JMS error

destroy

public void destroy()
Description copied from interface: JmsConnectionStubIfc
Release all local resources used by this object.
Specified by:
destroy in interface JmsConnectionStubIfc
Following copied from interface: org.exolab.jms.client.JmsConnectionStubIfc
Throws:
javax.jms.JMSException - for any JMS error


Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.