|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.infoengine.connector.IeManagedConnection
As far as JCA is concerned this class respresents a physical connection to the underlying EIS (Info*Engine/Windchill). In actuality the physical connection has been abstracted further with the PhyscalConnection abstract class since interactions with Info*Engine over SOAP can occur via HTTP and possibly JMS (today, maybe other protocols in the future). IeConnection is the CCI connection class that represents a connection handle to a managed connection. Connection handles are actually what applications are given and can use to interact with the underlying EIS.
PhysicalConnection
,
IeConnection
Field Summary | |
private Vector |
cxEventListeners
|
private javax.resource.spi.ConnectionRequestInfo |
cxRequestInfo
|
private Vector |
handles
|
private Log |
log
|
private PrintWriter |
logWriter
|
private IeManagedConnectionMetaData |
metadata
|
private PhysicalConnection |
physicalConnection
|
private Subject |
subject
|
private IeSPILocalTransaction |
transaction
|
Constructor Summary | |
(package private) |
IeManagedConnection(Subject subject,
javax.resource.spi.ConnectionRequestInfo cxRequestInfo,
Log l)
create a new IeManagedConnection |
Method Summary | |
void |
addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
add a connection event listener. |
void |
associateConnection(Object connection)
associate a connection handle with this managed connection. |
void |
cleanup()
cleanup this managed connection so that it can be placed back in a connection pool and is ready to be used again. |
private void |
createPhysicalConnection(Subject subject,
javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
actually create the underlying physical connection could be HTTP or JMS or ... |
void |
destroy()
close the physical connection exceptions are grounded out. |
(package private) void |
fireConnectionClosed(IeConnection cx)
notify event listeners that the underlying handle has been closed and this ManagedConnection can be returned to the pool or destroyed. |
(package private) void |
fireConnectionErrorOccurred(Exception ex)
notify event listeners that a fatal connection error has occurred so the container can do some clean up, remove this ManagedConnection from its pool and destroy it. |
(package private) void |
fireTransactionCommitted(IeConnection cx)
notify event listeners that a transaction has been committed. |
(package private) void |
fireTransactionRolledback(IeConnection cx)
notify event listeners that a transaction has been rolled back. |
(package private) void |
fireTransactionStarted(IeConnection cx)
notify event listeners that a transaction has started. |
Object |
getConnection(Subject subject,
javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
create a new "handle" to this physical connection |
javax.resource.spi.LocalTransaction |
getLocalTransaction()
get the SPI LocalTransaction object. |
PrintWriter |
getLogWriter()
get the PrintWriter associated with this managed connection |
javax.resource.spi.ManagedConnectionMetaData |
getMetaData()
get metadata about this physical connection |
(package private) PhysicalConnection |
getPhysicalConnection()
get the underlying PhysicalConnection object |
XAResource |
getXAResource()
XAResource not supported. |
(package private) boolean |
match(Subject s,
javax.resource.spi.ConnectionRequestInfo cri)
does the underlying physical connection match these criteria? |
private void |
reInitialize(Subject s,
javax.resource.spi.ConnectionRequestInfo cri)
re-initialize the underly physical connection with some new criteria. |
void |
removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
remove a previously registered ConnectionEventListener |
void |
setLogWriter(PrintWriter out)
set the PrintWriter this managed connection will use to write info to. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Vector cxEventListeners
private Vector handles
private PrintWriter logWriter
private IeManagedConnectionMetaData metadata
private Subject subject
private javax.resource.spi.ConnectionRequestInfo cxRequestInfo
private PhysicalConnection physicalConnection
private IeSPILocalTransaction transaction
private Log log
Constructor Detail |
IeManagedConnection(Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo, Log l) throws javax.resource.ResourceException
subject
- the credentials object (may be null, not null in "Container managed sign on" scenario)cxRequestInfo
- connection request infol
- Log
javax.resource.ResourceException
Method Detail |
public void addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
addConnectionEventListener
in interface javax.resource.spi.ManagedConnection
listener
- the listener to be notified of eventspublic void associateConnection(Object connection) throws javax.resource.ResourceException
associateConnection
in interface javax.resource.spi.ManagedConnection
connection
- the connection handle to associcate with this managed connection
javax.resource.ResourceException
- if there's a problem with the association
ClassCastException
- if connection is not an instance of IeConnectionpublic void cleanup() throws javax.resource.ResourceException
cleanup
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public void destroy() throws javax.resource.ResourceException
destroy
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public Object getConnection(Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo) throws javax.resource.ResourceException
getConnection
in interface javax.resource.spi.ManagedConnection
subject
- security credentials (may be null)cxRequestInfo
- connection request info (may be null)
javax.resource.ResourceException
- if an error occurs when creating the connection handle
javax.resource.spi.SecurityException
- if subject or cxRequestInfo has changed as
re-authentication is not supported (cannot re-authenticate a JMS connection)public javax.resource.spi.LocalTransaction getLocalTransaction() throws javax.resource.ResourceException
getLocalTransaction
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
- (not really)public PrintWriter getLogWriter() throws javax.resource.ResourceException
getLogWriter
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
- (not really)public javax.resource.spi.ManagedConnectionMetaData getMetaData() throws javax.resource.ResourceException
getMetaData
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public XAResource getXAResource() throws javax.resource.ResourceException
getXAResource
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
javax.resource.NotSupportedException
- (always)public void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
removeConnectionEventListener
in interface javax.resource.spi.ManagedConnection
listener
- the listener to unregisterpublic void setLogWriter(PrintWriter out) throws javax.resource.ResourceException
setLogWriter
in interface javax.resource.spi.ManagedConnection
out
- the PrintWriter the connection should write to.
javax.resource.ResourceException
- (not really)void fireConnectionClosed(IeConnection cx)
cx
- the connection handlevoid fireConnectionErrorOccurred(Exception ex)
ex
- Exception that occurredvoid fireTransactionStarted(IeConnection cx)
cx
- the connection handlevoid fireTransactionCommitted(IeConnection cx)
cx
- the connection handlevoid fireTransactionRolledback(IeConnection cx)
cx
- the connection handleboolean match(Subject s, javax.resource.spi.ConnectionRequestInfo cri) throws PrivilegedActionException
s
- security credentialscri
- connection request info
PrivilegedActionException
private void reInitialize(Subject s, javax.resource.spi.ConnectionRequestInfo cri) throws javax.resource.ResourceException
s
- security credentials ("container managed sign on")cri
- connection request info
javax.resource.ResourceException
- if something bad happensprivate void createPhysicalConnection(Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo) throws javax.resource.ResourceException
subject
- security credentials ("container managed sign on")cxRequestInfo
- connection request info
javax.resource.ResourceException
- if something bad happensPhysicalConnection getPhysicalConnection()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |