Siebel Object Interfaces Reference > Interfaces Reference > Business Component Methods >

Release Method


The Release() method enables the release of the business component and its resources on the Siebel Server.

Syntax

BusComp.release()

Argument
Description

Not applicable

 

Returns

Not applicable

Used With

Java Data Bean

Example

The following example is for Java Data Bean:

import com.siebel.data.*;
{
   ...   
// create Siebel Data Bean
   // login into Siebel 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   
...   
// Be sure to release the business component and its resources on the server side   siebBusComp.release();   
// release the resources occupied by Siebel Bus Object and Siebel Data Bean after their use.
}

The following example logs in to a Siebel Server. It then instantiates a business object, a business component, and a business service. Then, it releases them 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 Data Bean
         m_dataBean = new SiebelDataBean();

         // login to the servers
         m_dataBean.login("siebel.tcpip.none.none://<gateway>:<port>/<enterprise>/
         <object manager>","<user id>","<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());
      }

   }

}

Related Topic

Logoff Method

Siebel Object Interfaces Reference Copyright © 2008, Oracle. All rights reserved.