Pages

Subscribe:

Ads 468x60px

Showing posts with label Weblogic. Show all posts
Showing posts with label Weblogic. Show all posts

Tuesday, October 18, 2011

Get the status of the applications in domain

In most of WebLogic domain environments we might have seen multiple applications deployed on WebLogic servers. It is difficult to check their status when server uses high CPU utilization. We can get the complete details by giving one input i.e., target-name.

We use navigate MBean tree more frequently while using interactive mode of WLST and in scripting. Here we can call any attribute from any MBean tree by using colon ':' at the MBean tree root. Here we go with a sample of  for you who struggling to understand navigate each and every time.

Please check the below code snippet and you can change as per your requirement.




#############################################################

# This script will get you status  applications which are deployed 

# in the Domain.         

# script get you the colorful output                         

# NOTE : You need to give target name as an input to the script                

# Author: Krishna Sumanth Naishadam                         

##############################################################

import sys



connect('username','password','t3://wl_admin_host:wl_admin_port')

targetName=sys.argv[1]

domainConfig()

apps=cmo.getAppDeployments()

for i in apps:

    navPath1=getMBean('domainConfig:/AppDeployments/'+i.getApplicationName())

    appID=navPath1.getApplicationIdentifier()

    navPath=getMBean('domainRuntime:/AppRuntimeStateRuntime/AppRuntimeStateRuntime')

    sts=navPath.getCurrentState(appID,targetName)

    if(sts == "STATE_ACTIVE"):

        print "\033[1;32m Status of " + i.getApplicationName() + ": " + sts + "\033[1;m"

    else:

        print "\033[1;31m Status of " + i.getApplicationName() + ": " + sts + "\033[1;m"

disconnect()

exit()

 

domain_app_status.sh
********************

WL_HOME="

# set up common environment

. "${WL_HOME}/server/bin/setWLSEnv.sh"



CLASSPATH="${CLASSPATH}:${WL_HOME}/common/eval/pointbase/lib/pbembedded51.jar:${WL_HOME}/common/eval/pointbase/lib/pbtools51.jar:${WL_HOME}/common/eval/pointbase/lib/pbclient51.jar"

read -p "Enter Target Name : " value1



"${JAVA_HOME}/bin/java" -Xmx124m -Dprod.props.file=${WL_HOME}/.product.properties weblogic.WLST domain_app_status.py $value1 $*


The lifecycle of deployment process happen in the following way:



The following Colors I had chosen for reflecting what state for a application on a server.
======
Status of APPNAME1: STATE_ACTIVE (Green Color)
Status of APPNAME2: STATE_FAILED (Red Color)
Status of APPNAME3: STATE_NEW (Red Color)


Monday, October 17, 2011

Weblogic portal 10.3.1 framework and UCM 10gR3 code works in Jdeveloper?

Question :

We are using weblogic portal 10.3.1 framework and UCM 10gR3. Now we want to use Jdeveloper (because we can integrate site studio using plugin) instead of weblogic workshop.
So my question is does the existing code works in Jdeveloper (because it supports Webcenter portal)?.

Answer :

No. Eclipse/Worskhop is the development IDE for WLP. While you can probably edit many of the WLP artifacts in JDeveloper, since they're mostly XML files, JDeveloper won't understand the WLP project structure, understand many of the libraries or know how to deploy to a WLP domain.

To start with Oracle SOA here are some of useful links

Oracle SOA Suite general
Oracle SOA Suite software

Oracle Application Integration Architecture
Documentation

Installation
Performance
API
Tutorials
Oracle Blogs
Oracle Forum
Oracle General
Useful tools
Webservice standards