com.infoengine.connector
Class JMSConnection

java.lang.Object
  extended bycom.infoengine.connector.PhysicalConnection
      extended bycom.infoengine.connector.JMSConnection

public class JMSConnection
extends PhysicalConnection


Field Summary
(package private)  String authorization
           
(package private)  Context ctx
           
static String CTX_FACTORY
           
protected  IeConnectionRequestInfo cxRequestInfo
           
(package private)  javax.jms.Queue inQ
           
static String INQ
           
protected  Log log
           
protected  IeManagedConnection managedCx
           
(package private)  javax.jms.Queue outQ
           
static String OUTQ
           
static String OUTQ_WAIT
           
(package private)  long outQTimeOut
           
static String PROVIDER_CREDENTIALS
           
static String PROVIDER_PRINCIPAL
           
static String PROVIDER_URL
           
static String QCF
           
static String QCF_PASSWORD
           
static String QCF_USER
           
(package private)  javax.jms.QueueConnection qcx
           
(package private)  javax.jms.QueueSender qSender
           
(package private)  javax.jms.QueueSession qSession
           
(package private)  javax.xml.soap.MessageFactory soapMessageFactory
           
protected  Subject subject
           
 
Constructor Summary
JMSConnection()
           
 
Method Summary
(package private)  void destroy()
          destroy this physical connection
protected  String[] extractCredentials()
           
private  void getCtx()
          get the initial context
(package private)  IeConnectionRequestInfo getRequestInfo()
           
(package private)  void init()
          initialize the connection
(package private)  javax.xml.soap.SOAPMessage invoke(javax.xml.soap.SOAPMessage msg)
          send a SOAPMessage to an endPoint
private  Object lookup(String objRef)
           
private  javax.jms.Queue lookupQ(String queueName)
           
private  javax.jms.QueueConnectionFactory lookupQCF(String qcfName)
           
(package private)  boolean match(Subject s, javax.resource.spi.ConnectionRequestInfo cri)
          does this connection match these criteria
(package private)  void setLog(Log l)
           
(package private)  void setManagedConnection(IeManagedConnection managed)
           
(package private)  void setRequestInfo(IeConnectionRequestInfo info)
           
(package private)  void setSubject(Subject s)
           
private  Exception unwrap(Exception exc)
           
protected  Throwable unwrapSOAPException(javax.xml.soap.SOAPException soapE)
          extract root exception
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INQ

public static final String INQ
See Also:
Constant Field Values

OUTQ

public static final String OUTQ
See Also:
Constant Field Values

OUTQ_WAIT

public static final String OUTQ_WAIT
See Also:
Constant Field Values

QCF

public static final String QCF
See Also:
Constant Field Values

QCF_USER

public static final String QCF_USER
See Also:
Constant Field Values

QCF_PASSWORD

public static final String QCF_PASSWORD
See Also:
Constant Field Values

CTX_FACTORY

public static final String CTX_FACTORY
See Also:
Constant Field Values

PROVIDER_URL

public static final String PROVIDER_URL
See Also:
Constant Field Values

PROVIDER_PRINCIPAL

public static final String PROVIDER_PRINCIPAL
See Also:
Constant Field Values

PROVIDER_CREDENTIALS

public static final String PROVIDER_CREDENTIALS
See Also:
Constant Field Values

ctx

Context ctx

qcx

javax.jms.QueueConnection qcx

qSession

javax.jms.QueueSession qSession

qSender

javax.jms.QueueSender qSender

inQ

javax.jms.Queue inQ

outQ

javax.jms.Queue outQ

outQTimeOut

long outQTimeOut

authorization

String authorization

soapMessageFactory

javax.xml.soap.MessageFactory soapMessageFactory

managedCx

protected IeManagedConnection managedCx

subject

protected Subject subject

cxRequestInfo

protected IeConnectionRequestInfo cxRequestInfo

log

protected Log log
Constructor Detail

JMSConnection

public JMSConnection()
Method Detail

unwrap

private Exception unwrap(Exception exc)

getCtx

private void getCtx()
             throws javax.resource.ResourceException
get the initial context

Throws:
javax.resource.ResourceException

lookup

private Object lookup(String objRef)
               throws javax.resource.ResourceException
Throws:
javax.resource.ResourceException

lookupQ

private javax.jms.Queue lookupQ(String queueName)
                         throws javax.resource.ResourceException
Throws:
javax.resource.ResourceException

lookupQCF

private javax.jms.QueueConnectionFactory lookupQCF(String qcfName)
                                            throws javax.resource.ResourceException
Throws:
javax.resource.ResourceException

init

void init()
    throws javax.resource.ResourceException
initialize the connection

Specified by:
init in class PhysicalConnection
Throws:
javax.resource.ResourceException

destroy

void destroy()
       throws Exception
destroy this physical connection

Specified by:
destroy in class PhysicalConnection
Throws:
Exception

invoke

javax.xml.soap.SOAPMessage invoke(javax.xml.soap.SOAPMessage msg)
                            throws Exception
send a SOAPMessage to an endPoint

Specified by:
invoke in class PhysicalConnection
Parameters:
msg - message to send
Returns:
SOAPMessage response
Throws:
Exception - if error occurs (implementor should unwrap)

setManagedConnection

void setManagedConnection(IeManagedConnection managed)
Parameters:
managed - IeManagedConnection instance

setSubject

void setSubject(Subject s)
Parameters:
s - security credentials

setLog

void setLog(Log l)
Parameters:
l - Log

setRequestInfo

void setRequestInfo(IeConnectionRequestInfo info)
Parameters:
info - connection request info

getRequestInfo

IeConnectionRequestInfo getRequestInfo()
Returns:
IeConnectionRequestInfo the request info object

match

boolean match(Subject s,
              javax.resource.spi.ConnectionRequestInfo cri)
        throws PrivilegedActionException
does this connection match these criteria

Parameters:
s - security credentials
cri - connection request info
Returns:
boolean
Throws:
PrivilegedActionException

unwrapSOAPException

protected Throwable unwrapSOAPException(javax.xml.soap.SOAPException soapE)
extract root exception

Parameters:
soapE - SOAPException to unwrap
Returns:
Throwable

extractCredentials

protected String[] extractCredentials()
                               throws PrivilegedActionException
Throws:
PrivilegedActionException