Class AnnotatedResourceAdapterImpl
java.lang.Object
com.sun.ts.tests.common.connector.whitebox.annotated.AnnotatedResourceAdapterImpl
- All Implemented Interfaces:
jakarta.resource.spi.ResourceAdapter
,Serializable
@Connector(description="CTS Test Resource Adapter with No DD",
displayName="whitebox-anno_no_md.rar",
vendorName="Java Software",
eisType="TS EIS",
version="1.6",
licenseDescription="CTS License Required",
licenseRequired=true,
authMechanisms=@AuthenticationMechanism(credentialInterface=PasswordCredential,authMechanism="BasicPassword",description="Basic Password Authentication"),
reauthenticationSupport=false,
securityPermissions=@SecurityPermission(description="Security Perm description"),
transactionSupport=LocalTransaction,
requiredWorkContexts={jakarta.resource.spi.work.HintsContext.class,jakarta.resource.spi.work.SecurityContext.class})
public class AnnotatedResourceAdapterImpl
extends Object
implements jakarta.resource.spi.ResourceAdapter, Serializable
This is a sample resource adapter that will use no ra.xml info. This RA is used to assist with verifying the server
supports annotations when there is no ra.xml (Assertion 268) and the transaction support is Local.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for AnnotatedResourceAdapterImpl. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Debugging method.void
endpointActivation
(jakarta.resource.spi.endpoint.MessageEndpointFactory factory, jakarta.resource.spi.ActivationSpec spec) Activates an endpoint.void
endpointDeactivation
(jakarta.resource.spi.endpoint.MessageEndpointFactory ep, jakarta.resource.spi.ActivationSpec spec) Deactivates an endpoint.boolean
Compares this object with the given object.Gets the EIS password.Gets the EIS user.Gets the resource adapter name.Gets the server-side password.Gets the server-side user.getXAResources
(jakarta.resource.spi.ActivationSpec[] specs) Gets the XA resources.int
hashCode()
Gets the hashcode for this object.void
Sets the EIS password.void
setEisUser
(String val) Sets the EIS user.void
Sets the resource adapter name.void
setServerSidePwd
(String val) Sets the server-side password.void
setServerSideUser
(String val) Sets the server-side user.void
start
(jakarta.resource.spi.BootstrapContext bsc) Starts the resource adapter.void
stop()
Stops the resource adapter.
-
Constructor Details
-
AnnotatedResourceAdapterImpl
public AnnotatedResourceAdapterImpl()Constructor for AnnotatedResourceAdapterImpl.
-
-
Method Details
-
start
public void start(jakarta.resource.spi.BootstrapContext bsc) throws jakarta.resource.spi.ResourceAdapterInternalException Starts the resource adapter.- Specified by:
start
in interfacejakarta.resource.spi.ResourceAdapter
- Parameters:
bsc
- the bootstrap context- Throws:
jakarta.resource.spi.ResourceAdapterInternalException
- if an internal error occurs
-
stop
public void stop()Stops the resource adapter.- Specified by:
stop
in interfacejakarta.resource.spi.ResourceAdapter
-
endpointActivation
public void endpointActivation(jakarta.resource.spi.endpoint.MessageEndpointFactory factory, jakarta.resource.spi.ActivationSpec spec) throws jakarta.resource.NotSupportedException Activates an endpoint.- Specified by:
endpointActivation
in interfacejakarta.resource.spi.ResourceAdapter
- Parameters:
factory
- the message endpoint factoryspec
- the activation spec- Throws:
jakarta.resource.NotSupportedException
- if the operation is not supported
-
endpointDeactivation
public void endpointDeactivation(jakarta.resource.spi.endpoint.MessageEndpointFactory ep, jakarta.resource.spi.ActivationSpec spec) Deactivates an endpoint.- Specified by:
endpointDeactivation
in interfacejakarta.resource.spi.ResourceAdapter
- Parameters:
ep
- the message endpoint factoryspec
- the activation spec
-
getXAResources
public XAResource[] getXAResources(jakarta.resource.spi.ActivationSpec[] specs) throws jakarta.resource.ResourceException Gets the XA resources.- Specified by:
getXAResources
in interfacejakarta.resource.spi.ResourceAdapter
- Parameters:
specs
- the activation specs- Returns:
- an array of XA resources
- Throws:
jakarta.resource.ResourceException
- if a resource error occurs
-
equals
Compares this object with the given object. -
hashCode
public int hashCode()Gets the hashcode for this object. -
setRaName
Sets the resource adapter name.- Parameters:
name
- the new resource adapter name
-
getRaName
Gets the resource adapter name.- Returns:
- the resource adapter name
-
debug
Debugging method.- Parameters:
out
- the debug message
-
setServerSideUser
Sets the server-side user.- Parameters:
val
- the new server-side user
-
getServerSideUser
Gets the server-side user.- Returns:
- the server-side user
-
setServerSidePwd
Sets the server-side password.- Parameters:
val
- the new server-side password
-
getServerSidePwd
Gets the server-side password.- Returns:
- the server-side password
-
setEisUser
Sets the EIS user.- Parameters:
val
- the new EIS user
-
getEisUser
Gets the EIS user.- Returns:
- the EIS user
-
setEisPwd
Sets the EIS password.- Parameters:
val
- the new EIS password
-
getEisPwd
Gets the EIS password.- Returns:
- the EIS password
-