The Object Integration Gateway application JavaBean, ects2AppBean, is a standalone implementation of all the functions provided by the Gateway EJB base class. You use the Gateway application bean in a non-EJB environment where a standalone application or custom application server has to access the Gateway.
|
|
addSessionParm(String persistKey, String value)
|
|
|
|
|
Note A running transaction is rolled back prior to the session being closed.
|
|
|
String getDocument(String docname) throws ects2AppBeanException
|
Returns the XML document from the last run method call. The XML document must be of type ROWSET or MSSCHEMA.
|
String getDocumentFromTable(String tableName) throws ects2AppBeanException
|
Returns the named table’s XML document from the message area.
|
|
|
|
Returns the HTML documents returned from the last Object Integration Gateway interaction.
|
|
|
|
|
WebRowSet getTable() throws ects2AppBeanException
|
Returns a com.ObjectStar.jdbc.rowset.WebRowSet object via the “pass data to client” option of the Object Integration Gateway Transaction definition.
|
WebRowSet getTable(String docname) throws ects2AppBeanException
|
Converts an XML document from the last run method call to a WebRowSet object, and returns the WebRowSet object. The XML document must be of type ROWSET or MSSCHEMA.
|
WebRowSet getTable(String tableName) throws ects2AppBeanException
|
Returns a com.ObjectStar.jdbc.rowset.WebRow
|
WebRowSet getTableFromDoc(String docname) throws ects2AppBeanException
|
Returns a com.ObjectStar.jdbc.rowset.WebRowSet object constructed by parsing an XML document from the current interaction.
|
|
Returns a java.util.LinkedList containing the table of contents from the last Object Integration Gateway interaction. The table of contents can be used in diagnostic or recovery code to find out what the interaction returned when unexpected results are encountered.
|
|
Returns a boolean indication of whether there is a current session or not.
|
openApplication() throws ects2AppBeanException
|
Opens an unpooled application based on default parameters.
|
|
Opens a pooled or unpooled application based on default parameters.
|
openApplication(String sessparms, boolean pooled) throws ects2AppBeanException
|
Opens a pooled or unpooled application based on default parameters.
|
openApplication(java.util.Hashtable sessParms, boolean pooled) throws ects2AppBeanException
|
Opens a pooled or unpooled application based on default parameters.
|
removeSessionParm(String persistKey) throws ects2AppBeanException
|
|
|
|
runRule(String ectsRuleName) throws ects2AppBeanException
|
Runs a TIBCO Object Service Broker rule. The rule runs within the context of the Object Integration Gateway framework and can programmatically interact with all normal Gateway objects. This method is provided as a way of accomplishing some discreet rules processing within the context of an explicitly started transaction.
|
runTrans(String transname) throws ects2AppBeanException
|
|
runXMLDoc(String docname) throws ects2AppBeanException
|
|
setDocument(String docname, String document) throws ects2AppBeanException
|
Stages one or more XML documents for sending to the Gateway on the next run method call.
|
setDocument(String docname, WebRowSet wrs) throws java.sql.SQLException
|
Stages one or more XML documents for sending to the Gateway on the next run method call.
|
setDocumentFromFile(String docName, java.lang.String fileName) throws ects2AppBeanException
|
Stores a file-based XML document so that the next interaction sends it to the Gateway for parsing.
|
setTable(WebRowSet wrs) throws java.sql.SQLException
|
Passes the contents of a WebRowSet object to a TIBCO Object Service Broker data table. The method converts the WebRowSet to an XML document so that when the next Gateway object is invoked, the XML document is sent along with any other parameters and loaded into a TIBCO Object Service Broker data table. Since no table name argument is provided, the data table from which the WebRowSet was created is updated.
|
setTable(WebRowSet wrs, String tablename) throws java.sql.SQLException
|
Passes the contents of a WebRowSet object to a TIBCO Object Service Broker data table. The method converts the WebRowSet to an XML document so that when the next Gateway object is invoked, the XML document is sent along with any other parameters and loaded into a TIBCO Object Service Broker data table. Since a table name argument is provided, the specified data table is updated.
|
|
Sets user data (name-value pairs) passed with run method calls. Multiple name-value pairs must be separated using commas. A value that contains a space character must be enclosed in single quotation marks.
|
setUserData(String name, String value) throws java.rmi.RemoteException
|
Sets user data (name-value pairs) passed with run method calls. Each call to this method adds a name-value pair to the userdata collection passed on the next interaction. There are no restrictions on the naming of user data; the same name can be used multiple times.
|
|
|
startTran(boolean update) throws ects2AppBeanException
|
Explicitly starts an Object Integration Gateway transaction. When started, a transaction can span multiple interactions of types runRule and runXMLDoc. Data updated as a result of these interactions is committed when the stopTran(true) method is called. The runTrans interaction is always atomic and any updates related to it are committed as part of a nested transaction.
|
stopTran(boolean commit) throws ects2AppBeanException
|
|
This example illustrates a simple compound transaction. If rules TEST_A and TEST_B update tables, and if these updates are pending, they are committed at the stopTrans statement.
The ects2Result class encapsulates the results of all OIG interactions. All documents and error logs returned as a result of an interaction are stored in the ects2Result. In debug mode persistent session data are also stored.
The ects2AppBeanException class is a specialized exception class for the ects2AppBean class. It provides a convenient way of capturing and retrieving exception messages. Many ects2AppBean methods throw an ects2AppBeanException object when an error is detected.