Package All Classes All Fields and Methods Deprecated
java.lang.Objectjava.lang.Throwable
java.lang.Exception
javax.resource.ResourceException
com.ibm.connector2.ims.ico.IMSDFSMessageException
IMS Connector for Java throws an IMSDFSMessageException when IMS returns a "DFS" message and the value of the imsRequestType property in the IMSInteractionSpec instance of the interaction is 1. An imsRequestType value of 1 is typically used by applications that are not generated using WebSphere Studio MFS support. This type of Java application should catch exceptions of type IMSDFSMessageException, since there is always the possibility that IMS will return a "DFS" message instead of the transaction output.
Note: Java applications that submit commands to IMS should set the value of the imsRequestType property in the IMSInteractionSpec instance of the interaction to 2. Java applications that are generated using WebSphere Studio MFS support should set the value of the imsRequestType property in the IMSInteractionSpec instance of the interaction to 3. Setting the value to 3 will ensure that the IMSDFSMessageException is not thrown when IMS returns a "DFS" message. Instead, the "DFS" message wis returned to the application as output.
The following example shows you how to retrieve a "DFS" message from an IMSDFSMessageException instance:
... } catch (Exception e) { if (e instanceof IMSDFSMessageException) { System.out.println( "\nIMS returned message: " + ((IMSDFSMessageException) e).getDFSMessage()); } else { e.printStackTrace(); } }
IMSInteractionSpec.setImsRequestType(int)
,
Serialized FormConstructor Summary | |
IMSDFSMessageException()
The default constructor. |
|
IMSDFSMessageException(java.lang.String message)
Creates an instance of IMSDFSMessageException, and provide a message for the instance. |
|
IMSDFSMessageException(java.lang.String message,
byte[] dfsBytes)
Creates an instance of IMSDFSMessageException, and provide a message and a byte array containing a "DFS" message for the instance. |
Method Summary | |
java.lang.String |
getDFSMessage()
Return the "DFS" message returned by IMS as a concatenated string of segments. |
java.util.Vector |
getDFSMessageSegments()
Returns the "DFS" message returned by IMS as a vector of segments. |
Methods inherited from class javax.resource.ResourceException |
getErrorCode, getLinkedException, setLinkedException |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public IMSDFSMessageException()
public IMSDFSMessageException(java.lang.String message)
message
- The detail message associated with
the exception.public IMSDFSMessageException(java.lang.String message, byte[] dfsBytes)
message
- The detail message associated with
the exception.dfsBytes
- An EBCDIC byte array containing the
"DFS" message returned by IMS.Method Detail |
public java.lang.String getDFSMessage()
public java.util.Vector getDFSMessageSegments()