Release Method for a Business Component
The Release method releases a business component and the resources for this business component that exist on the Siebel Server. This method does not return any information.
Format
BusComp.release()
No arguments are available.
Used With
Siebel Java Data Bean
Examples
The following example is for Siebel Java Data Bean:
import com.siebel.data.*;
{
…
// create Siebel Java Data Bean
// log in to Siebel Java Data Bean
…
// Create Siebel Bus Object.
// get the Bus Object from SiebelDataBean
…
// Create Siebel Bus Comp siebBusComp
// Get the business component using SiebelBusObject
…
// Use the bus. Component
…
// make sure to release the business component and its resources on the Siebel Server
siebBusComp.release();
// release the resources occupied by Siebel Bus Object and Siebel Java Data Bean
after their use.
}
The following example logs in to a Siebel Server. It then creates an instance for each of the following items:
Business object
Business component
Business service
It then releases each of these items in reverse order:
import com.siebel.data.*;
import com.siebel.data.SiebelException;
public class JDBReleaseDemo
{
private SiebelDataBean m_dataBean = null;
private SiebelBusObject m_busObject = null;
private SiebelBusComp m_busComp = null;
private SiebelService m_busServ = null;
public static void main(String[] args)
{
JDBReleaseDemo demo = new JDBReleaseDemo();
}
public JDBReleaseDemo()
{
try
{
// instantiate the Siebel Java Data Bean
m_dataBean = new SiebelDataBean();
// login to the Siebel Servers
m_dataBean.login("siebel.tcpip.none.none://gateway:port/enterprise/
object manager","userid","password");
System.out.println("Logged in to the Siebel Server ");
// get the business object
m_busObject = m_dataBean.getBusObject("Account");
// get the business component
m_busComp = m_busObject.getBusComp("Account");
// get the business service
m_busServ = m_dataBean.getService("Workflow Process Manager");
//release the business service
m_busServ.release();
System.out.println("BS released ");
//release the business component
m_busComp.release();
System.out.println("BC released ");
//release the business object
m_busObject.release();
System.out.println("BO released ");
// logoff
m_dataBean.logoff();
System.out.println("Logged off the Siebel Server ");
}
catch (SiebelException e)
{
System.out.println(e.getErrorMessage());
}
}
}
For more information, see Logoff Method for an Application.