Tuesday, August 21, 2012

WebSphere Deployment Manual


Deployment Manual for IBM WebSphere 6.1

  1. Install IBM websphere. Setup will guide you through simple steps.
    1. Please note the admin user id and password specify during installation

  1. After installation. Start websphere application server by following steps

Starting application server


Console showing startup
 

3. After startup start Administrator console using following steps


4. Administrator console started (Login with ID & password) provided
5. Administrator console after login

6. Creating Data Source
a. Select ResourcesàJDBCàJDBC Provider from left panel

b. Select the scope and click new to create new data source



c. Specify JDBC-Provider details and click next.



d. Specify the ojdbc14.jar path. Click next


e. Summery page displays JDBC provider details and click finish

4


f. Select JDBC Provider from left panel, click Oracle JDBC driver that we created previously



g. Click on data source link



h. Click new to create new data Source



i. Type in the JNDI name, and select authentication from drop down list, if you do have any authentication created click on the link “Create new J2C authentication alias”


j. Create new alias, type in the database user id, database password, description and click apply


            k. Follow the same steps from step H through F, after giving JNDI click next


l. In URL type à jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = IP)(PORT = 1521)))(CONNECT_DATA =(sid =SID_NAME)(SERVER=shared)))
- Select data store helper class name
-          Click next

            m. After having a glance at summery page, click finish.



            n. Click save to save changes to data repository


            o. Select the newly created data source and click Test Connection

Test connection showing success

Installing new application

a.       Before deploying you application on Websphere we need to create a war file
b.      Steps to create a war file
a.       Set you jdk path
b.      Go to you application (WAR) directory
c.       Use jar –cvf war_name.war *.*command to create war file
c.       In the full path specify/browse the file
d.      Type in you context-root which will be used to access your application
e.       Click next



f.       Specify the application deployment path.
g.      And with default settings click next


h.      Select the entry to map with server
i.        Click next



j.        Summary page displays all the information regards application.
k.      Click finish to start deployment




Snap showing deployment started


            l. After deployment click save.


m.    Select applicationàEnterprise Application, which displays all the application deployed



n.      Select your application and click start


Application started
3. Stopping application server
            Select startàprogramsàIBM WebsphereàProfileàApp01àstop server



Stop console



Note: - If you have any new JAR files to be added, add the files at InstallDirectory/IBM/Webshpere/lib/

Tuesday, August 7, 2012

Quartz Integration On Oracle Weblogic


Quartz Integration On Oracle Weblogic


1. Pre-requisite for quartz integration


Pre-requisite to integrate quartz on WebLogic are as follows
1. Oracle WebLogic installed
2. Oracle/Database installed for connectivity
3. Application classes/jars, database connectivity drivers ( ojdbc14.jar )
4. JDK 1.6.0.3 or above


2. Starting Quartz on Oracle Weblogic (Windows Platform)


Before starting the application server, perform the following steps


1.  Place the following jars/files in following directory
Installed Drive\Oracle\Middleware\user_projects\domains\testdomain\lib
    org.jar
    custom.jar
    com.jar
    jta-1_1-classes.jar
    quartz-weblogic-2.1.5.jar
    QuartzScheduler.cfg


2.  Place the log4j.xml file in following directory
Installed Drive\Oracle\Middleware\user_projects\domains\testdomain


Note : "testdomain" in above path is the domain created while installing weblogic


3. Configuration changes


    QuartzScheduler.cfg


FileLogHeartbeats=Y ScreenLogShowHeartBeats=Y scriptFile=Framewrk/subs/json.lib,Framewrk/subs/filter.js,Framewrk/subs/da te.lib,Framewrk/common/FuncUtils.jds,Framewrk/common/dbUtils.jds,Frame wrk/common/DBSchema.js,Framewrk/subs/common.lib,Framewrk/main.jds orgMsgLogPath=C:/log serverPath=E:/Weblogic/weblogicwar/mfx_4_1_0_retail.war jndiName=mfx_4_1_0_retail_xa


FileLogHeartbeats : Log the quartz instance ScreenLogShowHeartBeats : On weblogic console show the quartz log scriptFile : Applications files to be loaded in quartz instance orgMsgLogPath : System path to log quartz info
serverPath : Path of application
jndiName : JNDI name used to connect to the deployed application.


Note : jndiName is the name of the data source created to connect to the application




4.  Changes in application web.xml file


Path : Path to WAR\WAR Name\WEB-INF
Add the following tag and details to web.xml file inside the <web-app> tag
<servlet>
<servlet-name>QuartzInitializer</servlet-name>
<servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet</servlet-cla


ss>



<init-param>

aram-name>shutdown-on-unload</param-name>

aram-value>true</param-value>
</init-param>
<init-param>



aram-name>start-scheduler-on-load</param-name>

aram-value>true</param-value>
</init-param>
<init-param>

aram-name>config-file</param-name>

aram-value>quartz.properties</param-value>
</init-param>
oad-on-startup>1</load-on-startup>


</servlet>


Note : If these changes are not made in the web.xml file of the application, the quartz scheduler will not run for the deployed application


5.  Place the "quartz.properties" file in deployed application


Path : Path to WAR\WAR Name\WEB-INF
    Quartz.properties


#=============================================================
# Configure Main Scheduler Properties
#=============================================================


org.quartz.scheduler.instanceName = QuartzScheduler org.quartz.scheduler.rmi.export = false org.quartz.scheduler.rmi.proxy = false org.quartz.scheduler.xaTransacted = false
#org.quartz.scheduler.instanceId = AUTO


#=============================================================
# Configure ThreadPool
#=============================================================


org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount = 100 org.quartz.threadPool.threadPriority = 4


org.quartz.scheduler.logger = schedLogger org.quartz.logger.schedLogger.class = org.quartz.impl.Log4jLogger


#=============================================================
# Configure JobStore
#=============================================================


org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT
org.quartz.jobStore.driverDelegateClass =
org.quartz.impl.jdbcjobstore.StdJDBCDelegate


org.quartz.jobStore.dataSource = mfx_4_1_0_retail_xa
org.quartz.jobStore.tablePrefix = QRTZ_


#=============================================================
# Configure Datasources
#============================================================= org.quartz.dataSource.mfx_4_1_0_retail_xa.jndiURL = mfx_4_1_0_retail_xa org.quartz.jobStore.nonManagedTXDataSource = mfx_4_1_0_retail_xa org.quartz.jobStore.maxMisfiresToHandleAtATime=60000


org.quartz.plugin.triggHistory.class =
\org.quartz.plugins.history.LoggingTriggerHistoryPlugin
org.quartz.plugin.triggHistory.triggerFiredMessage = \Trigger \{1\}.\{0\} fired job \{6\}.\{5\} at: \{4, date, HH:mm:ss MM/dd/yyyy}
org.quartz.plugin.triggHistory.triggerCompleteMessage = \ Trigger \{1\}.\{0\}
completed firing job \{6\}.\{5\} at \{4, date, HH:mm:ss MM/dd/yyyy\}.


Configuration changes to be made
    Configure JobStore Section
Properties
org.quartz.jobStore.dataSource - Name of the data source created in weblogic to connect to the database


    Configure Datasources Section
Properties
org.quartz.dataSource.mfx_4_1_0_retail_xa.jndiURL = mfx_4_1_0_retail_xa org.quartz.jobStore.nonManagedTXDataSource = mfx_4_1_0_retail_xa


mfx_4_1_0_retail_xa in above properties is the data source name


6.  Weblogic environment settings changes for quartz integration
    Open the "setDomainEnv.cmd" file and add the following code snippet
Path : Installed
Drive\Oracle\Middleware\user_projects\domains\testdomain\bin
Snippet :
Search for "LOG4J_CONFIG_FILE%" in the file and before that line add the following snippet
    set
LOG4J_CONFIG_FILE="E:/Oracle/Middleware/user_projects/domains/c
redence/log4j.xml"
This is the path to log4j.xml file that we placed in weblogic above in the guide.


7.  Once the above changes are done restart the weblogic server and you will see
following messages flashing on weblogic console indicating the quartz status