Total Pageviews

Thursday, July 14, 2011

Configure ORBO compatible for Purple Stack

Till version 13.2   Oracle provide default configuration in installer for two stacks named as Red stack (OAS and OracleDB) Blue Stack (IBM WAS and DB2).
There was a demand from the customer to use Oracle as database and WAS as application server, they named this configuration as PURPLE stack.Now first question comes in  mind how to make installer compatible to purple stack.
If you are inexperience its looks like tricky but if you think little bit deeper you will find the solution easily. Only thing which you need to kept in mind that only there is changes in DB related activity , for WAS everything is pre configured by Oracle you need to change Oracle DB related driver few configuration files and may be need to modify ant script.





Solution Of Problem

1)- Modify antinstall-config file under <!--WAS PANEL--> as shown below
<!-- OAS PANEL -->
    <page ifProperty="${env.APPSERVER}=oracle" type="input" name="DataSourceDetails" displayText="Data Source User">
        <comment displayText="Provide the details for the Back Office schema user" />
        <comment displayText=" " />
        <text property="input.datasource.url" defaultValue="jdbc:oracle:thin:@[host]:[tcpPort]:[dbname]"
              displayText="JDBC URL" />
        <text property="input.datasource.username" defaultValue="" displayText="Data Source Username" />
        <password property="input.datasource.password" defaultValue="" displayText="Data Source password"
              regex=".*" />
        <hidden property="input.oc4j.type" value="enterprise" />
    </page>

    <!-- WAS PANEL -->

    <page ifProperty="${env.APPSERVER}=websphere" type="input" name="DataSourceDetails" displayText="Data Source User">
        <comment displayText="Provide the details for the Back Office schema user" />
        <comment displayText=" " />
        <text property="input.datasource.url" defaultValue="jdbc:oracle:thin:@[host]:[tcpPort]:[dbname]"
              displayText="JDBC URL" />
        <text property="input.datasource.username" defaultValue="" displayText="Data Source Username" />
        <password property="input.datasource.password" defaultValue="" displayText="Data Source Password"
              regex=".*" />
    </page>

2)-Modify build.xml file under target "was-deploy-database"

<target name="was-deploy-database">
    <!-- testing db connection -->
    <property file="${db.dir}/db.properties"/>
    <echo>Testing the Database connection.  A failure here indicates an issue communicating with the Database.</echo>
    <sql driver="${db.jdbc-driver}"
        url="${datasource.url.trimmed}"
    userid="${datasource.username.trimmed}"
    password="${datasource.password.trimmed}"
    onerror="stop">
             <classpath>
                 <pathelement location="${db.dir}/lib/${db.jdbc-jar}"/>
                 <pathelement location="${db.dir}/lib/${db.jdbc-jar2}"/>
                 <pathelement location="${db.dir}/lib/${db.jdbc-jar3}"/>
             </classpath>
        select table_name from user_tables;
         <!--select * from sysstat.TABLES;-->
    </sql>
    <if>
        <istrue value="${install.database.trimmed}"/>
    <then>
        <ant dir="${db.dir}" antfile="${db.dir}/build.xml" target="load_sql"/>
        </then>
    </if>
</target>

3)-Modify was.properties file for JDBC/Datasource configuration
#
# These settings are for the JDBC/Datasource configuration
#
data.source=jdbc/DataSource
db.user=@installer.db.user@
db.password-encrypted=@installer.db.password.encrypted@
db.jdbc-url=@installer.db.jdbc.url@
#db.jdbc-url=jdbc:oracle:thin:@eqa2:1521:co01
#db.jdbc-driver=com.ibm.db2.jcc.DB2Driver

db.jdbc-driver=oracle.jdbc.driver.OracleDriver
jars.dir=@installer.db.tmp.dir@
db.ssl.enabled=@enable.secure.jdbc@
#db.ssl.port=@datasource.port.secure@

# DB install path is the path to the list of db.jars
# Obviously, this assumes the jars listed (comma separated) in db.jars are in the same directory
db.install.path=${was.libs}
#db.jars=db2jcc.jar,db2jcc_license_cu.jar
db.jars=ojdbc14.jar (include oracle driver)

Save these files inside your Installer. Now your ORBO installer is ready to use  for purple stack.
 

No comments:

Post a Comment