IBM WebSphere Adapters Network Card User Manual


 
public TwineBallAdapterType()throws MetadataException{
super(Constants.RESOURCE_ADAPTER_BEAN_NAME, 2, 1);
setId(Constants.ADAPTER_NAME);
setDisplayName(Constants.ADAPTER_NAME);
setDescription(WBIMetadataDiscoveryImpl.getPropertyDescription
(ADAPTERTYPE_PROPERTY));
setVendor(VENDOR);
setVersion(VERSION);
setOutboundConnections();
setInboundConnections();
}
setInboundConnections
The setInboundConnections() method sets the inbound connections on the adapter
type.
private void setInboundConnections() throws MetadataException {
TwineBallInboundConnectionType inConnTypeForRuntime =
new TwineBallInboundConnectionType(this);
addInboundConnectionType(inConnTypeForRuntime);
inConnTypeForRuntime.setResourceAdapterJavaBean
(Constants.RESOURCE_ADAPTER_BEAN_NAME);
inConnTypeForRuntime.setActivationSpecJavaBean
(Constants.ACTIVATION_SPEC);
}
setOutboundConnections
This method sets the outbound connections on the adapter type. The connection
type that can be used to perform discovery should be set to true for
IsSupportedInMetadataService and connections that can be used for run time
should be set to true for IsSupportedAtRuntime.
Tip: You might find it preferable to have separate connection types for enterprise
metadata discovery and for run time. This way the property group for discovery
can display properties needed to perform the discovery and not the entire set of
properties describing ResourceAdapter and ManagedConnectionFactory properties.
private void setOutboundConnections() throws MetadataException {
TwineBallOutboundConnectionType outConnTypeForRuntime =
new TwineBallOutboundConnectionType(this);
TwineBallOutboundConnectionType outConnTypeForMetadata =
new TwineBallOutboundConnectionType(this);
addOutboundConnectionType(outConnTypeForMetadata);
addOutboundConnectionType(outConnTypeForRuntime);
outConnTypeForMetadata.setManagedConnectionFactoryJavaBean
(Constants.MANAGED_CONNECTION_FACTORY_NAME);
outConnTypeForRuntime.setManagedConnectionFactoryJavaBean
(Constants.MANAGED_CONNECTION_FACTORY_NAME);
outConnTypeForMetadata.setResourceAdapterJavaBean
(Constants.RESOURCE_ADAPTER_BEAN_NAME);
outConnTypeForRuntime.setResourceAdapterJavaBean
(Constants.RESOURCE_ADAPTER_BEAN_NAME);
outConnTypeForMetadata.setIsSupportedInMetadataService(true);
outConnTypeForMetadata.setIsSupportedAtRuntime(false);
outConnTypeForRuntime.setIsSupportedInMetadataService(false);
outConnTypeForRuntime.setIsSupportedAtRuntime(true);
}
WBIOutboundConnectionTypeImpl samples:
WBIOutboundConnectionTypeImpl represents the outbound connection types
supported by the adapter. The mapping of these connection types corresponds to
142 WebSphere Adapters: WebSphere Adapter Toolkit User Guide