Multiple JVMs and WL6?

I'm on a project where a Startup class initializes a Singleton object that will
be accessed from EJBs. My question is this: Are we guaranteed that all EJBs
exist within a single JVM on each app server? Is there ever the possibility that
diferent EJBs may be in different JVMs in the same server instance?
Thanks in advance
Daniel Shapiro

It has always been that way, including version 5.1.
Michael Girdley
BEA Systems
Learning WebLogic? http://learnweblogic.com
"SharonR" <[email protected]> wrote in message
news:3adc017f$[email protected]..
Does weblogic5.1 behave the same ?
Is this the new declared behaviour of WL6 or will it be changed in the
future ?
"Michael Girdley" <----> wrote in message
news:3adbdb7a$[email protected]..
No. Today, WLS 6 uses only a single JVM per WLS instance.
Michael Girdley
BEA Systems
Learning WebLogic? http://learnweblogic.com
"Daniel Shapiro" <[email protected]> wrote in message
news:3adb72a5$[email protected]..
I'm on a project where a Startup class initializes a Singleton object
that
will
be accessed from EJBs. My question is this: Are we guaranteed that
all
EJBs
exist within a single JVM on each app server? Is there ever thepossibility that
diferent EJBs may be in different JVMs in the same server instance?
Thanks in advance
Daniel Shapiro

Similar Messages

  • Multiple JVMs foe One WL6.1 instance

    Hi,
    Is it possible to attach multiple JVMs to an instance of WLS6.1
    so that all JVMs will be self sufficient in serving client requests....
    If it is possible then any pointers in that direction..???
    regards
    aseem

    Each WL server runs in one JVM. If you want to have 4 JVMs, then run 4 WL
    servers in one cluster.
    "Aseem Rastogi" <[email protected]> wrote in message
    news:[email protected]..
    currently our App runs on 2 Iplanet App Server ( they are in Cluster)
    and each App server has 2 VMs so we we are getting the feel of 4independent
    App Servers but Physically we are able to get away with only 2 boxes.
    We want to achive the same thing in Weblogic...
    thanx
    aseem
    Michael Reiche wrote:
    1) What is your requirement?
    2) Clustering.
    "Aseem Rastogi" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    Is it possible to attach multiple JVMs to an instance of WLS6.1
    so that all JVMs will be self sufficient in serving client
    requests....
    >>>
    If it is possible then any pointers in that direction..???
    regards
    aseem

  • Multiple JVM instances and host computer performance

    Hi,
    I was wondering if anyone has any facts or sources about how running multiple JVM instances impacts the performance of the hosting computer ?
    For example, say you have a long running server process that creates a JVM, how is the performance of the computer impacted if there are five of those processes running, versus ten versus ...
    This is a very "it depends" question, but I would like to get an idea of the baseline performance impact that comes with running a JVM, and if there is anyone here that has experience running multiple JVMs I'd appreciate any feedback, whether it's "don't do it, ever" or "no problem!"
    Thanks

    My only experience with multiple VMs is when I have several Java GUI apps (eclipse, jedit, dbvisualizer) plus tomcat and maybe an ant running on XP.
    I don't think that the existence of multiple VMs is in and of itself a problems, but JVMs do tend to be fairly memory hungry, so if you don't have a lot of RAM, you may find yourself crawling along as swapping heats up.
    I think that later versions of the Windows VM have started to take advantage of sharing certain core libraries, or pieces of them, so that you don't have as big an incremental memory footprint for additional VMs. I don't know which versions or how much this actually reduces the foot print of second and subsequent VMs though.

  • Communication between multiple JVMs

    We have a Java toolkit that is shipped as a JAR file. The toolkit is ported from a C++ DLL running on Windows. Therefore, in both instances (Java and C++), we can't control who loads us or when.
    I need to communicate between different JVMs running on the same machine. The communication is very simple: "Is this user logged on in your JVM?" I send a string to the other JVM and I get back a boolean. I don't need to worry about crossing machine boundaries. Also, I'm not expecting to have a huge number of JVMs running. Maybe 3 or 4 could be likely. However, the solution does need to scale in case there are more than that. I'm not setting a limit on the number of JVMs either.
    The C++ code handled this situation very easily and elegantly. It created a named system semaphore (mutex) whenever a user logged on. The name of the mutex was the username. So, if there were multiple instances of the DLL running in separate processes (EXEs), we could easily tell if this user was logged on in another instance. We'd try to create the system semaphore - it would fail saying the name already exists. Therefore, we'd know the user was already logged on. The named system semaphore provided the means for a machine-global list - which is exactly what we wanted. It also had this extra benefit: if the process terminates normally or abnormally, the system semaphore is removed from memory. This means: the application is terminated, the user is no longer logged on, and we can relog this user on.
    Therefore, I have 2 requirements:
    1) A machine-global list where we can place a string. Keep in mind, it doesn't absolutely have to be a machine-global list. A suitable means to talk to other JVMs is acceptable too.
    2) If the process exits normally or abnormally, the string(s) get removed (for this JVM) from the list. Abnormal termination is the more important one to focus on because lots of people of varying skill levels use our toolkit. Abnormal terminations can be common.
    The first thought is to store these in a file. That solves #1, but not #2. I've seen the JIPC package. However, I'm not too crazy about requiring 3rd party developers to start up another program (JIPC) before they start up their application. As I said, we're just a toolkit so we can't control when or who loads us. It's not totally out of the question, but I'd prefer something else.
    I have a fairly involved solution that involves sockets. The first JVM creates a ServerSocket on a specific port and becomes the server. Subsequent JVMs also try to create the ServerSocket on the same port. They get a BindException because the ServerSocket already exists, so they know they're clients. Then, they create a client socket and talk to the server that way. This gets a little hairy when the server goes away. The clients will scramble to become the server and then all the other clients need to reconnect to the new server.
    This proposed solution sounds like it will address both requirements. However, I'm looking for something simpler. I'm asking this forum for help in case there's an easier way to do this. I don't have the breadth of experience with Java yet to know if there's a simpler way to fix this. If I have to go with the socket solution, I will. I just didn't want to overlook something simple that is already built into Java.
    Thanks for any tips or suggestions

    Thanks for the response.
    FileLock. We still have to target JDK 1.3 so we can't use FileLocks (at this point)
    JNI: That's an interesting idea. I suspect many people are using our software on Windows. Therefore, we could probably fix it in Windows the same as in the C++ code. If they're not on Windows, we could use the Sockets approach.
    I also had another idea: how about hashing the username string into some integer (or long) value. Then use the hashed value to lock some other resource: like the port number passed to ServerSocket. I know ServerSocket only accepts 0 - 0xFFFF so this obviously won't work. But is there some other system-wide thing we could lock given an integral value?

  • JVM 1.3.1_06 Solaris 8 (sparc) multiple jvm's crash at the same time

    Hi All,
    I had multiple jvms crash all at the same time today morning, i was wondering if anyone had any similar issues with 1.3.1_06:
    Only a few jvms left an hs_errpid.log: here is the one with the most info:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : 10 occurred at PC=0xff02f8f8
    Function name=VerifyClassCodes
    Library=/www/gmgwh/weblogic/jdk/j2sdk1_3_1_06/jre/lib/sparc/libjava.so
    Current Java thread:
    at java.lang.Shutdown.halt(Native Method)
    at java.lang.Shutdown.exit(Shutdown.java:209)
    at java.lang.Terminator$1.handle(Terminator.java:33)
    at sun.misc.Signal$1.run(Signal.java:193)
    at java.lang.Thread.run(Thread.java:479)
    Dynamic libraries:
    0x10000 /www/gmgwh/weblogic/jdk/j2sdk1_3_1_06/jre/bin/../bin/sparc/native_threads/java
    0xff350000 /usr/lib/libthread.so.1
    0xff340000 /usr/lib/libdl.so.1
    0xff200000 /usr/lib/libc.so.1
    0xff330000 /usr/platform/SUNW,Ultra-Enterprise/lib/libc_psr.so.1
    0xfe400000 /www/gmgwh/weblogic/jdk/j2sdk1_3_1_06/jre/lib/sparc/hotspot/libjvm.so
    0xff2d0000 /usr/lib/libCrun.so.1
    0xff1e0000 /usr/lib/libsocket.so.1
    0xff100000 /usr/lib/libnsl.so.1
    0xff0d0000 /usr/lib/libm.so.1
    0xff1c0000 /usr/lib/libmp.so.2
    0xff090000 /www/gmgwh/weblogic/jdk/j2sdk1_3_1_06/jre/lib/sparc/native_threads/libhpi.so
    0xff060000 /www/gmgwh/weblogic/jdk/j2sdk1_3_1_06/jre/lib/sparc/libverify.so
    0xff020000 /www/gmgwh/weblogic/jdk/j2sdk1_3_1_06/jre/lib/sparc/libjava.so
    0xfe7d0000 /www/gmgwh/weblogic/jdk/j2sdk1_3_1_06/jre/lib/sparc/libzip.so
    0xfe3e0000 /usr/lib/locale/en_US.ISO8859-1/en_US.ISO8859-1.so.2
    0xfe390000 /www/gmgwh/weblogic/jdk/j2sdk1_3_1_06/jre/lib/sparc/libnet.so
    0xfe230000 /usr/lib/nss_files.so.1
    0xfe160000 /www/gmgwh/weblogic/6.1/sp4/lib/solaris/libmuxer.so
    0xfd0e0000 /usr/ucblib/libucb.so.1
    0xfd090000 /usr/lib/libresolv.so.2
    0xfd050000 /usr/lib/libelf.so.1
    0xfafd0000 /app/oracle/product/8.1.7.4/lib/libocijdbc8.so
    0xe1800000 /app/oracle/product/8.1.7.4/lib/libclntsh.so.8.0
    0xfafb0000 /app/oracle/product/8.1.7.4/lib/libwtc8.so
    0xfaf90000 /usr/lib/libsched.so.1
    0xfaee0000 /usr/lib/libaio.so.1
    Local Time = Wed Jan 19 09:09:31 2005
    Elapsed Time = 22367
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.3.1_06-b01 mixed mode)
    #

    hi there
    i would direct my efforts to search for the culprit on who generated the signal (either a INT, TERM or HUP). The crash occurred is just but another side-effect. The VM received a shutdown signal and shld exit. Just that while exiting, it crashed.
    There is this bug
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4904881
    Which is pretty rare. I am not sure if you are encountering this bug but if u have a core, a pstack of the core should show > 2 threads with doing the signal shutdown.

  • Multiple JVMs within app server - refresh of metdata not working

    Hi guys.
    We have an interesting scenario at present when running our application within a new test environment.
    Our web-based application has the facility to refresh it's application metadata. This should mean that the next time the browser refreshes (or a user logs in to the application), the application will display based upon the refreshed metadata structure.
    Previously, we have run our application on an app server with a single JVM without any dramas. ie. the refresh has always been reflected appropriately when viewing the application - as mentioned above.
    However, we have installed the application in a new environment where the refreshing of meta data does not work consistently. That is, only about 50% of the time does the data refresh correctly. This can be seen by pressing the refresh button in an IE browser, so that the refreshed data appears approx. every second time the button is pressed. The only notable difference with this environment is that it runs 2 JVMs within the app server.
    It seems that in this case, the 'old' data remains cached for the 'other' JVM, and that when the browser receives 'refreshed' data from the server, it does not always source from the same JVM.
    This situation can be resolved by restarting the OC4J container, but this is not a desireable solution.
    Is anyone aware of an OC4J parameter that can be set so that the 2 JVMs can run in synch so that both are refreshed appropriately when our meta data is cleared (refreshed) ? I don't believe this can be controlled within the Java source code, but I'm receptive to any other alternate solutions.
    Thanks in advance.
    Steve.

    I'd like to embed multiple instances of the JVM within
    a single, multi-threaded native server process. I'm
    aware this was not possible with the Sun JDK in the
    past.
    Is this still true (for JDK 1.4.1 say)?Yes, this is still true.
    If it's still not possible, are there any timetables
    as of when it might be available? No.
    Likelihood?Check the current list of JSRs at http://www.jcp.org.
    Ah, btw: Is support for VM unloading (during
    DestroyJavaVM()) available now?No.
    >
    In any case: does anybody know of a JVM
    implementation
    available for Linux which supports multiple VM
    instances within a single process?Why do you need multiple VMs? Would multiple separate 'processes' within a single VM work? If so, have a look at:
    http://www.cs.utah.edu/flux/janos/janosvm.html
    http://www.javagroup.org/echidna/
    Jim S.

  • Server, Multiple JVMs sources

    Hi,
    i've to create a (web serivce) server application. This application should be ready for clustering or something, if one server isn't fast enough.
    I know already some things abou concurrency in Java. I'm no Java newbie. But i don't know how clustering works.
    Does it depend on the used JVM?
    Or is this for every server (i.e. Tomcat, JBOSS, ...) different?
    What are the requirements in the webservice-layer and in the persistance layer?
    Any good internet pages/PDFs which discusses this?
    Any good books?
    I really hope some can help me here, because it's very important for me.
    Cheers,
    Ingo

    I just re-read the guidelines for a clustered web app over the weekend, so I think I've got things straight. Your application will have to be sensitive to two important issues:
    1) A class which was previously a singleton may now be instantiated in multiple JVMs. The most obvious side effect of this is that the init() method of any servlet will have a different ServletConfig object passed to it for each JVM it is initialized in. As a result, the application context is no longer a valid place to store information, since the change to the application context is not necessarily propagated to the other JVMs. However, context-params will still be available from all JVMs. Another noticable side-effect is that static variables no longer work as expected (since there may be multiple instances of the same class).
    2) The HttpSession object for a given session can only be in existence on one JVM at a time. If the HttpSession needs to migrate to another JVM, then it will be serialized and sent to the other JVM. As a result, adding an object to a session that is not Serializable may result in IllegalArgumentException being thrown. I'm guessing that in the case of a fail-over (node dies unexepectedly) that the HttpSession object is lost.
    Brian

  • Load balancing HTTP requests for an OC4J instance w/multiple JVMs

    Hello everyone,
    I am using OAS 10.1.3.1 and wish to load balance HTTP requests across an OC4J group of one or more OC4J instances, where each like named OC4J instance may have multiple JVMs or it may just have one JVM.
    My mod_oc4j.conf file would contain the following directives :
    Oc4jSelectMethod roundrobin:local
    Oc4jRoutingMode Static
    Oc4JMount /xyz/* xyz
    In the degenerate case, I would like to have an OC4J group with a cluster size of one, and have that one OC4J instance have two or more JVMs. I would like to be able to receive a request within my web application, determine that the JVM that has been sent the request is the wrong JVM to process the request, and then call HttpServletResponse.sendRedirect("/xyz"). Then, when the browser receives the HTTP 302 response and issues the subsequent HTTP request, have that request sent to a different JVM than the previous JVM that issued the sendRedirect().
    What I have seen is that the subsequent request is sent back to the same JVM that issued the sendRedirect(). I also call invalidate() against the HttpSession prior to calling sendRedirect(), but that does not seem to affect the behavior that I see.
    In the full blown case, I would have an OC4J group with a cluster size > 1, and each of those OC4J instances would have at least one JVM. In that case, I wish the sendRedirect() call to allow the subsequent request to be sent to any one of the OC4J instances in the group, and any one of those JVMs within all of those OC4J instances.
    Can anyone verify that my mod_oc4j mount directive is appropriate given the select method and routing mode? What else might I need to do to have a chance to have a different JVM respond to the request that results from a sendRedirect()?
    Thank you,
    Doug

    I should clarify that in the full blown environment, the OC4J instances that form a group will each be housed within a separate OAS instance that resides on its own machine.
    So ideally, a request could be inbound to say OAS instance 1 on machine A, OC4J instance AA, JVM 2, and I need to force a redirect so that the request can actually be serviced by OAS instance 3 on machine C, OC4J instance AA, JVM 1, and I need to be able to call sendRedirect() against an HttpServletResponse from within a JVM until the subsequent request from the browser, Internet Explorer in my case, is serviced by that JVM.
    Thanks,
    Doug

  • Multiple JVM in one server

    Hi,
    Can we run multiple JVM's on one Solaris server with different applications configured for different JVM's or may be configure a memory intensive application to multiple JVM's.
    Please let me know if this works and if there is any documentation for this.
    Any help is greatly appreciated.
    Thanks

    Pione J wrote:
    Can we allocate multiple JVM's to one application and i would really appreciate if you can provide me with some literature/suggestions as to how we can do this in Weblogic.Sure, it's called clustering and documentation is available here
    http://e-docs.bea.com/wls/docs81/cluster/overview.html
    Cheers,
    Gerald

  • Multiple JVM's in one JDK

    Hi,
    I am curious to know if one JDK spawning multiple JVM's cause any memory/performance issues. The reason being, my company is planning to have number of applications running in one Weblogic Server instance with Multiple JVM's spawning out of same JDK.
    Please let me know if this is possible and if there are any negative effects of following this approach.
    Any help is greatly Appreciated.
    Thanks

    JDK installation is a just binary. There is not limit on creating number of JVM runtime process.
    There should not be negative effect assuming you have enough capacity on hardware box.

  • Multiple JVM instances

    Dear all,
    I am trying to create multiple JVM instances using createJavaVM(...) but I can't do it. When I try to create the second instance, the function returns an error.
    Does anybody know about getting multiple JVM instances running??
    Thanks in advance,

    Hallo,
    createJavaVM(...) trys to create a JVM in your current
    process, so I am not surprised that you get an error
    the second time round, because there is already a JVM
    in the process. If you want multiple JVMs, each needs
    to be in its own process.
    Why do you want to create more than one JVM in your
    process? The JVM is multithreadable, and you can start
    more than one thread in the JVM. Would that do what
    you want?I need multiple instances because my application needs nearly 2Gb of memory and the maximum heap I get is 1700 Mb. I think with multiple instances, I'll get it.
    Do you know about getting a bigger heap??
    >
    David Singleton
    [email protected]

  • Running Multiple JVM's on same Server has OutOfMemory - PermGen Errors

    I have a scenario where I have 2 application servers. One is running one JVM and the other is running multiple JVMs.
    Both are configured with:
    -XX:+UseConcMarkSweepGC
    -XX:+UseParNewGC
    -XX:MaxPermSize=256m
    -XX:+CMSPermGenSweepingEnabled
    -XX:+CMSClassUnloadingEnabled
    The server that is running with only 1 JVM runs stable, however the server that is running multiple JVMs has frequent crashes due to OutOfMemory - PermGen errors. The only other difference is the Heap size. 512mb for each JVM on the app server with multiple instances and 1GB for the server with 1 instance. Is there a relationship/settings that need to be tuned when running multiple JVM's on the same server to avoid this?
    Thx

    The only other difference is the Heap size. 512mb for each JVM on the app server with multiple instances and 1GB for the server with 1 instance.This isn't a trivial difference. Basically you're saying "When I give the server 1 GB then it's okay but when I give it 512 MB it's not okay." If I saw those symptoms I would take them at face value to start with.
    So, turn off one of those servers on the machine that has two. Don't change anything else. Testable prediction: That won't fix your problem.

  • Multiple JVMs - What does it mean

    Hello,
    I was trying to understand this for quite a while. Googling around just obscured the use of the term.
    Could you please tell me what does it mean when I hear someone say :
    "This machine has multiple JVMs....." and ofcourse, how you can bring up just one amongst the many JVMs (by locally doing something or remotely instantiating it ) existing and running code there,
    How can I setup multiple JVMs on my desktop ?
    Thanks,

    C:\doku>java13 -version
    C:\doku>C:\langs\java\jdk1.3.1_19\bin\java -version
    java version "1.3.1_19"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_19-b03)
    Java HotSpot(TM) Client VM (build 1.3.1_19-b03, mixed mode)
    C:\doku>java -version
    java version "1.4.2_03"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
    Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
    C:\doku>java15 -version
    C:\doku>C:\langs\java\jdk1.5.0\bin\java -version
    java version "1.5.0_11"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)
    C:\doku>java16 -version
    C:\doku>C:\langs\java\jdk1.6.0_02\bin\java -version
    java version "1.6.0_02"
    Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
    Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode)

  • Singletons across multiple JVMs

    I have an EJB application container which is spread across multiple JVMs(something like a clustered EJB container). I am using a Singleton class to hand out 'running serial numbers'. Therefore there is a Singleton class per JVM(which is not very clean but i chose this path in the absence of anything better). Each singleton comes up when it is first invoked within a JVM and reads a starting running number and a pool of numbers from the database. This way multiple Singletons will not step on each other when doling out the serial numbers and there is no need to go back to the database for every request to the 'running serial number'.
    Is there some way to do some of the initialization within these Singleton's just ONCE across the multiple instances of the JVM ie. a real Singleton across multiple JVMs?
    Thanks
    Ramdas

    Pranav,
    thanks for your suggestions.
    the idea of using a Session bean to access a serialized object was one of my design options when i first implemented this, but then i decided against it because of the overhead of having to make an RMI call for every request to the 'running serial number'. The application being written is for a performance benchmark, and the request to the number being done at least once for every transaction, I chose to use Singletons.
    It is a clustered EJB container(not like most conatiners), in the sense that a single container is spread across multiple JVMs.
    Now if your application is getting clustured
    then you have a problem, in that what you can do is
    what object you have made put it in JNDI context and
    everytime you want to edit it pull it out edit and set
    it back. This will act a your singleton object in
    clustured environment accross JVM'sI did not fully understand the second part of your solution????
    Ramdas

  • Running multiple JVM's using JNI

    I am having problems starting multiple JVM's in our C++ application which is multi-threaded.
    Iam able to start one JVM but when I attempt to start the second JVM in a new thread it fails with
    the error of -5. This error states that a JVM is already running.
    Help!

    You can run more than one process that needs JVM using the AttachThread, DetachThread and GetCreatedJavaVMs calls.
    First determine to see if you have a JVM -- using GetCreatedJavaVMs. Check if you can get the environment pointer (GetEnv call). Then try AttachThread. Once you are done, do a DetachThread.
    This might give you a possible workaround/solution.
    Regards,
    Satish

Maybe you are looking for

  • HP Officejet 6000 will not connect to new wireless modem.

    I have Windows 8.1.  My HP Officejet 6000 E609n wireless printer worked well, until the modem died and a new one was installed (new address).  I need to know how to make it recognize the new network address.  (Note: I tried to install the original se

  • 2.1EA2: Pinning Query Results and changing Connections [fixed in 2.1.0]

    I am on 2.1EA2 (JDK 1.6.0_16) and been playing with the new SQL Worksheet pin query results functionality. I have found that it is possible to run a query against one connection, pin the results and then change connection and run the same (or a diffe

  • Auto start and shutdown 9iR2 on Mac OS X?

    Does anybody know how to set up Mac OS X to auto start and auto shutdown 9iR2 on Mac OS X?

  • Open NAT on PS3...

    How do I get an open NAT for my PS3? I have an E2000 and only have moderate NAT.

  • Imap in mail stopped working

    Mail stopped working and indicated fault with regard to IMAP settings. These have not been changed and always worked. The respective web and mobile interfaces work without issues.