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
Содержание WebSphere Adapters
Страница 1: ...WebSphere Adapters WebSphere Adapter Toolkit User Guide Version 6 Release 2 Version 6 Release 2...
Страница 2: ......
Страница 3: ...WebSphere Adapters WebSphere Adapter Toolkit User Guide Version 6 Release 2 Version 6 Release 2...
Страница 6: ...iv WebSphere Adapters WebSphere Adapter Toolkit User Guide...
Страница 211: ...7 Start UTC using the Run universal test client option WebSphere Adapter development overview 205...
Страница 220: ...214 WebSphere Adapters WebSphere Adapter Toolkit User Guide...
Страница 224: ...218 WebSphere Adapters WebSphere Adapter Toolkit User Guide...
Страница 225: ......
Страница 226: ...Printed in USA...