Showing posts with label weblogic. Show all posts
Showing posts with label weblogic. Show all posts

Wednesday, January 27, 2010

Configuration: I-Planet as a proxy with Weblogic server

Steps To Configure WLS Plug-in in IPlanet Web Server

1. Install SunOne Web-Server.
2. Install WLS with the Plugin Option enabled.This option installs WLS with all the plugins files required for supported web-servers.
3. Refer BEA_HOME\weblogic92\server\plugin for plugin files.



















4.
Navigate to appropriate OS and copy the IPlanet plug-in files.


5. Plug-in file for (IPlanet)Sun Server is proxy61.dll

6.Paste the proxy61.dll file in Sun Server’s plugin\lib folder(SUNHOME\WebServer6.1\plugins\lib).



















7. The next is to edit the magnus.conf and obj.conf files of Sun Server and make entry for WLS plug-in(SUNHOME \WebServer6.1\https-beatest\config).




















8. The entries that should be made in magnus.conf file are:


(1)A LoadModule entry in Loadmodule specification.

Init fn="load-modules" funcs="wl_proxy,wl_init" shlib="C:/Sun/WebServer6.1/plugins/lib/proxy61.dll"
Init fn="wl_init"



















(2) Object specification in obj.conf for cluster environment.


Service fn="wl_proxy" WebLogicCluster="127.0.0.1:7003,127.0.0.1:7005" Debug="ALL" WLLogFile="proxy1.log"


127.0.0.1:7003,127.0.0.1:7005 is the cluster addresses to which the sun server redirects the request. The application is deployed on this cluster.




















(3) Object specification in module configuration for single server.


Service fn="wl_proxy"
WebLogicHost=127.0.0.1
WebLogicPort=7001
WLLogFile="proxy1.log"


9. After completing these specification start the Sun server.

10. Start the WLS admin server and all managed servers participating in the cluster.

11. Open the browser and type the request URL to the application deployed in the cluster.




Wednesday, December 2, 2009

Configuration: Diagnostics JDBC store Archive

The Archive component of the WebLogic Diagnostic Framework (WLDF) captures and persists all data events, log records, and metrics collected by WLDF from server instances and applications running on them. You can access archived diagnostic data in online mode (that is, on a running server). You can also access archived data in off-line mode using the WebLogic Scripting Tool (WLST).

Here, I have given steps which have to be followed to configure JDBC store Diagnostics Archive. Database used is: Pointbase

1) Create a Datasource from weblogic console with the JNDI name say: DS1
2) Create the following tables in Database:

a) wls_hvst

DROP TABLE wls_hvst;
CREATE TABLE wls_hvst (
RECORDID INTEGER IDENTITY,
TIMESTAMP NUMERIC default NULL,
DOMAIN varchar(64) default NULL,
SERVER varchar(64) default NULL,
TYPE varchar(64) default NULL,
NAME varchar(250) default NULL,
ATTRNAME varchar(64) default NULL,
ATTRTYPE INTEGER default NULL,
ATTRVALUE VARCHAR(4000)
);
COMMIT;

b) wls_event

DROP TABLE wls_events;
CREATE TABLE wls_events (
RECORDID INTEGER IDENTITY,
TIMESTAMP NUMERIC default NULL,
CONTEXTID varchar(128) default NULL,
TXID varchar(32) default NULL,
USERID varchar(32) default NULL,
TYPE varchar(64) default NULL,
DOMAIN varchar(64) default NULL,
SERVER varchar(64) default NULL,
SCOPE varchar(64) default NULL,
MODULE varchar(64) default NULL,
MONITOR varchar(64) default NULL,
FILENAME varchar(64) default NULL,
LINENUM INTEGER default NULL,
CLASSNAME varchar(250) default NULL,
METHODNAME varchar(64) default NULL,
METHODDSC varchar(4000) default NULL,
DROP TABLE wls_events;
CREATE TABLE wls_events (
RECORDID INTEGER IDENTITY,
TIMESTAMP NUMERIC default NULL,
CONTEXTID varchar(128) default NULL,
TXID varchar(32) default NULL,
USERID varchar(32) default NULL,
TYPE varchar(64) default NULL,
DOMAIN varchar(64) default NULL,
SERVER varchar(64) default NULL,
SCOPE varchar(64) default NULL,
MODULE varchar(64) default NULL,
MONITOR varchar(64) default NULL,
FILENAME varchar(64) default NULL,
LINENUM INTEGER default NULL,
CLASSNAME varchar(250) default NULL,
METHODNAME varchar(64) default NULL,
METHODDSC varchar(4000) default NULL,

3) Create a WLDF Module from Diagnostics > WLDF Module and target to a server

4) For the diagnostics module create a Collection Metrics for JDBCDataSourceRuntimeMBean

5) Click on Diagnostics > Archives and select the server for which we need to collect data.

6) Change the archive type to JDBC instead of File store and select the datasource which has to be used for JDBC store
















7) Deploy any application which used database connection as we have configured the diagnostics module for JDBCRuntimeMbean and access the application.

8) The data will be archived in the table wls_hvst :















References:

http://download.oracle.com/docs/cd/E11035_01/wls100/wldf_configuring/config_diag_archives.html






Use 81 style execute queues

From Weblogic 9.x onwards work managers are used instead of execute queues. Oracle provides a flag that enables you to disable the self-tuning execute pool and provide backward compatibility for upgraded applications to continue to use user-defined execute queues. Following steps can be followed to use 81 execute queues with later weblogic versions

1) Manually add the following in the config.xml:

AdminServer

true



Or we can add the following in JAVA_OPTIONS :

-Dweblogic.Use81StyleExecuteQueues=true

2) Start the server
















On adding this parameter we will get queue tab under server > configuration > Queue the console:
















Create a new Queue with the name: weblogic.kernel.default















We can edit the queue length and other parameters as in WLS8.1


Reference link:

http://download.oracle.com/docs/cd/E11035_01/wls100/perform/appb_queues.html#wp1048423





Production redeployment of application/ versioning/ side by side deployment

We need versioning for updating the application in production on runtime. The sessions which are already logged in will be using the previous version of the application and the new sessions created will use the new version of application.

1) In the application, Version-1 in MANIFEST.MF we need to add the following:

Manifest-Version: 1.0
Created-By: 1.5.0_04 (Sun Microsystems Inc.)
Weblogic-Application-Version: Version-1

Version-2 MENIFEST-MF
Manifest-Version: 1.0
Created-By: 1.5.0_04 (Sun Microsystems Inc.)
Weblogic-Application-Version: Version-1



2. Open a command window and browse to your domain bin directory.
3. start Admin server using Startweblogic.cmd.
4. Type setdomainenv.cmd to set your weblogic Domain.
5.Now to deploy the first version run the following command (please change as per your specifications):
C:\bea9.1\user_projects\domains\base_domain>java weblogic.Deployer -appversion 1 -adminurl http://127.0.0.1:7001 -username weblogic -password weblogic -deploy -name deployment_name -source c:/.../ -targets AdminServer
6. Now to Redeploy use the following command:
C:\bea9.1\user_projects\domains\base_domain>java weblogic.Deployer -appversion 2 -adminurl http://127.0.0.1:7001 -username weblogic -password weblogic -redeploy -name deployment_name -source c:/.../ -retiretimeout 120

7. We will get the version -1 application in retiring state in the console. The requests which were handled previously by this application will be handled by this version.
8. Version-2 application will have ACTIVE status and will be accepting new requests coming in to the application.

Reference:
http://download.oracle.com/otn_hosted_doc/wls/redeployment/wls-side-by-side-non-annotation_viewlet_swf.html