|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.client.connector.ManagedConnectionFactoryImpl
A ManagedConnectionFactoryImpl
instance manages
outbound connectivity to a given JORAM server.
Field Summary | |
int |
cnxPendingTimer
Period in milliseconds between two ping requests sent by the client connection to the server; if the server does not receive any ping request during more than 2 * cnxPendingTimer, the connection is considered as dead and processed as required. |
int |
connectingTimer
Duration in seconds during which connecting is attempted (connecting might take time if the server is temporarily not reachable); the 0 value is set for connecting only once and aborting if connecting failed. |
protected java.io.PrintWriter |
out
Out stream for error logging and tracing. |
int |
txPendingTimer
Duration in seconds during which a JMS transacted (non XA) session might be pending; above that duration the session is rolled back and closed; the 0 value means "no timer". |
Constructor Summary | |
ManagedConnectionFactoryImpl()
Constructs a ManagedConnectionFactoryImpl instance. |
Method Summary | |
java.lang.Object |
createConnectionFactory()
Method called in the non managed case for creating an OutboundConnectionFactory instance. |
java.lang.Object |
createConnectionFactory(javax.resource.spi.ConnectionManager cxManager)
Method called by an application server (managed case) for creating an OutboundConnectionFactory instance. |
javax.resource.spi.ManagedConnection |
createManagedConnection(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo cxRequest)
Creates a new physical connection to the underlying JORAM server, and returns a ManagedConnectionImpl instance for a
managed environment. |
boolean |
equals(java.lang.Object o)
Compares managed factories according to their configuration. |
int |
getCnxPendingTimer()
|
java.lang.Boolean |
getCollocated()
|
int |
getConnectingTimer()
|
java.lang.String |
getHostName()
|
java.util.Set |
getInvalidConnections(java.util.Set connectionSet)
From a set of managed connections, returns the set of invalid ones. |
java.io.PrintWriter |
getLogWriter()
Gets the log writer of this ManagedConnectionFactoryImpl
instance. |
java.lang.String |
getPassword()
|
javax.resource.spi.ResourceAdapter |
getResourceAdapter()
Returns the resource adapter central authority instance. |
java.lang.Integer |
getServerPort()
|
int |
getTxPendingTimer()
|
java.lang.String |
getUserName()
|
int |
hashCode()
Returns a code depending on the managed factory configuration. |
javax.resource.spi.ManagedConnection |
matchManagedConnections(java.util.Set connectionSet,
javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo cxRequest)
Finds a matching connection from the candidate set of connections and returns a ManagedConnectionImpl instance. |
void |
setCollocated(java.lang.Boolean collocated)
|
void |
setHostName(java.lang.String hostName)
|
void |
setLogWriter(java.io.PrintWriter out)
Sets the log writer for this ManagedConnectionFactoryImpl
instance. |
protected void |
setParameters(java.lang.Object factory)
|
void |
setPassword(java.lang.String password)
|
void |
setResourceAdapter(javax.resource.spi.ResourceAdapter ra)
Sets the resource adapter central authority. |
void |
setServerPort(java.lang.Integer serverPort)
|
void |
setUserName(java.lang.String userName)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected transient java.io.PrintWriter out
public int connectingTimer
public int txPendingTimer
public int cnxPendingTimer
Constructor Detail |
public ManagedConnectionFactoryImpl()
ManagedConnectionFactoryImpl
instance.
Method Detail |
public int getConnectingTimer()
public int getCnxPendingTimer()
public int getTxPendingTimer()
protected void setParameters(java.lang.Object factory)
public java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager cxManager) throws javax.resource.ResourceException
OutboundConnectionFactory
instance.
createConnectionFactory
in interface javax.resource.spi.ManagedConnectionFactory
cxManager
- Application server's connections pooling manager.
javax.resource.ResourceException
- Never thrown.public java.lang.Object createConnectionFactory() throws javax.resource.ResourceException
OutboundConnectionFactory
instance.
createConnectionFactory
in interface javax.resource.spi.ManagedConnectionFactory
javax.resource.ResourceException
- Never thrown.public javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequest) throws javax.resource.ResourceException
ManagedConnectionImpl
instance for a
managed environment.
createManagedConnection
in interface javax.resource.spi.ManagedConnectionFactory
subject
- Security data, not taken into account.cxRequest
- User identification data, may be null
.
javax.resource.spi.CommException
- If the JORAM server is not reachable.
javax.resource.spi.SecurityException
- If the connecting is not allowed.
javax.jms.IllegalStateException
- If the central Joram adapter state is
invalid.
javax.resource.ResourceException
- If the provided user info is invalid,
or if connecting fails for any other
reason.public javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set connectionSet, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequest) throws javax.resource.ResourceException
ManagedConnectionImpl
instance.
matchManagedConnections
in interface javax.resource.spi.ManagedConnectionFactory
connectionSet
- Set of connections to test.subject
- Security data, not taken into account.cxRequest
- User identification data, may be null
.
javax.resource.ResourceException
- If the provided connection request info is
invalid.public void setLogWriter(java.io.PrintWriter out) throws javax.resource.ResourceException
ManagedConnectionFactoryImpl
instance.
setLogWriter
in interface javax.resource.spi.ManagedConnectionFactory
javax.resource.ResourceException
public java.io.PrintWriter getLogWriter() throws javax.resource.ResourceException
ManagedConnectionFactoryImpl
instance.
getLogWriter
in interface javax.resource.spi.ManagedConnectionFactory
javax.resource.ResourceException
public int hashCode()
hashCode
in interface javax.resource.spi.ManagedConnectionFactory
public boolean equals(java.lang.Object o)
equals
in interface javax.resource.spi.ManagedConnectionFactory
public javax.resource.spi.ResourceAdapter getResourceAdapter()
getResourceAdapter
in interface javax.resource.spi.ResourceAdapterAssociation
public void setResourceAdapter(javax.resource.spi.ResourceAdapter ra) throws javax.resource.ResourceException
setResourceAdapter
in interface javax.resource.spi.ResourceAdapterAssociation
javax.resource.ResourceException
- If the adapter could not be set.public java.util.Set getInvalidConnections(java.util.Set connectionSet) throws javax.resource.ResourceException
getInvalidConnections
in interface javax.resource.spi.ValidatingManagedConnectionFactory
javax.resource.ResourceException
public void setCollocated(java.lang.Boolean collocated)
public void setHostName(java.lang.String hostName)
public void setServerPort(java.lang.Integer serverPort)
public void setUserName(java.lang.String userName)
public void setPassword(java.lang.String password)
public java.lang.Boolean getCollocated()
public java.lang.String getHostName()
public java.lang.Integer getServerPort()
public java.lang.String getUserName()
public java.lang.String getPassword()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |