How to check whether weblogic server is in DEBUG mode or not

Hi
I want to check in my OSB proxy whether weblogic server is in Debug mode or not?
IF abv thing is not possible ,
I have check whether server is in development mode or production mode from my OSB proxy service?
I m not able to find any doc on this??Please let me know how it can be done?
Thanks

There isnt any other way except for doing a Java Callout. In the callout method you can access the Domain/Server MBean for the information that you seek. Based on the callout result you can go ahead with the logic in your PS..
Here is a sample Java Code to get the Server Log Level and ascertain whether the server is in Production Mode or not.
package com.dell.mbean;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.Hashtable;
import javax.management.MBeanServerConnection;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServerErrorException;
import javax.management.remote.JMXServiceURL;
import javax.naming.Context;
public class MyConnection {
     private static MBeanServerConnection connection;
     private static JMXConnector connector;
     private static final ObjectName service;
     static {
          try {
          service = new ObjectName("com.bea:Name=DomainRuntimeService,Type=weblogic.management.mbeanservers.domainruntime.DomainRuntimeServiceMBean");
          catch (MalformedObjectNameException e) {
          throw new AssertionError(e.getMessage());
     * Initialize connection to the Domain Runtime MBean Server.
     @SuppressWarnings("unchecked")
     public static void initConnection(String hostname, String portString,
     String username, String password) throws IOException,
     MalformedURLException {
     String protocol = "t3";
     Integer portInteger = Integer.valueOf(portString);
     int port = portInteger.intValue();
     String jndiroot = "/jndi/";
     String mserver = "weblogic.management.mbeanservers.domainruntime";
     JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostname, port,
     jndiroot + mserver);
     Hashtable h = new Hashtable();
     h.put(Context.SECURITY_PRINCIPAL, username);
     h.put(Context.SECURITY_CREDENTIALS, password);
     h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,"weblogic.management.remote");
     h.put("jmx.remote.x.request.waiting.timeout", new Long(10000));
     try {
     connector = JMXConnectorFactory.connect(serviceURL, h);
     connection = connector.getMBeanServerConnection();
     } catch(JMXServerErrorException jmxSE)
          jmxSE.printStackTrace();
     catch(Exception ex)
          ex.printStackTrace();
     public static String getLogSeverity(String hostName, String portName, String userName, String password) throws Exception {
          initConnection(hostName, portName, userName,password);
          connector.close();
          ObjectName domainConfig = (ObjectName) connection.getAttribute(service,
          "DomainConfiguration");
          ObjectName logMbean =(ObjectName) connection.getAttribute(domainConfig, "Log");
          String logFileFilter = (String) connection.getAttribute(logMbean, "LogFileSeverity");
          System.out.println("Log File Filter= "+ logFileFilter.toString());
          return logFileFilter;
     public static boolean isProductionModeEnabled(String hostName, String portName, String userName, String password) throws Exception {
          initConnection(hostName, portName, userName,password);
          connector.close();
          ObjectName domainConfig = (ObjectName) connection.getAttribute(service,
          "DomainConfiguration");
          boolean prodEnabled= (Boolean) connection.getAttribute(domainConfig, "ProductionModeEnabled");
          System.out.println("Is Production Mode Enabled=" +prodEnabled);
          return prodEnabled;
Make sure you have wlclient.jar and wljmxclient.jar as your dependent libraries.

Similar Messages

  • How to check whether a Document in KM is classified or not using JAVA API

    Hello Everyone,
      Can anyone tell me, How to check whether a Document in KM is classified or not, using JAVA API's??
    Thanks & Regards,
    Adren D'Souza

    Hi,
    The code is as follows:
    IIndexService indexService = null;
    try {
       indexService = (IIndexService) ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
    } catch (ResourceException e) {
       if (indexService == null) {
         log.errorT("Error on instanciating the index service");
         return this.renderMessage(this.getBundleString(RES_NO_INDEX_SERVICE), StatusType.ERROR);
    // get index
    IIndex index = null;
    try {
       index = indexService.getIndex("YourIndexID");
    } catch (WcmException e1) {
       log.errorT("Error when trying to get the index");
       return this.renderMessage(this.getBundleString(RES_NO_INDEX), StatusType.ERROR);
    // check if the index is a instance of AbstractClassificationIndex
    AbstractClassificationIndex classiIndex = null;
    if (index instanceof AbstractClassificationIndex) {
       classiIndex = (AbstractClassificationIndex) index;
    } else {
       log.errorT("The index " + index.getIndexName() + " is no classification index");
       return this.renderMessage(this.getBundleString(RES_NO_CLASSIFICATION_INDEX), StatusType.WARNING);
    //give your KM Resource here for which you want to know if it is classified or not
    boolean classified = classiIndex.isDocClassifiedInAnyTax(resource);
    Regards,
    Praveen Gudapati

  • How to check whether my iphone 5 is factory unlocked or not??

    how to check whether my iphone 5 is factory unlocked or not??

    Did you buy it unlocked at full, non-subsidised price?  If not, then it's not unlocked.

  • How to check whether JVM is running in interpreted mode

    I have launched JVM with -Xint option , but thread dump file doesn't include Monitor cache dump. AppServer is starting with -Xint but it is not logging Monitor Cache Dump. How will I check whether JVM is running in interpreyed mode or any other way to get Monitor Cache dump in Thread dump?

    Add -showversion to the command line and look for
    java -Xint -showversion Hello
    java version "1.6.0"
    Java(TM) SE Runtime Environment (build 1.6.0-b105)
    Java HotSpot(TM) Server VM (build 1.6.0-b105, interpreted mode)
    If you're running with the JIT, you'll see something like
    java -showversion Hello
    java version "1.6.0"
    Java(TM) SE Runtime Environment (build 1.6.0-b105)
    Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode)

  • How to check whether a char string is in uppercase or not

    Hi,
    I know how to convert strings to change strings to uppercase or lowercase, but is there any function to check, beforehand, if the field is in uppercase, for instance ? The intention here is simply to spare processing in situations where the string is already in uppercase, and thus not needing any further processing (given I want to turn the string into uppercase.)
    Thanks in advance,
    Avraham

    Hi Avraham ,
    To check whether the string is in upper case or not use CA keyward.
    To check  try the following code  ---
    DATA : W_STRING(5) TYPE C,
    W_ABCDE(26) TYPE C VALUE 'abcdefghijklmnopqrstuvwxyz'.
    w_string = 'abcd'.
    IF W_STRING CA W_ABCDE.
    TRANSLATE w_string TO UPPER CASE.
    ELSE.
    MESSAGE 'It is a uppercase string' TYPE 'S'.
    ENDIF.
    Try this link  this will definitely help you -
    https://wiki.sdn.sap.com/wiki/display/ABAP/Validationofastringintermsof+case
    Regards
    Pinaki

  • How to check whether Weblogic is hung /up with a Unix script

    Hi
    I would like to write a script for monitoring the weblogic server. I want to have a script that checks the weblogic once in a while if it's up and running. if not running, will send an email to me
    Please tell me what is that file name in weblogic that tells me this thing .
    Thanks for reading.

    This can't be answered without knowledge of your environment and how you run your WLS (version ?).
    The simplest way is to use a pgrep unix command and check for the right process (i.e. the name of the wls server).
    You have to keep in mind, that there might be several processes (i.e. one for the node manager one for each server).
    Timo

  • How to check whether java.sql.Connection has been dropped or not

    Hi,
    How can i check whether the connection is dropped from the database or not by using java.sql.Connection API.
    Thanks

    There's a few ways to check Connections, each with a different use:
    (1) conn.isOpen()
    (2) conn == null
    (3) the last one is a little more involved and adds some overhead. You can run SELECT 1 FROM dual; (Oracle) or SELECT 1 (MSSQL) and check for exceptions.
    The only way to check a connection, as far as I know, is to use it. That said, there must be a better way???

  • How to determine if the server is in debug mode or Running in Java Code

    Hi ,
    I have a WebDynpro Applcation in which i have to display foll things in Table:
    Engine Name; Engine Version: Debug Mode; Reserved by;
    Now i could display list of servers but i have hardcoded the Debug Mode as "Disabled"
    My Question is:
    If i know the Server, can we find if the server is in debugmode in application code???
    I have OS access to my Engine. Pls let me in which property file can i find Debug Status??
    Also i am not sure if i have posted the Query in RIght Component. DO let e know if this Q is posted in wrong Forum
    Kindly help me solve this problem
    Thanks n Regards,
    Archana

    Hi Archana,
    If u can't start the server in debugging mode thru NWDS then u can try this
    Config Tool:
    U can enable the debuggine mode from the Config Tool as well. Just browse to following
    C:usrsap<SID>JC<SYS_NO>j2eeconfigtoolconfigtool.bat
    Click on the your instance. Then under the tab VM Environment, Set the DebugMode = true.
    Restart the engine now. This will open the J2EE server again in the Debug Mode.
    Please check the [Debugging Portal Applications or WebDynpro Applciation|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/907751e5-f717-2a10-f3b4-de4431d4722d?quicklink=index&overridelayout=true] and search for SDN
    Just hope this helps you!
    Regards
    Vijay

  • How to check whether the Application Server directory exits or not

    Hi,
    I have a selection screen in which I give the Application server file name(UNIX file) as input. Here, I would like to check whether the Server directory exists or not.
    Let us say, the path I gave in the selection screen is /usr/sap/tmp/testfile.txt . Here, the file name is testfile.txt and the server directory is /usr/sap/tmp . I would like to check whether this directory /usr/sap/tmp exists in the server or not. I am not bothered about the file name as I am going to write data into the file. I am mainly concerned about whether the directory exists in the server or not. and one more thing... this is the Application Server path not the Local path.
    Can anyone help me on the same how to check whether the server directory exists or not.
    Thanks in advance.
    Best Regards,
    Pradeep.

    Also you can use the FM EPS_GET_DIRECTORY_LISTING for this purpose.
      Store the directory name
        l_dpath = p_file+0(l_no).
      Validate the directory of the application server
        CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
          EXPORTING
            dir_name               = l_dpath
          TABLES
            dir_list               = l_i_dlist
          EXCEPTIONS
            invalid_eps_subdir     = 1
            sapgparam_failed       = 2
            build_directory_failed = 3
            no_authorization       = 4
            read_directory_failed  = 5
            too_many_read_errors   = 6
            empty_directory_list   = 7
            OTHERS                 = 8.
      If any problem occurs with the directory then display proper
      error message
        IF sy-subrc <> 0.
        Display error message
          MESSAGE e018 WITH 'Problem with directory entered'(008).
        ENDIF. " sy-subrc <> 0
    Regards,
    Joy.

  • How to check whether user login in SNC mode or Non - SNC Mode

    Hi
    When SNC is enabled system will accept secure network connections. But,It is up to the user to login in SNC mode or NOT.
    Can any one let me know How to check whether user login in a SNC mode / Non-SNC mode?. Is it only through SU01?.
    Is there any other possibility?. where to check if user login through RFC connections?.
    Please correct me if i am wrong.
    Regards
    Srinivas P.

    Hi,
    Where to check if user login through RFC connections?
    Check T-Code SM04 on every instance. In the column Type you can see what kind of login has been used (GUI, RFC, Plugin, System).
    But,It is up to the user to login in SNC mode or NOT.
    Depends. Check these [parameters|http://help.sap.com/saphelp_nw04/helpdata/EN/19/164442c1a1c353e10000000a1550b0/content.htm]:
    snc/accept_insecure_cpic     
    snc/accept_insecure_gui      
    snc/accept_insecure_r3int_rfc
    snc/accept_insecure_rfc      
    Regards,
    Sven

  • How to check whether socket or servlet mode?

    HI
    What are the various ways to check whether forms server is in socket mode or servlet mode.
    Thanks
    JIL

    You can check context file also
    you can confirm form server is set at servlet mode by
    -bash-3.00$ grep s_frmConnectMode $CONTEXT_FILE
    <forms_connect oa_var="s_frmConnectMode">servlet</forms_connect>
    -bash-3.00$
    socket mode by,
    -bash-2.05b$ grep socket $CONTEXT_FILE
    <forms_connect oa_var="s_frmConnectMode">socket</forms_connect>
    -bash-2.05b$ grep
    Suresh
    http://applicationsdba.blogspot.com

  • How to check whether campaign has been uploaded to online server

    Hi,
    How to check whether campaign has been uploaded to online server by using SQL analyzer
    Thanks,
    Rasheed

    Hi Rasheed,
    To quickly check if the campaign has been uploaded from MSA to the server, you can check the TR_STATUS column on the SMOPCCAMPN table for your campaign, if the value is P000 or P*** then it has been uploaded to the server and is waiting for confirmation, if the status is O, it has been uploaded and created in the server.
    Best Regards,
    Ankan

  • How to check whether a Oracle server is installed or not ?

    Hi,
    How cani check whether a Machine has oracle server installed or not ?
    I have a machine where i have the client tools installed but not server. In that case how can i check whether this machine has oracle server is installed or not?
    Thanks in Advance..

    user11000236 wrote:
    Hi,
    How cani check whether a Machine has oracle server installed or not ?
    I have a machine where i have the client tools installed but not server. In that case how can i check whether this machine has oracle server is installed or not?
    Thanks in Advance..http://tinyurl.com/ngunhv
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • How to check whether User is alreadylogged in or not

    Hi..I want to check whether Particular User is already logged in or not ?? I had userid,password and status in my database.
    If anybody shows me how to implement it ??
    Reggards
    Chintan

    If you want to prevent multiple logins happening, use a profile on the database server that limits a login to a set number of simultaneous connections.
    If you just ant to check which users are logged in, the v$session table will have that information.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to check Whether the File is in Progress or used by some other resource

    Hi All,
    I am retrieving a file from the FTP server using Apache commons FTP.
    I need to check whether the file is fully retrieved or in progress.
    for now i can able to use the file which is partially retrieved. it is not throwing any file sharing exception or i am unable to find whether it is in progress.
    How to check whether the file is in progress ? or The file is accessed by some other resource ?
    Pls Help me.
    Thanks,
    J.Kathir

    Hi Vamsi,
    Explicitly such kind of requirement has not been catered and i dont think you would face a problem because any application that is writing to a file will open the file in the read only mode to any other simultaneous applications so i think your concerns although valid are already taken care off .
    In the remote case you still face a problem then as a work around. Tell the FTP administrator to set the property to maximum connections that can be made to ftp as one. I wonder if you have heard of the concept of FTP handle , basically the above workaround is based on that concept itself. This way only one application will be able to write.
    The file adapter will wait for its turn and then write the files.
    Regards
    joel
    Edited by: joel trinidade on Jun 26, 2009 11:06 AM

Maybe you are looking for

  • How to allow the user to upload a file from their desktop to MII Server?

    Hi, Is there a way for the user to specify a file on their local computer to upload to the MII server for processing?  We have a method that works for uploading from a shared network drive, but now the need/desire is to allow the user to upload a fil

  • Is there a way to access iTunes 10 from an iPhone 5?

    When I plug my iPhone 5 into my 2008 iMac Intel to charge it says I have to upgrade to the newest iTunes software, and won't recognize it as a camera or a phone.  I've been loathe to upgrade because my 2005 iMac is where I have my main iTunes library

  • Can't use pitch and time machine

    Hi, I've got a big problem with audio files. When I go on the sample editor and I select all the sample I can't use on the menu factory the following functions : time and pitch machine, grove machine and many others the only functions which are avala

  • [SOLVED] Grub Error 17 and other not so fun stuff

    Booted today and greeted by grub error 17. I booted from Arch Live CD fdisk -l looks ok fdisk /dev/sdb x,f,w   nothing done, proper order ok, let's chroot my install and install grub mount /dev/sdb1 /mnt unknown filesystem type, doh mount -t ext4 /de

  • Curved line - curved on both sides?

    I'm trying to create a line that bends for a diagram about piping. when I create the line and in the Stroke options - choose round corners, or outline the path and use the "round corners" effect - the corners are rounded on the outside of the bends b