|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.connectors.ActiveResourceAdapterImpl
com.sun.enterprise.connectors.ActiveOutboundResourceAdapter
com.sun.enterprise.connectors.inbound.ActiveInboundResourceAdapterImpl
com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter
@Service @Scoped(value=org.jvnet.hk2.component.Singleton.class) public class ActiveJmsResourceAdapter
Represents an active JMS resource adapter. This does additional configuration to ManagedConnectionFactory and ResourceAdapter java beans. XXX: For code management reasons, think about splitting this to a preHawk and postHawk RA (with postHawk RA extending preHawk RA).
| Field Summary | |
|---|---|
static java.lang.String |
ADDRESSLIST
|
static java.lang.String |
ADMINPASSWORD
|
static java.lang.String |
ADMINUSERNAME
|
static java.lang.String |
BROKERTYPE
|
static java.lang.String |
CONNECTION_URL
|
static java.lang.String |
DESTINATION
|
static java.lang.String |
DESTINATION_TYPE
|
static java.lang.String |
DIRECT
|
static java.lang.String |
EMBEDDED
|
static java.lang.String |
LOCAL
|
static java.lang.String |
MQ_DIR_NAME
|
static java.lang.String |
PHYSICAL_DESTINATION
|
static java.lang.String |
REMOTE
|
| Fields inherited from class com.sun.enterprise.connectors.ActiveOutboundResourceAdapter |
|---|
bootStrapContextImpl, resourceadapter_ |
| Fields inherited from class com.sun.enterprise.connectors.ActiveResourceAdapterImpl |
|---|
connectionDefs_, connectorRuntime_, desc_, jcl_, moduleName_ |
| Constructor Summary | |
|---|---|
ActiveJmsResourceAdapter()
Constructor for an active Jms Adapter. |
|
| Method Summary | |
|---|---|
void |
addJmsHost(JmsHost host)
Adds the JmsHost to the MQAddressList of the resource adapter. |
ManagedConnectionFactory[] |
createManagedConnectionFactories(ConnectorConnectionPool cpr,
java.lang.ClassLoader loader)
This is a temporay solution for obtaining all the MCFs corresponding to a JMS RA pool, this is to facilitate the recovery process where the XA resources of all RMs in the broker cluster are required. |
ManagedConnectionFactory |
createManagedConnectionFactory(ConnectorConnectionPool cpr,
java.lang.ClassLoader loader)
Creates ManagedConnection Factory instance. |
void |
deleteJmsHost(JmsHost host)
Removes the JmsHost from the MQAddressList of the resource adapter. |
int |
getAddressListCount()
|
static java.lang.String |
getBrokerInstanceName(JmsService js)
|
protected JmsHost |
getJmsHost()
|
java.lang.String |
getServiceName()
|
void |
handleRequest(java.nio.channels.SelectableChannel selectableChannel)
|
boolean |
handles(ConnectorDescriptor cd,
java.lang.String moduleName)
|
boolean |
initializeService()
|
protected ManagedConnectionFactory |
instantiateMCF(java.lang.String mcfClass,
java.lang.ClassLoader loader)
|
protected void |
loadRAConfiguration()
Loads RA configuration for MQ Resource adapter. |
protected java.util.Set |
mergeRAConfiguration(ResourceAdapterConfig raConfig,
java.util.List<org.jvnet.hk2.config.types.Property> raConfigProps)
This is a HACK to remove the connection URL in the case of PE LOCAL/EMBEDDED before setting the properties to the RA. |
void |
postConstruct()
|
protected void |
postRAConfiguration()
Method to perform any post RA configuration action by derivative subclasses. |
void |
reloadRA(JmsService js)
Recreates the ResourceAdapter using new values from JmsSerice. |
protected void |
setClusterBrokerList(java.lang.String brokerList)
|
void |
setMasterBroker(java.lang.String newMasterBroker)
|
void |
setup()
|
protected void |
startResourceAdapter(BootstrapContext bootstrapContext)
|
void |
updateJmsHost(JmsHost host)
Updates the JmsHost information in the MQAddressList of the resource adapter. |
void |
updateMDBRuntimeInfo(EjbMessageBeanDescriptor descriptor_,
BeanPoolDescriptor poolDescriptor)
This is the most appropriate time (??) to update the runtime info of a 1.3 MDB into 1.4 MDB. |
void |
validateActivationSpec(ActivationSpec spec)
|
| Methods inherited from class com.sun.enterprise.connectors.inbound.ActiveInboundResourceAdapterImpl |
|---|
addEndpointFactoryInfo, destroy, getAllEndpointFactories, getAllEndpointFactoryInfo, getEndpointFactoryInfo, init, removeEndpointFactoryInfo |
| Methods inherited from class com.sun.enterprise.connectors.ActiveOutboundResourceAdapter |
|---|
addAdminObject, getBootStrapContext, getResourceAdapter |
| Methods inherited from class com.sun.enterprise.connectors.ActiveResourceAdapterImpl |
|---|
createAllConnectorResources, createDefaultConnectorConnectionPools, createDefaultConnectorResources, deleteDefaultConnectorConnectionPools, deleteDefaultConnectorResources, destroyAllConnectorResources, getClassLoader, getDescriptor, getModuleName, isServer, isSystemRar |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sun.enterprise.connectors.ActiveResourceAdapter |
|---|
getClassLoader, getDescriptor, getModuleName, getResourceAdapter |
| Field Detail |
|---|
public static final java.lang.String CONNECTION_URL
public static final java.lang.String BROKERTYPE
public static final java.lang.String ADMINUSERNAME
public static final java.lang.String ADMINPASSWORD
public static final java.lang.String DESTINATION
public static final java.lang.String DESTINATION_TYPE
public static final java.lang.String PHYSICAL_DESTINATION
public static final java.lang.String ADDRESSLIST
public static final java.lang.String EMBEDDED
public static final java.lang.String LOCAL
public static final java.lang.String REMOTE
public static final java.lang.String DIRECT
public static final java.lang.String MQ_DIR_NAME
| Constructor Detail |
|---|
public ActiveJmsResourceAdapter()
| Method Detail |
|---|
public void postConstruct()
postConstruct in interface org.jvnet.hk2.component.PostConstruct
protected void loadRAConfiguration()
throws ConnectorRuntimeException
loadRAConfiguration in class ActiveOutboundResourceAdapterConnectorRuntimeException - in case of an exception.
protected void startResourceAdapter(BootstrapContext bootstrapContext)
throws ResourceAdapterInternalException
startResourceAdapter in class ActiveOutboundResourceAdapterResourceAdapterInternalException
protected java.util.Set mergeRAConfiguration(ResourceAdapterConfig raConfig,
java.util.List<org.jvnet.hk2.config.types.Property> raConfigProps)
mergeRAConfiguration in class ActiveOutboundResourceAdapter
public void setup()
throws ConnectorRuntimeException
setup in interface ActiveResourceAdaptersetup in class ActiveOutboundResourceAdapterConnectorRuntimeException
protected void postRAConfiguration()
throws ConnectorRuntimeException
ActiveJMSResourceAdapter
to set unsupported javabean property types on its RA JavaBean runtime
instance.
ConnectorRuntimeExceptionpublic static java.lang.String getBrokerInstanceName(JmsService js)
public boolean handles(ConnectorDescriptor cd,
java.lang.String moduleName)
handles in interface ActiveResourceAdapterhandles in class ActiveInboundResourceAdapterImplpublic void validateActivationSpec(ActivationSpec spec)
validateActivationSpec in interface ActiveInboundResourceAdaptervalidateActivationSpec in class ActiveInboundResourceAdapterImpl
public void reloadRA(JmsService js)
throws ConnectorRuntimeException
js - JmsService element of the domain.xml
ConnectorRuntimeException - in case of any backend error.
public void addJmsHost(JmsHost host)
throws ConnectorRuntimeException
host - JmsHost element in the domain.xml
ConnectorRuntimeException - in case of any backend error.
public void deleteJmsHost(JmsHost host)
throws ConnectorRuntimeException
host - JmsHost element in the domain.xml
ConnectorRuntimeException - in case of any backend error.protected JmsHost getJmsHost()
public void updateJmsHost(JmsHost host)
throws ConnectorRuntimeException
host - JmsHost element in the domain.xml
ConnectorRuntimeException - in case of any backend error.
public ManagedConnectionFactory[] createManagedConnectionFactories(ConnectorConnectionPool cpr,
java.lang.ClassLoader loader)
createManagedConnectionFactories in interface ActiveResourceAdaptercreateManagedConnectionFactories in class ActiveResourceAdapterImplcpr - ConnectorConnectionPool objectloader - Class Loader.
protected ManagedConnectionFactory instantiateMCF(java.lang.String mcfClass,
java.lang.ClassLoader loader)
throws java.lang.Exception
instantiateMCF in class ActiveResourceAdapterImpljava.lang.Exception
public ManagedConnectionFactory createManagedConnectionFactory(ConnectorConnectionPool cpr,
java.lang.ClassLoader loader)
createManagedConnectionFactory in interface ActiveResourceAdaptercreateManagedConnectionFactory in class ActiveOutboundResourceAdaptercpr - ConnectorConnectionPool objectloader - Class Loader.
public void updateMDBRuntimeInfo(EjbMessageBeanDescriptor descriptor_,
BeanPoolDescriptor poolDescriptor)
throws ConnectorRuntimeException
Assumptions :
0. Assume it is a 1.3 MDB if no RA mid is specified. 1. Use the default system JMS resource adapter.
2. The ActivationSpec of the default JMS RA will provide the setDestination, setDestinationType, setSubscriptionName methods. 3. The jndi-name of the 1.3 MDB is the value for the Destination property for the ActivationSpec. 4. The ActivationSpec provides setter methods for the properties defined in the CF that corresponds to the mdb-connection-factory JNDI name.
updateMDBRuntimeInfo in interface ActiveInboundResourceAdapterupdateMDBRuntimeInfo in class ActiveInboundResourceAdapterImplConnectorRuntimeExceptionpublic int getAddressListCount()
public java.lang.String getServiceName()
getServiceName in interface LazyServiceInitializerpublic boolean initializeService()
initializeService in interface LazyServiceInitializerpublic void handleRequest(java.nio.channels.SelectableChannel selectableChannel)
handleRequest in interface LazyServiceInitializerpublic void setMasterBroker(java.lang.String newMasterBroker)
protected void setClusterBrokerList(java.lang.String brokerList)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||