org.objectweb.joram.client.connector

Class JoramAdapter

Implemented Interfaces:
javax.resource.spi.ResourceAdapter, java.io.Serializable

public class JoramAdapter
extends java.lang.Object
implements javax.resource.spi.ResourceAdapter, java.io.Serializable

A JoramAdapter instance manages connectivities to an underlying JORAM server: outbound connectivity (JCA connection management contract) and inbound connectivity (asynchronous message delivery as specified by the JCA message inflow contract).

See Also:
Serialized Form

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.
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

JoramAdapter()
Constructs a JoramAdapter instance.

Method Summary

void
endpointActivation(MessageEndpointFactory endpointFactory, ActivationSpec spec)
Notifies the adapter to setup asynchronous message delivery for an application server endoint.
void
endpointDeactivation(MessageEndpointFactory endpointFactory, ActivationSpec spec)
Notifies the adapter to deactivate message delivery for a given endpoint.
boolean
equals(Object o)
Compares adapters according to their properties.
java.lang.String
getAdminFile()
java.lang.Integer
getCnxPendingTimer()
java.lang.Boolean
getCollocatedServer()
java.lang.Integer
getConnectingTimer()
java.lang.String
getHostName()
java.lang.Boolean
getPersistentPlatform()
java.lang.String
getPlatformConfigDir()
Short
getServerId()
java.lang.String
getServerName()
java.lang.Integer
getServerPort()
java.lang.Integer
getTxPendingTimer()
XAResource[]
getXAResources(ActivationSpec[] specs)
Returns XA resources given an array of ActivationSpec instances.
int
hashCode()
Returns a code depending on the adapter properties.
void
setAdminFile(java.lang.String adminFile)
void
setCnxPendingTimer(java.lang.Integer cnxPendingTimer)
void
setCollocatedServer(java.lang.Boolean collocatedServer)
void
setConnectingTimer(java.lang.Integer connectingTimer)
void
setHostName(java.lang.String hostName)
void
setPersistentPlatform(java.lang.Boolean persistentPlatform)
void
setPlatformConfigDir(java.lang.String platformConfigDir)
void
setServerId(java.lang.Short serverId)
void
setServerName(java.lang.String serverName)
void
setServerPort(java.lang.Integer serverPort)
void
setTxPendingTimer(java.lang.Integer txPendingTimer)
void
start(BootstrapContext ctx)
Initializes the adapter; starts, if needed, a collocated JORAM server, and if needed again, administers it.
void
stop()
Notifies the adapter to terminate the connections it manages, and if needed, to shut down the collocated JORAM server.

Field Details

cnxPendingTimer

public 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.


connectingTimer

public 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.


txPendingTimer

public 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 Details

JoramAdapter

public JoramAdapter()
Constructs a JoramAdapter instance.

Method Details

endpointActivation

public void endpointActivation(MessageEndpointFactory endpointFactory,
                               ActivationSpec spec)
            throws ResourceException
Notifies the adapter to setup asynchronous message delivery for an application server endoint.


endpointDeactivation

public void endpointDeactivation(MessageEndpointFactory endpointFactory,
                                 ActivationSpec spec)
Notifies the adapter to deactivate message delivery for a given endpoint.


equals

public boolean equals(Object o)
Compares adapters according to their properties.


getAdminFile

public java.lang.String getAdminFile()


getCnxPendingTimer

public java.lang.Integer getCnxPendingTimer()


getCollocatedServer

public java.lang.Boolean getCollocatedServer()


getConnectingTimer

public java.lang.Integer getConnectingTimer()


getHostName

public java.lang.String getHostName()


getPersistentPlatform

public java.lang.Boolean getPersistentPlatform()


getPlatformConfigDir

public java.lang.String getPlatformConfigDir()


getServerId

public Short getServerId()


getServerName

public java.lang.String getServerName()


getServerPort

public java.lang.Integer getServerPort()


getTxPendingTimer

public java.lang.Integer getTxPendingTimer()


getXAResources

public XAResource[] getXAResources(ActivationSpec[] specs)
            throws ResourceException
Returns XA resources given an array of ActivationSpec instances.


hashCode

public int hashCode()
Returns a code depending on the adapter properties.


setAdminFile

public void setAdminFile(java.lang.String adminFile)


setCnxPendingTimer

public void setCnxPendingTimer(java.lang.Integer cnxPendingTimer)


setCollocatedServer

public void setCollocatedServer(java.lang.Boolean collocatedServer)


setConnectingTimer

public void setConnectingTimer(java.lang.Integer connectingTimer)


setHostName

public void setHostName(java.lang.String hostName)


setPersistentPlatform

public void setPersistentPlatform(java.lang.Boolean persistentPlatform)


setPlatformConfigDir

public void setPlatformConfigDir(java.lang.String platformConfigDir)


setServerId

public void setServerId(java.lang.Short serverId)


setServerName

public void setServerName(java.lang.String serverName)


setServerPort

public void setServerPort(java.lang.Integer serverPort)


setTxPendingTimer

public void setTxPendingTimer(java.lang.Integer txPendingTimer)


start

public void start(BootstrapContext ctx)
            throws ResourceAdapterInternalException
Initializes the adapter; starts, if needed, a collocated JORAM server, and if needed again, administers it.


stop

public void stop()
Notifies the adapter to terminate the connections it manages, and if needed, to shut down the collocated JORAM server.


Copyright B) 2004 Scalagent - All rights reserved