How to get the name of the server instance

Hi all!!

First of all, sorry if this is not the place to leave this question, but I didn't know where to post.

I have a weblogic 9.2 MP3 installed in a x 64 Redhat Linux. It is clustered in 2 cases.
An application is deployed in both cases, each request between two instances of balancing.

Of course, a request is responsed by only one instance, and I would like to know how to get the name of the instance that processes a request of some.

I read that I can send using recorded weblogic mbeans in this way:
InitialContext ctx = new InitialContext();
MBeanServer mbean = (MBeanServer)ctx.lookup("java:comp/env/jmx/runtime");
Then
ObjectName rs = new ObjectName("com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean");
Set beans = mbean.queryNames(rs, null);
And finally I iterate over the beans, but I'm not able to retrieve the name of the instance. I suppose that the object name is not appropriate.

However, I am able to get the name of the server and the two names of instances per a JMX connection to service:jmx:t3://localhost:7001/jndi/weblogic.management.mbeanservers.domainruntime, but this isn't what I want because I need to know what is the instance that is a certain demand.

Anyone know how I can do?

Thank you very much and sorry for the English xD

Published by: mamntc02 on 01/05/2010 05:10

That should do it...

private String getServerName() throws Exception {}
try {}
Context ctx = new world;
MBeanServer mbeanServer = (MBeanServer)ctx.lookup("java:comp/env/jmx/runtime");

String runtimeServiceName = "com.bea:Name = RuntimeService, Type = weblogic.management.mbeanservers.runtime.RuntimeServiceMBean;

Create ObjectName for the runtime
RuntimeService ObjectName = new ObjectName (runtimeServiceName);

Get the object for the ObjectName ServerRuntimeMBean name
ObjectName serverRuntime = mbeanServer.getAttribute (runtimeService, "ServerRuntime") (ObjectName);

Get the name of the server
String serverName = (String) mbeanServer.getAttribute (serverRuntime, "Name");
If (serverName == null) return "";
otherwise return serverName;
}
catch (Exception e) {}
throw e;
}
}

Tags: Fusion Middleware

Similar Questions

  • How to get the server port in the operation of the component.

    Hi all

    How can get port information no server in what component work.

    You can get by using sharedObects

    see this

    http://www.techartifact.com/blogs/2013/10/get-intradoc-server-port-in-custom-component-in-WebCenter-content-UCM.html

  • How to get the service instance?

    Hello

    Can you get it someone please let me know what API is used to connect to the host server? Should what steps I follow?

    I crossed one of the examples (http://blogs.vmware.com/developer/2009/07/vsphere-sdk-hello-world.html) posted on the community, but did not find the same APIs in the WSDL file that I

    I want to connect to the host of my (asp.net) web application server and perform various operations on it.

    To establish a secure channel SSL connection, you must use certificates on both server. Please refer to http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/sdk40setupguide.pdf , section to obtain server certificates, page 24, how to get server-side will convert.

    -Angela

  • How to get the control instance data in Bean managed when data mutiple controls exist

    Below is my way. This works if there is only one control. is there an api that can be used to get the instance of the data control by name?

            DCDataControl dc = BindingContext.getCurrent().getDefaultDataControl();
            if(dc != null){
                AppModuleImpl am = (AppModuleImpl)dc.getApplicationModule();
               ...
             }
    

    I don't want to use this medium orginial.

          String amDef = "model.AppModule";
          String config = "AppModuleLocal";
          ApplicationModule am = Configuration.createRootApplicationModule(amDef, config);
          ViewObject vo = am.findViewObject("ObjectView1");
    

    Hello

    I guess you have a binding method as the first activity in your stubborn workflow. Open your workflow in preview mode, right-click on your connection method and say «Go to the PageDef» This will create a definition file page for the binding of your method. You can use this to put the iterator binding that you want to access from your init method.

    Rami

  • How to get the Java instance variable in JSP custom

    Hello

    I decided to list some simple Java classes to use as instance variables. This should make it easier to do things with them in a JSP page since I know exactly what kind they are.

    My question is how to get my Java instance in the JSP page variable - I a screenflow with an Interactive component in what I would normally choose BPM interactive object call, but this allows BPM object instance variables not Java ones. So how can I associate my JSP custom?

    Thank you

    Neil

    In my view, that there must be a BPMObject that is passed into a JSP page. My suggestion would be to build a BPMObject as a "viewObject" with only the values you need and in the BPMObject constructor, load the java class data. And then possibly have a 'storeToJavaObj' method, you call after the JSP, which then stores the data to your java class if you wish.

    HTH...
    -Kevin

  • How to get the name of the server (hostname) vCO.

    Hello.

    Someone know how to get host name or IP address of the server vCO in a workflow running on this server? Is there any kind of property, or this method returns the host name of the local host?

    Thank you.

    Try this:

    function getVcoHostname() {
        var answerUrl = workflow.getAnswerUrl().url;
        var re = new RegExp('^(?:f|ht)tp(?:s)?\://([^/]+)', 'im');
        return answerUrl.match(re)[1].toString().split(":")[0];
    }
    
  • How to get the computer name - forms 10g

    Hello

    How to get the name of the server or some other identification forms 10g Application?
    We have several servers and host load balancing redirects user to the X Server and the forms application, I have to get information from the server to which the user was redirected? Is there a way how to do?

    It can be the name of the server, Ip or other identifying information...

    Thank you.

    As the client that connects to the database is the application server

    CHE_TEST@tcp_asterix_impl> select sys_context('userenv', 'host') from dual;
    
    SYS_CONTEXT('USERENV','HOST')
    ----------------------------------------------------------------------------
    LINZ\CHE-WS
    

    Should return you the host name of your application server.

    See http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions165.htm#SQLRF06117 for more information you can get with sys_context

    see you soon

  • How to get the name of the particular index table option.

    Hello

    Can any body tell how to get the name of the item to a particular array.i have a table within array.i must compare the name of Francesca in particular key.here is the table.

    myArray= Array (@43b1e09)
    [0] = object (@42b33f9)
    Testing_1 = Array (@4428821)
    [0] = object (@43adc19)
    choice_id = '0 '.
    delete = "N".
    DownloadURL = "xyz".
    selected = 'Y '.
    translation = "2_486."
    length = 1
    length = "N".
    Editable = 'Y '.
    field_id = '388 '.
    LanguageLink = 'Y '.
    linked_definition_id = null
    multiple values = "N".
    name = "Photo".
    otheroption = "N".
    photovitlink = object (@43ad0d9)
    required = "N".
    step = '1 '.
    translation = "Photo".
    visible = 'Y '.
    [1] = object (@43ad5d9)
    [2] = object (@4490089)

    Here is the structure of the table I get server side.i give table name of result as table myArray.This have several child as an object of object.each having .i table (Testing_1 in the first case) must get the name of this Testing_1 table and compare with my sort key that I perform an operation. But I am unable to get the name of this Testing_1 array(Since_it_is_dynamic_so_this_name_changes_some_times).can a body guide me how to get the name of this table.



    Thanks and greetings

    Vineet Sharma

    Hi Vineet Osho,

    You can browse your object using the loop and you can get the name of the table... as below...

    for each (var obj:Object in myArray)
    {
    for (var str:String in obj)
    {
    If (obj [str] is array)
    {
    var arrayName:String = str;
    }
    }
    }

    Thank you

    Jean Claude

  • How to get the IP address of the client when TCP connect on the server

    How to get the IP address of the client when TCP connect on the server.

    The only parameter obtained the login is the login ID.

    I assume you are using "Wait of TCP on the listening port" on the server. This returns the remote address and port (like out in option).

  • How to get the name of sbRIO programmatically

    How to get the 'name' and 'Comment' by sbRIO I write to sbRIO-9602 Max in the box of Identification (model, serial number, MAC address, name)?

    Use RT Information.vi of target is located under the range of public services under LabVIEW Realtime.

    Christian

  • How to get the name of the bluetooth device and the name of the bluetooth device address device class?

    Hi all

    Can I know how to get the bluetooth device name and the name of the bluetooth device address device class?

    Example:-if my bluetooth device address is :-98:EB:CD:01:1F::90 then how do I get my bluetooth device name?

    I hope you understand my problem. Let me know as soon as possible.

    :

    Thanks for the reply.

  • How to get the number and the name of the contacts selector

    Hi all

    I got the Contact Picker work but I have no idea how to get the selected telephone number and the name.

    There are attributes that I can put like contactId.value () to retrieve or there is another way?

    Thanks in advance.

    ImageButton{
                        defaultImageSource: "asset:///images/bluebutton.png"
                        onClicked: {
                            contactPicker.open();
                        }
                        attachedObjects: [
                            ContactPicker {
                                id: contactPicker
                                onContactSelected: {
                                    result.text = "You chose contact: " + contactId;
                                }
                            }
                        ]
    
                    }
    
                    Label {
                        id: result
                        text: "You chose contact: "
                    }
    

    Hello

    You can get the contact name and phone number as this,

    ImageButton{
                        defaultImageSource: "asset:///images/bluebutton.png"
                        onClicked: {
                            contactPicker.open();
                        }
                        attachedObjects: [
                            ContactPicker {
                                id: contactPicker
                                onContactSelected: {
                                    result.text = "You chose contact: " + contactId;
    // call a cpp method to get the details
    
    app.getDetails(contactId); } } ] } Label { id: result text: "You chose contact: " }
    

    the CPP code:

    void ContactDetails(ContactId id)
    {
    Contact contact_info = m_contactService->contactDetails(id);
    
        QString firstName = contact_info.firstName();
        QString lastname = contact_info.lastName();
            QList phoneno_list = contact_info.phoneNumbers();
    
        QStringList no_s;
    
        foreach(ContactAttribute attr, phoneno_list)
        {
            no_s << attr.value();
        }
    }
    

    You can get details like this.

    Kind regards

    Naresh Kodumuri.

  • When I try to connect to my remote server the message "an ftp error occurred - cannot establish a connection to the host." How can I get the server to which to connect with dreamweaver?

    When I try to connect to my remote server the message "an ftp error occurred - cannot establish a connection to the host." How can I get the server to which to connect with dreamweaver?

    After spending most of the day on this I found that my password required to upgrade... so two of my sites are now meet Dreamweaver. And the other will be taken care by the owner of the Web site. Thank you, Nancy!

    gay

  • How to get the host name of the physical computer inside a virtual machine until the user logs in Windows?

    I don't know if this is the right place to post this question, I develop software to support VMWare PCoIP and need to know how to get the host name of the physical machine (which manages the virtual machine and View Client) within a virtual machine before the user logs in Windows of the virtual machine.

    I understand there are two ways to read the host name, via the HKEY_CURRENT_USER\Volatile Environment registry and environment variables, but they are available once the user is connected. I need info before the user connects.

    Is there a VMware API that can be called or asked the host name?

    Thank you.

    Not on the broker, but there are the startup scripts to log on to the computer virtual itself: http://pubs.vmware.com/view-52/topic/com.vmware.view.integration.doc/view_integration_startsession_script.9.2.html

    Note that these executed when a virtual desktop computer allocated connection, not to the point that the client connects - it is possible for the customer to not complete the connection (crash, cancel, network failure) and so any what solution you design must handle this.

    Mike

  • How to get the Base name of the executable process

    Hi all
    I have a problem for the creation of SQL AnyWhere Plugin (Database Plugin). In this regard, ServerDetector class long pids [] = getPids ("State.Name.eq =?"). Instead of question mark that I place. And how to get the name of this executable process.

    Thanks and greetings
    Florent K Reddy

    Take a look at the doc following if you have not already:

    http://support.Hyperic.com/Confluence/display/Sigar/PTQL

    State.Name is the name of the base of the executable of the process, such as "dbsrv9.

    On 16 May 2007, at 23:24, fredo Reddy wrote:

    Hi all
    I have a problem for the creation of SQL AnyWhere Plugin (Database Plugin). In this regard, ServerDetector class long pids [] = getPids ("State.Name.eq =?"). Instead of question mark that I place. And how to get the name of this executable process.

    Thank you & best regards
    Florent K Reddy

Maybe you are looking for

  • Do I need an appointment of genius

    do I need an appointment of genius to sell my iPhone in-store?

  • If I reformat my iMac he will wipe away my iDevices when connecting to a new iTunes?

    Hello I want to reformat my iMac to a new configuration, because it didn't happen in 6 years. I wonder, once I reformatted the iMac how do reconnect you all iDevices without wiping those who, as I believe that if he has not connected before it gives

  • Need firmware for my Toshiba 32CV515D

    I need a firmware for that television, I don't find it anywhere and the tnt on it is just horrible. it freezes all the time. I have version 1.1. can someone tell me where I can download a newer version? I can't find anything by the tv or on the toshi

  • ProBook 430 G3: USB ethernet adapter cannot be enabled.

    Hello I have to connect the public network with integrated lan card and share another PC via the USB ethernet adapter. After installation of the USB adapter, the card is automatically disabled and it displays the error code 22 in Device Manager. Once

  • stop a VI when its FP is closed

    I'm having a problem getting the interaction I want between two VI, I did.  I have a high level of the VI page that allows the user to choose options for tests to execute.  When they choose a Subvi opens (and in the block diagram of high level VI, it