Bookshelf Home | Contents | Index | PDF |
Siebel Object Interfaces Reference > Interfaces Reference > Application Methods > Attach MethodThe Attach method allows an external application to reconnect to an existing Siebel session. SyntaxApplication.Attach(sessionString)
ReturnsBoolean indicating whether or not the method was successfully executed Used WithCOM Data Control, Java Data Bean ExamplesEach of these examples instantiates the first COM Data Control instance, logs in to a Siebel Server, detaches this instance, and then gains the session string. It then instantiates the second COM Data Control instance. It does not need to log in again, as it attaches to the existing session by using the session string. This reuses the connection created by the first instance. The following example is for COM Data Control and is written in native Visual Basic: Dim SiebelApplication_first As SiebelDataControl ' Instantiate the first instance ' Login to Siebel errCode = SiebelApplication_first.GetLastErrCode ' Detach this instance from Siebel and get session id ' Instantiate the second instance ' Attach the existing session to this instance SiebelApplication_second.LogOff The following example is for Java Data Bean: import com.siebel.data.*; public class JDBAttachDetachDemo public static void main(String[] args) public JDBAttachDetachDemo() // Login to the servers System.out.println("Logged in to the Siebel server "); //Get the Detach Handle // Instantiate another Java Data Bean // Do Attach // Logoff catch (SiebelException e) |
Siebel Object Interfaces Reference | Copyright © 2008, Oracle. All rights reserved. | |