How to share one variable across multiple JVMs?

Hi,
How to share one string value across two applications, which are there in two different JVMs.
Requirement is, If I update one value(static) in first server through jsp, it should update second server static value too apart from first server.
I am using WebLogic 8.1, is there any MBean to access other application's static value?
Please suggest!
Thanks,
Murthy P

Welcome User in OTN,
to make two projects can access its classes you should goto the project property ---> Dependencies then add the other project.
in your case:
try to goto you Model project property ----> Dependencies ---> Edit Dependencies .
you will find your ViewController project. Expand it thin check to Build Output.
you can make this for ViewContoller project also as:
goto you ViewContoller project property ----> Dependencies ---> Edit Dependencies .
you will find your Model project. Expand it thin check to Build Output.
Sameh Nassar

Similar Messages

  • How to share a session across multiple jws?

    Hi!
    I have this problem.
    I'm looking for a way to have shared sessions, available across multiple JWS with WLW 8.1
    I try to get a session with this code:
    WebServiceContext wsContext = WebServiceContext.currentContext(); WebServiceSession session = (WebServiceSession)wsContext.getSession();
    but it throws COntextNotFoundException....
    I added the session descriptor in weblogic.xml to set the param CookiesEnabled to true, because I read that using this code works but requires that the client support cookies to keep the HttpSession object around.
    But it's not works!
    How can I get to HTTP session from a JWS?
    And....it's possible to share a session accross multiple JWS?
    Thanks a lot!

    You may be interested (& probably discouraged at the end) in this discussion http://forum.java.sun.com/thread.jspa?threadID=619170
    cheers,
    ram.

  • How to share one action to multiple UUT test?

    Hi,
    In fact, I don't know how to define the topic exactly.
    My request is like the following :
    For example, I have a signal generator and four UUTs.
    Signal Pattern 1 ON -> batch(4 UUT test...) -> Signal Pattern 1 OFF, Signal Pattern 2 ON -> Batch(4 UUT test...) ...so on...
    I got stuck how to put the action into the teststand and do once instead of 4 times.
    Something similar to the callback of  ProcessSetup, PreBatch, and PreUUTLoop,
    but I wonder if there is a way to call an action once within multiple UUTs in the MainSequence.
    Could someone give me some suggestion? Thanks a lot!
    Solved!
    Go to Solution.

    Hey William,
    You're probably going to want to use the "One Thread Only" option of a batch synchronization section to do this. It sounds like you're already using the Batch process model, so this should be fairly easy to implement. If it's a single step, you can go to the Synchronization tab of the step settings and change the Batch Synchronization setting. If it's multiple steps in a row, you could use the Enter Synchronized Section and Exit Synchronized Section modes of the Batch Synchronization step type.
    Also, we have an example that demonstrates this functionality. You can find it at <TestStand>\Examples\MultiUUT\BatchUUT.seq. If you look at the Set Chamber Temperature step, you will see that it is configured in this way.
    Daniel E.
    TestStand Product Support Engineer
    National Instruments

  • How to share projects/events across multiple users

    what's the best way to share projects and events for multiple users on the same computer?
    i want to be able to open fcpx in one user account and have access to all events and projects that i have access to as another user. basically, fcpx should look exactly the same in both accounts.

    Welcome User in OTN,
    to make two projects can access its classes you should goto the project property ---> Dependencies then add the other project.
    in your case:
    try to goto you Model project property ----> Dependencies ---> Edit Dependencies .
    you will find your ViewController project. Expand it thin check to Build Output.
    you can make this for ViewContoller project also as:
    goto you ViewContoller project property ----> Dependencies ---> Edit Dependencies .
    you will find your Model project. Expand it thin check to Build Output.
    Sameh Nassar

  • How to share Global Page across multiple applications

    Hi,
    I have APEX 4.2 via pl/sql gateway, Oracle 11gr2 DB and using theme 24.
    I have about 40 applications in 1 workspace and I need to create a global page that is going to be the same for each app. One way of doing this is I can manually do the change 40 times but I'm looking for an easier way.
    If you look at the packaged app "Dynamic Sample" you would notice a left sidebar which acts like a menu. Basically I want to do the same but just image each item on the sidebar belongs to a separate application.
    I have app1 which has the login and left sidebar navigation. Each option on the sidebar list would call a page on app2 to app40 but I need to retain the sidebar when displaying the page from a different app.
    If I tried to imp a global page I get an error that the application ID is different.
    If I tried to copy the global page to another app it changes the type to a navigation form which prevents the list from coming up for every page on the app.
    Thanks in advance!

    kvsinfo wrote:
    Hi,
    I have APEX 4.2 via pl/sql gateway, Oracle 11gr2 DB and using theme 24.
    I have about 40 applications in 1 workspace and I need to create a global page that is going to be the same for each app. One way of doing this is I can manually do the change 40 times but I'm looking for an easier way.Does the page have to be secure? If not can you create a new application without a login, put the "global" page there, and link to it from the other applications? Is there another way to put a generic page somewhere you can get to it outside Apex?
    >
    If you look at the packaged app "Dynamic Sample" you would notice a left sidebar which acts like a menu. Basically I want to do the same but just image each item on the sidebar belongs to a separate application.
    I have app1 which has the login and left sidebar navigation. Each option on the sidebar list would call a page on app2 to app40 but I need to retain the sidebar when displaying the page from a different app.
    If I tried to imp a global page I get an error that the application ID is different.
    If I tried to copy the global page to another app it changes the type to a navigation form which prevents the list from coming up for every page on the app.
    Thanks in advance!

  • How to share common classes across multiple projects in Jdeveloper?

    Hi Experts,
    I have a basic question.
    I am using Jdeveloper 11g and have divided my application into 2 projects (Model(ejb's) and Viewcontroller(jsf+managed beans etc)).
    The model project has a stateless session bean(named VisitingScholarBean) which uses a java bean class(named VisitingScholarDetails) defined in the ViewController project.
    The relevant Method in the stateless session bean is public void saveVSDetails(VisitingScholarDetails vsDetails).
    Now the issue is that the VisitingScholarDetails class is part of only the ViewController project but is being used in the Model project.
    So when I try to run the application it gives an error saying that
    weblogic.application.ModuleException: Exception preparing module: EJBModule(VisitingScholar-Model-ejb)
    [EJB:011023]An error occurred while reading the deployment descriptor. The error was:
    edu/nyu/ecoms/oaa/vs/web/backing/VisitingScholarDetails.
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
         Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: edu.nyu.ecoms.oaa.vs.web.backing.VisitingScholarDetails
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:176)I cannot replicate the same VisitingScholarDetails class in both projects as it will lead to duplication.
    Please let me know how to include the VisitingScholarDetails class in the ejb-jar without replicating it in the Model and View Controller projects.
    Thanks for your time and help.
    Edited by: user10376431 on Jan 24, 2010 6:25 AM

    Welcome User in OTN,
    to make two projects can access its classes you should goto the project property ---> Dependencies then add the other project.
    in your case:
    try to goto you Model project property ----> Dependencies ---> Edit Dependencies .
    you will find your ViewController project. Expand it thin check to Build Output.
    you can make this for ViewContoller project also as:
    goto you ViewContoller project property ----> Dependencies ---> Edit Dependencies .
    you will find your Model project. Expand it thin check to Build Output.
    Sameh Nassar

  • How to share one application's static variable in another application?

    Hi,
              How to share one string value across two applications, which are there in two different JVMs.
              Requirement is, If I update one value(static) in first server through jsp, it should update second server static value too apart from first server.
              I am using WebLogic 8.1, is there any MBean to access other application's static value?
              Please suggest!
              Thanks,
              Murthy P

    I'd need more information to recommend an appropriate approach.
              How often do you access this value? Can you make a remote call to retrieve it each time, or would that overhead be unacceptable? How are you handling HA? (ie what happens when a server fails). How often do these values change, and what is your tolerance for stale data?
              -- Rob
              WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • How do you share Aperture file across multiple users on same Mac?

    How do you share Aperture file across multiple users on same Mac? Seems this should be a preferences choice.

    When you share your library between users, you may run into permission and ownership problems, if both users are editing the Aperture library and not only reading it. To avoid that, it helps to put the Aperture library onto a separate disk or a separate partion of your hard drive. For s separate partition or disk you can enable the "ignore ownership on this volume" flag. Then all users can access the library as owners of this library.
    You might try to put the aperture library into a shared folder on your mac, but that has caused problems recently, i.e. when the library also contains video files.
    Regards
    Léonie

  • 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

  • How to create one TO for multiple TRs

    Dear All,
    how to create one TO for multiple TRs, kindly suggest me
    Regards,
    balu

    As for your question: it is discussed in sAP online help:
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/c6/f841f24afa11d182b90000e829fbfe/frameset.htm
    Sorry I misunderstood your question.
    The above mentioned solution won't create one single TO from multiple TR.
    Edited by: Csaba Szommer on Aug 11, 2010 9:46 AM

  • How to identify a user across multiple pages

    Hi,
    I'm doing a homebanking and I would like to know how to identify a user across multiple pages.
    I have already take a look at HTTPSESSION, but I didn't understand.
    Can someone help me.
    I'm send the servlet Logon.
    import java.io.*;
    import java.sql.*;
    import java.util.Date;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Cons_logon extends HttpServlet
         private Connection conexao = null;
         Login1 login1;
         public void init (ServletConfig cfg) throws ServletException
              super.init(cfg);
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   conexao = DriverManager.getConnection("jdbc:odbc:bank");
              catch (Exception e)
                   System.out.println(e.getMessage());
         public void doPost (HttpServletRequest req,
    HttpServletResponse res)
    throws ServletException, IOException
              String Suser, Spassword;
         PrintWriter out;
              res.setContentType("text/html");
    out = res.getWriter();
    String opcao = req.getParameter("log");
    Thanks

    I would recommend using the authentication mechanism that's guaranteed by the servlet spec. If you do that, you can just call
    request.getRemoteUser()
    to get the user name across multiple pages.
    If you want to use your own login scheme, you can create a new session object and map it to a user name somewhere in your app. Or you can just put the name of the user on the session. But the preferred way is to use the default authentication scheme defined by the spec.

  • Share http session across multiple EARs

    I am curious to know the following:-
    --> is it possible to share http session across multiple EARs running on same Weblogic application server.
    i.e weblogic server/Jboss
    --> is it possible to share http session across multiple EARs running on different Weblogic application server.
    i.e weblogic server/Jboss
    Please share the steps/way to acheive the same.

    What are you trying to achieve / accomplish by splitting it up?
    e.g. Clean Build in workshop will be faster for multiple EAR's , but unless you have all your application level libraries as shared libraries you might increase your runtime footprint. or you might want independent deploy/redeploy for your apps etc.
    If however you need the session to be shared , that these aren't really independent web-applications and shouldn't be separate ear's. In most cases though you dont actually need the session as shared (e.g. a user's data is fetched from the database , you dont really need the session shared, you need a single shared sign on). So when you say is the session shared, what is the data that you need shared? should it be in the session in the first place?
    And finally are these webapp's really independent (functionally ) or not?
    Edited by: deepshet on Oct 13, 2009 2:09 PM

  • How to share a bind variable across multiple view objects?

    Hi, Can someone tell me if it's possible to share a bind variable among multiple view objects within an application module? My web page displays data from different VOs on different regions. But all data should be controlled by the same bind variable, which appears in all queries. How can I achieve this?
    Please help.

    Best to state your JDev version, and technology stack (eg. ADF BC) when posting.
    I can think of 2 approaches.
    1) Create a parent VO based on SELECT :bindVar FROM dual, then create links between your other VOs and the parent
    2) Create a AM client interface method that programatically sets the bind variable in each VO.
    Can you specify your use case? This one tends to come up when discussing effective from/to dated queries.
    CM.

  • How do i apply one gradient across multiple live paint objects??

    I need to apply a single gradient acros a number of live paint objects but am finding it annoyingly hard to find a way.  I know that normally, to apply a gradient across multiple objects, you would need to make them all into one compound path but does this apply to live paint groups in any way??  Can what i need to achieve actually be done??
    Thanks for any help given 

    1. With the Live Paint selection tool, shift-select those shapes you want to unify with a gradient.
    2. Fill this (multi-shape) selection with your gradient. Now each shape is filled separately.
    3. With the gradient tool, drag across all of the selected shapes.
    "Annoyingly hard." Is that different than "hard"?

  • How to share dependant jars across rars & ears / avoid classcast exceptions

    <b>How can one share dependant jars between a ear application and a resource adapter and avoid getting a ClassCastException? </b>
    <P>
    In some appservers(such as Oracle) the resource adapter is the parent of your ear classloader, so a single instance multiple classloader problem doesn't occur. But in some appservers such as BEA Weblogic this isn't the case. Not sure why BEA decided to make resource adapter class loader seperate and not the parent of ear loader...
    <P>
    If I bundle the resource adapter specific classes in the corresponding module archive file, I will get a class cast exception, becos I will have a <i>single instance and multiple class loader situation</i> (assuming resource adapters uses its own classloader).
    <P>
    Second question related to the above: Web logic documentation recommends that we bundle the common files in APP-INF direcotory for embedded resource adapter apps. If I start bundling the resource adapter in an ear file, for every ear app we will have a rar bundled. What about the JNDI names? won't you have to rename the resource adapter differently for each ear so that there is no jndi name clash? Doesn't this defeat the purpose of having one common connector for all apps?
    <P>
    Here is a detailed description of what I want:
    Let say you have a ear file. Let's say there is a common.jar shared between your ear application (say the ejb module uses it), and your resource adapter.
    <P>
    In the case of Oracle's OC4J I can see there won't be any problem of having this common.jar part of the resource adapter(RA). When the RA class loader loads the rar, it makes sure the common.jar files are accessible in the chain of all class loaders it is a parent of. So, the ear loader, ejb loader etc...will have visibility -> hence no class cast exception.
    <p>
    But what do clients do when they want to have their ear deployable across multiple appservers not just oc4j. BEA recently changed their class loader structure...their resource loader is no longer parent of the ear, so the ejb app in the ear doesn't have visibility into common.jar packaged with rar. So, the only solution was to bundle the common.jar file with the ear. But this causes problems, because we can have a situation where certain object instances (that are not serialized or copied) can be shared across class loaders. This ends up in the single instance multiple class loader situation->hence classcastexception.
    <p>
    The only solution I found was to make the common.jar file a shared library. That way only one copy of the class files are there for both the rar and the ear and its visibility is there not only for rar but for ear since it is loaded by the system class loader or shared library class loader (if ther eis one such).
    <P>
    Please convey best practise recommendation.
    Sudhakar

    Pete <[email protected]> wrote:
    Is there a way to have a non-EJB jar at the EJB classloader level ? Sure, just add it to the Class-Path: manifest entry in your ejb.jar.
    Dimitri

Maybe you are looking for

  • Imovie wont open because of razer audio plugin

    Since the newest imovie updated I cannot open it. I Get an error that says quite unexpectedly because of the Razer Audio plugin. The only Razer software I have is for my mouse. As far as im aware it has nothing to do with Audio, and I movie worked fi

  • Chinese problem in Java Mail "Subject"

              I got a problem in displaying the Chinese mail subject as described below           1. here is the code           Message msg = new MimeMessage(session);           msg.setFrom(new InternetAddress(from));           msg.setRecipient(Message.R

  • Discoverer desktop version

    I created the worksheet using oracle discoverer desktop version in report developer suite.How can i publish it to the web?

  • Flip 4 Mac

    Does anyone have experience with Flip4Mac? I am attempting to output a WMV file through Compressor 3.5.1 with Flip4Mac installed on my computer. I am not able to retain TC on the clip I am processing. Any other codec I choose (.h264, or Pro res) seem

  • Strange issue with font in Flash

    Hey everybody, I've stumbled upon a strange font behaviour while testing the new gallery in flash. Here's the problem: As you can see, in the picture - the letters are "up and down", some of them are like smashed from top a little. Tried diferrent br