MBeans and MBeanServer in different JVM

Hi,
Is it possible that MBeans reside in different JVM and MBeanServer reside on different JVM? If so, then how to get instance of MBean into MBeanServer, as it is needed to register that MBean into server.
or how its to be done.
Thanks in advance.Please Help.

Hi Jahnvi,
As I have already answered in this thread a few weeks ago:
http://forum.java.sun.com/thread.jspa?threadID=790563&messageID=4508174#4508174
what you describe is a use case for MBeanServer federation - aka Cascading.
You can set up a master agent/sub agent hierarchy where:
Each "subagent" JVMs has local MBeans registered in its MBeanServer, and starts
a JMXConnectorServer.
The "master" JVM (the JVM that the end client sees) uses JMXConnectors to talk to
access the MBeans registered in the subagents, and creates proxies for these MBeans
in its local MBeanServer.
The console then simply needs to connect to the "master" JVM, where it can see
all proxied MBeans.
The Java DMK has an API that allows you to set-up and control such a hiearchy.
A standard feature for federating MBeanServer is also in discussion for JDK 7.
See more info on my previous post here:
http://forum.java.sun.com/thread.jspa?threadID=790563&messageID=4508174#4508174
Hope this helps,
-- daniel
JMX, SNMP, Java, etc...
http://blogs.sun.com/jmxetc

Similar Messages

  • Generic Mbean and WLST

    Hi all,
    I am trying to create a generic Mbean that will hold properties for a web application. The property changes will be loaded from a file using WLST at runtime. I've been reading Weblogic docs and there are all kinds of mbeans and I am not sure which to use. If you can direct me on the right path I would appreciate it a lot I am new to weblogic and beans.
    Regards,
    Mo

    I am just going to explain a bit further.
    I have a web app and I am supposed to write an Mbean that has 1 property. based on that property the web app will behave differently. The requierments are to write the Mbean and then use WLST to change the property of the Mbean at deployment time.
    I know so far that I need to:
    Code the Mbean
    Register the Mbean with Weblogic MbeanServer
    but I am not sure how to proceed next. Any help is appreciated.
    Mo

  • Starting a specific managed server with a different JVM.

    Hello!
    We have a Weblogic (11g 10.3.6.0) Domain created using the Configuration Wizard (WL_HOME/common/bin/config.sh). This domain was configured to use Oracle JRockit JVM. So, all managed servers in this domain uses JRockit. But for some test/P.O.C reasons we want to configure a specific managed server (in this same domain) to run on top of Sun HotSpot. We need do this without change the domain's default JVM (Oracle JRockit).
    Is it possible?
    I tried many ways but now I'm a bit confused. Reading the DOC [1] I tried to change the setDomainEnv.sh to set the JAVA_VENDOR ('Sun') and JAVA_HOME (/path/to/sun/jdk). But in this way you change the JVM for whole Domain.
    If I change the Server's configuration using AdminConsole (ServerX>Configuration>Server Start page) and them start it using AdminConsole or NodeManager, it (partially) works. I mean, the server starts using Sun Hotspot JVM, but if you look at the command process used to statrt it, you can see something strange.
    "/opt/Oracle/java/ *jdk1.7.0_07* /bin/java -Dweblogic.Name=server-2 -Dbea.home=/opt/Oracle/Middleware11g -Djava.security.policy=/opt/Oracle/Middleware11g/wlserver_10.3/server/lib/weblogic.policy -Dweblogic.management.server=http://192.168.56.101:7001 -D *java.library.path* = */opt/Oracle/java/jrmc-4.0.1-1.6.0/jre/lib/amd64/jrockit:/opt/Oracle/java/jrmc-4.0.1-1.6.0/jre/lib/amd64:/opt/Oracle/java/jrmc-4.0.1-1.6.0/jre/../lib/amd64* :/opt/Oracle/Middleware11g/patch_wls1036/profiles/default/native:/opt/Oracle/Middleware11g/patch_ocp371/profiles/default/native:/opt/Oracle/Middleware11g/wlserver_10.3/server/native/linux/x86_64:/opt/Oracle/Middleware11g/wlserver_10.3/server/native/linux/x86_64/oci920_8 -D *java.class.path* =/opt/Oracle/Middleware11g/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/Oracle/Middleware11g/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:*/opt/Oracle/java/jrmc-4.0.1-1.6.0/lib/tools.jar*:/opt/Oracle/Middleware11g/wlserver_10.3/server/lib/weblogic_sp.jar:/opt/Oracle/Middleware11g/wlserver_10.3/server/lib/weblogic.jar:/opt/Oracle/Middleware11g/modules/features/weblogic.server.modules_10.3.6.0.jar:/opt/Oracle/Middleware11g/wlserver_10.3/server/lib/webservices.jar:/opt/Oracle/Middleware11g/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/opt/Oracle/Middleware11g/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar::/opt/Oracle/Middleware11g -Dweblogic.system.BootIdentityFile=/opt/Oracle/Middleware11g/user_projects/domains/base_domain/servers/server-2/data/nodemanager/boot.properties -Dweblogic.nodemanager.ServiceEnabled=true -Dweblogic.security.SSL.ignoreHostnameVerification=false -Dweblogic.ReverseDNSAllowed=false -server -d64 -Xms512m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m weblogic.Server"
    As you can see above, the server process are still using java.class.path and java.library.path with references to Oracle JRockit JVM.
    I've tested in x86_64 and Sun SPARC platform. On x86_64 the server starts with no problem. But on Solaris SPARC the server crashs during startup time.
    So, my question is: how can we solve this? Are the Node Manager using setDomainEnv.sh or commEnv.sh vars to set the java.class.path and java.library.path opitons?
    Thanks.
    [1] http://docs.oracle.com/cd/E23943_01/web.1111/e13708/overview.htm

    Hi,
    You can use a different JVM for specific managed server by editing parameters in server start tab from console. But if you want to change java.class.path and java.library.path with references from Oracle JRockit JVM to JDK hotspot, then you have to create separate commonenv.sh,setdomainenv.sh and startWeblogic.sh file for your managed server.
    java.class.path and java.library.path env variables generally generates from commonenv.sh file.
    Regards,
    Kishore

  • Communication between different JVMs

    Hallo,
    is there a simple way, to exchange data between different java sessions? At the moment I store the needed data to a table and load it in my java procedures when ever I need them.
    But because this data is temporary, it wouldn't really be necessary to store the data. It's just for communication between the different JVMs. Is there an other way to do this, too?
    Thanks, Christian

    Christian, I may have misunderstood your question, but, until java version 1.4, the only way for different JVMs to communicate was via sockets, or secondary storage (the file system -- which includes databases).
    In java version 5.0 (previously version 1.5), there is a new feature known as class data sharing.
    But since you posted to the "Database >> JVM" forum, I can't help thinking that you are referring to different database JVMs. Is that correct? In any case, sockets and secondary storage are your only options there as well.
    Good Luck,
    Avi.

  • Synchronizing threads of different JVM

    I have two threads running in two different JVMs. Now I want to synchronize these two threads calling a method.
    Can any one give me a solution for the same.

    I have two threads running in two different JVMs. Now
    I want to synchronize these two threads calling a
    method.
    Can any one give me a solution for the same.Presumably you think that the Java API has such a method. If so then the answer is no.
    You could write a bunch of code that uses sockets to send messages back and forth and then have one thread wait for a response. That isn't sychronization however. And conceptually it isn't a good idea to think of it that way either. Threads exist solely within a single process.

  • FLEX working with a different JVM...?

    Hey I need help for this, because I don't know how to do it.
    My flex builder 2 is working with a different jvm than the one
    installed on my pc. The one I installed is JVM 1.5 and the one that
    Flex Builder 2 is using is JVM 1.4, and I've been having really big
    problems when launching it, and I think this might be the problem,
    so i would really appreciate if someone could tell me how to make
    FLEX Builder 2 work with JVM 1.5 (which is the one I
    installed).

    open jvm.config
    and set java.home to the path where the JVM you want to use
    is

  • Timer MBean and Jconsole

    Hello,
    I'm using a javax.management.timer.Timer MBean and registering it with the local MBean server. Instead of adding notifications programmatically, I want to be able to do it from Jconsole.
    However, from Jconsole I can invoke any Timer operation (like removeNotification, etc.) except for all 4 addNotification operations, as they are all disabled.
    Is this not supported? Why are they disabled? Is there a way to enable these operations?
    I'm new to JMX and would appreciate any help.
    Thanks!

    Hi Eamonn,
    Thanks for the example! I have a follow-up question though:
    The example you gave uses a StandardMBean. Our application already has a DynamicMBean. Is it a good practice for dynamic beans to extend the timer class. Or should it only be done with standard mbeans?
    Also I've noticed that the listener that I registered and our DynamicMBean run in the same thread, so when the listener is running, the bean gets blocked and I cannot invoke any other operation. I found your blog about listeners and tried the following example but it doesn't help. How do I resolve this big issue?
    class myListener implements NotificationListener {
    private final Executor executor =
    Executors.newSingleThreadExecutor();
    public void handleNotification(Notification n, Object handback) {
    executor.execute(new Runnable() {
    public void run() {
    blockingOperation();
    My dynamic mbean looks like this:
    public class MyDynamicBean extends Timer implements DynamicMBean {
    myListener listener = new myListener();
    MBeanServer mbServer;
    public void register() {
    mbServer = MBeanServerFactory.newMBeanServer();
    ObjectName beanName = new ObjectName("MyDynamicBean");
    mbServer.registerMBean(this, beanName);
    super.start();
    mbServer.addNotificationListener(beanName, listener, null, null);
    protected Integer addNotification(String type, String message, long deltaMillis) {
    if (not registered)
    register();
    long dateMillis = System.currentTimeMillis() + deltaMillis;
    Date date = new Date(dateMillis);
    return super.addNotification(type, message, null, date);
    public void unregister() {
    if (registered) {
    ObjectName beanName = new ObjectName("MyDynamicBean");
    super.removeAllNotifications();
    m_mbServer.removeNotificationListener(beanName, m_listener);
    super.stop();
    mbServer.unregisterMBean(beanName);
    Any help is highly appreciated!
    Julia

  • Problem with storing and retriving a different langauge font in mysql

    hi,
    i have problem with storing and retriving a different character set in
    mysql database ( for example storing kannada font text in database)
    it simply store what ever typed in JTextField in database in the
    formate ??????????? and it showing ???????? .
    please what can i do this problem.
    thanks
    daya

    MySQL does not know about what type of Font you use or store. that is applicatioon specific. All it knows is the character set that you are storing and the data type and data. THere are something you should know when working with database and Java:
    1. make sure you know what character set is used for the database table.
    2. make sure you know what character set is used by Java (default to UTF-8 ..
    sort off - there are few character that it cannot save). You can enforce the
    character set being sent to the database by the String's getBytes(String charsetName) method.
    3. make sure the application you use to view the table use the correct character set
    if it use a different character set, then any character that it does not recogized
    will be replaced with a quetion mark '?'....eventhough the data is correct.

  • Is it possible to have 2 icloud accounts on one pc?  My wife and I have 2 separate itunes accounts and we have different music stored on our iphones.  She just recently got an IPAD and I will be getting one soon.  We would like to share ibooks purchased f

    Is it possible to have 2 icloud accounts on one pc?  My wife and I have 2 separate itunes accounts and we have different music stored on our iphones.  She just recently got an IPAD and I will be getting one soon.  We would like to share ibooks purchased from itunes.  If she stored it them on icloud, can I download it onto my ipad?

    How to use multiple iPods, iPads, or iPhones with one computer
    http://support.apple.com/kb/HT1495
    How To Best Use and Share Apple IDs across iPhones, iPads and iPods
    http://www.nerdsonsite.com/blog/2012/06/07/help-im-appleid-confused/
     Cheers, Tom

  • FLV Playback and Seekbar on different native windows in one Air application

    Hello Everyone.  I'm trying to make a simple video playback AIR application that utilizes the initial native window to house a transport control with a seekbar on it.  Once the application launches, it creates a second (new) window on my second screen and places a FLVPlayback instance on that new window.  Everything works just like it want it to except for one thing.  When the seekbar and FLVplayback instance are not located on the same window stage, the seekbar handle sticks to the mouse when trying to scrub through the video.
    I've added both the transport control and the FLVPlayback instance to the original native window as children and I have also added both of them to the new window as children and everything works just fine.  It's only when they are separated and located on different stages that the seekbar acts up.  When they are on the same stage, I can click on a point on the seekbar and the video jumps to that spot and continues to play and I can also scrub the seekbar, the video updates as I scrub, and when I release the mouse, the seekbar handle stays where I released the mouse.  When they on separate stages, the seekbar handle continues to follow the mouse movement without releasing it.  The video updates as the seekbar handle is moved due to it sticking to the mouse, but if I release the mouse, the handle is still moving with the mouse and the video is still being scrubbed.  Like I said, everything works great except for this and I have reached my limit with time spent on this issue.  Does anyone have any insight into this?
    Here's my code for the project.  This is my first AIR application, so I am coding it as I am learning, please be kind.
    import fl.video.*;
    import flash.display.*;
    import flash.desktop.*;
    import flash.events.*;
    import fl.video.MetadataEvent;
    import flash.geom.*;
    import flash.ui.Mouse;
    import flash.text.*;
    GLOBAL SETUP
    var flvControl:FLVPlayback;
    var MasterWindow = stage.nativeWindow;
    var screen1:Screen = Screen.screens[0];
    var screen2:Screen = Screen.screens[1];
    MASTER WINDOW SETUP
    this.loaderInfo.addEventListener(Event.COMPLETE,maximize);
    transControl.playPauseButt2.addEventListener(MouseEvent.CLICK, PlayButton);
    if (Screen.screens.length > 1){
              createVideoBKG();
              createVideoPlayer();
    GENERAL FUNCTIONS
    //Maximize the initial screen
    function maximize(e:Event) {
              MasterWindow.x = screen1.bounds.left
              MasterWindow.maximize();
              MasterWindow.stage.scaleMode = StageScaleMode.EXACT_FIT;
    //Hide Mouse Behind Video Window On Roll-Over
    function MouseRollOver(e:MouseEvent):void
              {          Mouse.hide()          }
    function MouseRollOut(e:MouseEvent):void
              {          Mouse.show()          }
    //Play-Pause Button Control
    function PlayButton(event:MouseEvent):void
                        if(transControl.playPauseButt2.currentFrame==1 ){
                                  transControl.playPauseButt2.gotoAndPlay(2);
                                  flvControl.play();
                        else {
                                  transControl.playPauseButt2.gotoAndPlay(1);
                                  flvControl.pause();
    function CloseWindow(e:MouseEvent):void
                        NativeApplication.nativeApplication.openedWindows[2].close();
    VIDEO BKG SETUP
    function createVideoBKG(e:Event = null):void{
              var newOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
              newOptions.type = NativeWindowType.LIGHTWEIGHT;
              newOptions.systemChrome = NativeWindowSystemChrome.NONE;
              newOptions.transparent = true;
              var videoBKG:NativeWindow = new NativeWindow(newOptions);
              if (Screen.screens.length > 1){
                        videoBKG.x = screen2.bounds.left;
              videoBKG.maximize();
              chromeSetup(videoBKG);
              videoBKG.activate();
    //Video BKG Chrome Setup
    function chromeSetup(currentWindow):void {
              var vidBKG = new video_bkg();
              vidBKG.name = "video_bkg2";
              vidBKG.addEventListener(MouseEvent.ROLL_OVER, MouseRollOver);
              vidBKG.addEventListener(MouseEvent.ROLL_OUT, MouseRollOut);
              currentWindow.stage.addChild(vidBKG);
    VIDEO Player SETUP
    function createVideoPlayer(e:Event = null):void{
              var newOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
              newOptions.type = NativeWindowType.LIGHTWEIGHT;
              newOptions.systemChrome = NativeWindowSystemChrome.NONE;
              newOptions.transparent = true;
              var videoPlayer:NativeWindow = new NativeWindow(newOptions);
              if (Screen.screens.length > 1){
                        videoPlayer.x = screen2.bounds.left;
                        videoPlayer.y = screen2.bounds.top;
                        videoPlayer.width = screen2.bounds.width;
                        videoPlayer.height = screen2.bounds.height;
                        videoPlayer.stage.scaleMode = StageScaleMode.NO_SCALE;
              videoPlayer.alwaysInFront = true;
              var DVR = new DVR_Player();
              DVR.name = "DVR";
              DVR.x = 0;
              DVR.y = 0;
              DVR.addEventListener(MouseEvent.ROLL_OVER, MouseRollOver);
              DVR.addEventListener(MouseEvent.ROLL_OUT, MouseRollOut);
              videoPlayer.stage.addChild(DVR);
                flvControl = DVR.display2;
              flvControl.width = 1280;
              flvControl.height = 720;
              flvControl.skin = null;
              flvControl.autoPlay=false;   
              flvControl.isLive=false;
              flvControl.fullScreenTakeOver = false;
              flvControl.align = VideoAlign.CENTER;
              flvControl.scaleMode = VideoScaleMode.NO_SCALE;
              flvControl.source = "olympics.f4v";
              flvControl.seekBar = transControl.seekbarContainer2.seeker;
              videoPlayer.activate();

    Does anyone have any ideas about this?

  • How do I share photos and music between different user accounts on the same macbook

    How do I share photos and music between different user accounts on the same Macbook? i.e. I want all to be able to access family photos when logged into their respective accounts. Same goes for the iTunes library. Hope this is possible...
    Thanks!

    To give other users read-only access to your iTunes library, use the Sharing features of iTunes. Sharing works over the local network as well as on the same computer. See the built-in help for details.
    To give others selective access to your iPhoto library, you have the option of using iCloud Photo Sharing, if the privacy implications don't bother you. The images will be stored temporarily on Apple servers.
    If you want to give full read/write access to more than one user, see the support articles linked below.
    iTunes: How to share music between different accounts on a single computer
    iPhoto: Sharing libraries among multiple users
    There is a way to share the library without moving it to a secondary volume. If you really need to do that, ask for instructions.

  • IPhoto and Aperture crash, different computers same, have rebuilt

    I have a newer model iMac with lots of extra memory. Hardware shouldn't be an issue, and my drives all check out as fine.  All formatted correctly.  But after working in iPhoto for about 10 minutes (just renaming things, not even editing), it will crash, and on reload there will be grayed out events, sometimes with pictures in them that I can duplicate so it fixes everything and sometimes just empty, and photos are missing permanently.   I am on a UPS, and I have current versions of all programs, most likely no conflicting software, no add ons.  (I only use apple software and Diablo.)
    I have tried rebuild, repair, permissions, etc. several times.  I have tried running the library off a different drive, and on a different computer with a different user.  Same problem. I tried the same thing with Iphoto Library Manager.  It rebuilt fine, but then crashed after use.
    I bought aperture thinking that might solve the issue, but it crashes too (far less often, like every hour or so instead of every 10 minutes) BUT even when not crashing it takes about 30 seconds of beachball just to rename a photo.
    I bought a jpeg checker program to see if there were issues, and it found 10 or so corrupted photos.  Not sure how to deal with this as you aren't supposed to modify the library directly in Finder, and I couldn't find the photos in iPhoto (same names as many other photos so not sure which is corrupt).
    ANY SUGGESTIONS? 
    iPhoto had no problems about 6 months ago, but have been having serious problems last two months.  Hadn't used it in between.
    My library is very large (59,000 photos).

    Next time it crashes post the crash log on here.

  • HT5622 My wife and I have different Apple ID's and passwords but I want to share the music library which is on iCloud under my Apple ID.  How do I set her up to share the music library that exists in iCloud?

    My wife and I have different Apple ID's and passwords but I want to share our music library which is on iCloud under my Apple ID.  How do I set her up to share the music library that resides on the iCloud under my Apple ID?

    You would need to go to Settings>iTunes & App Store, tap her ID, sign out, then sign back in with your ID.  However, if she has turned on automatic downloads, download previous purchases or signed into an iTunes Match account using her current ID, she would have to wait 90 days from when she first did this to change to another ID.  She can, of course, sync your music to her device using iTunes without changing her ID association.

  • My wife and I have different Apple ID, can we share our music on the two devices

    My wife and I have different Apple ID, can we share our music on the two devices

    You do not need to ask the same question twice. Stick with the first post that you started here.
    https://discussions.apple.com/message/21121337#21121337

  • I have made a burn folder with photos exported from I-photo.  It now shows in information, that the date is created and modified is different from the original digitized date.  How can I get the original date to show in the info from Finder?

    I have made a burn folder with photos exported from I-photo.  It now shows in information, that the date  created and modified is different from the original digitized date.  How can I get the original date to show in the info from Finder?

    The Finder reports File information. The date and time of the photo are in the Photo's Exif metadata. The Finder has no awareness of this. All photos apps on any system do.
    Regards
    TD

Maybe you are looking for

  • SJT Connect to Access DB to present Data within a Form

    Faily new to this product Live Cycle Designer 8.0. I have a large Access DB that identifies asset by Department. An Access Query links about 4 different tables to produce a detailed asset form/report. I would like to recreate this form report using t

  • Nvarchar2 data type

    Hi I have emp_ino table in oracle database 10g R2. emp_id Number(5); emp_name nvarchar2(50); I insert data through sql script its ok. In emp_name I used Arabic character. I creat A form module in oracle developer suite 10g R2 when I query record in f

  • REG:Oracle Audit Vault Agent Installation fails at the last step .

    Hi , I am installing Audit vault agent 10.3 and it is failing at the last on solarisis 10 sparc 64 bit . The error is OUI-25031:Some of the configuration assistants failed/cancelled. It is strongly recommended that you retry the configuration assista

  • Please answer me only One about iPhone sim?

    I'm from Georgia (not U.S.A), I live in Tbilisi...I like iPhone and I want to have it, but I'm asking you: does iPhone works with other GSM systems? can i put SIM CARD in it? how can i use iPhone if i live in Georgia? My friends want to send me as a

  • How do i troubleshoot "Sync encountered an error while Syncing: Unknown error." Windows 7 FF 4

    I was successful in setting up sync between my Eee pc and Atrix 4G. This weekend i started getting an unknown error and re-trying the sync does not clear it. I often had to retry the sync in the past but i assumed it was because of all the network ac