NextGen Consulting

IT Consulting CRM BSS OSS

Using CBO Application

Q: I have a CRM console application, this is some code snipet:

Application app = new Application();
Session session = app.createSession();
session.login("sa", "sa");

Everytime i run it, i get error at line : app.createSession(); it says something like it could not find ASC configuration ….

Do I miss some configuration some where? How to make console program works?

Using CBO Environment

The code snippets above use CBO functionality which is used by Amdocs CRM application.

While CBO initiates its operation, it looks for an initialization configuration file named ‘clarify.env’. This file contains several important definitions, such as JDBC connection information, which are mandatory for its operation.

One of the parameters included in clarify.env tells the application the location of Amdocs System Configuration (ASC) data. This data can be located either on disk as XML files or stored in the database instance indicated by the JDBC connection parameters.

The clarify.env is located in a directory called ‘bin’ which contains all relevant application dynamic runtime libraries (*.dll for windows, *.so for Unix flavors).  This directory could be located anywhere provided the operating system has its path defined correctly

For example:   Assuming our ‘bin’ directory is located at the following path:

C:\CRM800\Apps\crmApps\bin_abs_crm_800\

(Windows) – we need to make sure this path is included in a system variable named ‘PATH’.

Once CBO understands where the data is located, then it looks for certain parameters within these data to determine its connections with CRM database (and possibly other database instances used by other applications).

In other words:  In order to properly use the CBO layer the application must:

  1. Know its ASC data location
  2. Extract and use proper resource definitions (such as the CRM database connection) from the ASC data 
    regardless the location of the ASC data (on disk or in the database).

Here is an example for a full clarify.env file:

##########  C:\CRM800\Apps\CrmApps\bin_crm ################
 ##### Used for Initial Connection ######
jdbc_db_name=CRM800
jdbc_db_server=localhost
jdbc_db_port=1521

######### Conf file location ######################################
# -- FOR DB READ - #####
#   
#    Used here to read from file.
#    to read and store in db, comment the following line
config_file_location=C:\CRM800\apps\server\dbadmin800\config\_main_abs_crm
##############################################################
 ######### Conf file type ##############################################
# -- CURRENTLY SET TO RETRIEVE PARAMS FROM  baseConfig       -- #####
# baseConfig      - Used for Smart apps     
# baseConfigThin  - Used for thin apps
crm_config=baseConfig                                             
###################################################################
 app_server=weblogic
app_server_datasource=CRM800_XA_DataSource
app_server_nonxa_datasource=CRM800_NXA_DataSource
app_server_password=weblogic
app_server_login_name=weblogic
unicode_db=y
login_name=sa
db_password=sa
db_name=CRM800
db_server=localhost
db_driver=Oracle
db_type=oracle90
Predef_User_Name=sa
Predef_User_Password=sa
clr_loc=1033

machinerole=Server
dataaccesslocation=InProc
unicode_app=y

charsetconvert=n

;    The following class path config works for Core CRM
;----------------------------------------------------------------------------
Java_Classpath=C:/CRM800/Apps/CrmApps/lib_crm_app/acfglib.jar;
C:/CRM800/Apps/CrmApps/lib_crm_app/ClfyCore.jar;
C:/CRM800/Apps/CrmApps/lib_crm_app/AmdocsCore.jar;
C:/CRM800/Apps/CrmApps/lib_crm_app/jdom.jar;
C:/CRM800/Apps/CrmApps/lib_crm_app/ojdbc14.jar;

jar_path=C:/CRM800/Apps/CrmApps/lib_crm_app
java_args=-Xms512m -Xmx512m
;----------------------------------------------------------------------------

##### Use the following to switch-on Trace log ####
trace=Y
tracekeys=sql,lpoms,config,apm

##### Use the following to switch-on ASC log ####
# enable_asc_log=true

##### Other Parameters #####################
JAVA_HOME=c:\Java\jdk150_12
billing_app_id=ACM
provisioning_app_id=PROV
fulfillment_app_id=FC
urm_default_pool=13
user_admin_priv=System Administrator
weblicense=on
java_pool_size=50m
large_pool_size=60m
output_charset=UTF-8
NLS_LANG=AMERICAN_AMERICA.AL32UTF8

In order to run a console application, you do not need the full clarify.env file, since some of the parameters above refer to an application server (Weblogic) environment.

Here are explanations for the most important parameters:

  • jdbc_db_xxx
    JDBC connection parameters, required for some initialization work (I.e. access and search  ASC data).
     
  • config_file_location
    ASC files location on disk. Omitting this parameter means that the ASC data is stored in the database instance indicated by the above JDBC parameters.
       
  • crm_config 
    The location of CRM parameters within the ASC data.  The location is indicated by a node name.

     Examples:

crm_config=baseConfig         – Used for Smart apps  (/crm/baseConfig)

crm_config=baseConfigThin  – Used for thin apps      (/crm/baseConfigThin)

  • app_server_XXX     
    Application server (Weblogic, Websphere) connection parameters
        
  • unicode_db 
    Defines whether the database is Unicode.
                
  • login_name, db_password, db_name, db_serve, db_driver, db_type, Predef_User_Name, Predef_User_Password
    Connection parameters used by Classic client or console applications.
      
  • clr_loc
    Defines the application locale (1033 is US_EN)
        
  • Java_Classpath, jar_path, java_args, java_pool_size, large_pool_size
    Parameters used by Java environment
       
  • Trace
    Used to switch-on Trace log
       
  • enable_asc_log
    Used to switch-on ASC log
       
  • NLS_LANG=AMERICAN_AMERICA.AL32UTF8
    Locale parameter used by CBO
     

CRM Configuration in ASC 

Use the ASC editor (an eclipse plugin) to manage (view / edit) the CRM database connection definition.

As mentioned above, the CRM root node is defined by the clarify.env parameter ‘crm_config’.

Assuming our CRM root is defined as ‘crm_config=baseConfig’,
the following database connection parameters are defined in ASC node /crm/baseConfig/Aif.  These parameters mainly used by an application server:  

DataSource: CRM800_XA_DataSource
JdbcDriver: oracle.jdbc.xa.client.OracleXADataSource
DatabaseUrl: jdbc:oracle:thin:@localhost:1521:CRM800
UserName: <user name>
Password: <Password>
 

 

13/08/2011 - Posted by | Amdocs, Backend, CRM, CRM, Development, Uncategorized

No comments yet.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.