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/

Similar Messages

  • 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

  • How to prevent one application from touching the in use Environment?

    Hi, all,
    I have an application opening an Environment and using it well. However, this application may have multiple instance in our system. Once another instance touches the environment it will destroy the former's environment.
    My question is how to detect one environment which located in a fixed directory is being in use? If we could detect this, we can prevent the latter instance from touching the environment then.
    Thanks in advance.

    There are DB_CREATE and DB_EXCL flags for DB_ENV->open function, if you specify the OR of them both, you will get what you want: only create the environment if it is not created.
    On the other hand, multiple applications can join the same db environment if their configuration to the environment is compatible; if you are sharing an environment handle, use DB_THREAD in DB_ENV->open, see this for using Berkeley DB in multi-threads: http://www.oracle.com/technology/documentation/berkeley-db/db/ref/program/mt.html

  • How to communicating one application with another?

    I wanted to make a web site that have the ability to view,update,insert and delete record in a database. How to do that? How can one application communicate with another? example, I wanted to have XHTML communicate with Java and Java to communicate with my database that is pointbase database.

    Multi-tier application communication is a somewhat complex matter. It may be made using differents techniques and designs. But like Sum-shusSue said, a typical Java-based solution would use these Java technologies: JSP (Java Server Page) for the presentation side (the client), Servlet or EJB (Enterprise Java Bean) for the server-side logic. The communication with the Database is made through JDBC.
    I suggest that you take a look at the J2EE edition of Java. That stands for Java 2 Enterprise Edition and it is specifically made for enterprise system development, such as Servlet, JSP, EJB, etc...
    This is a whole lot of new subjects and, from my humble experience, it is not that easy. i.e. I would not recommend it for strict newbies. However, if you have some months of Java coding on your side, maybe you should take a look. You can check first the left menu of this site, you'll find, under Technologies the sub-menu J2EE. There's also, somewhere on the site, tutorials on differents J2EE topics. Finally, I would recommend you this book:
    Professional Java Server Programming, J2EE 1.3 Edition, edited by Wrox. Of course, there a lot of other books on hte market. J2EE is a hot topic!
    Hope this help...
    Simon

  • How to load value to a static variable on the run

    hi all
    i have a question about static variable. i need to have a variable to keep a value from DB shared by all instances. the variable is given value when the first instance is created. but from time to time, the value in DB may change, but i still need to maintain this shared value among instances. the static variable has life time as long as the program runs, does that mean if i need to change the value, i need to stop the program, and restart to load the new value? thanks.

    can the static variable be accessed within a
    non-static method, for instance, set the value by
    setXXX() method?Yes, and oddly enough, that usually how I access all my variables...
    Example...
    public class StaticTester {
           static String theString = " My Message ";
           public void setMessage(String mess){
                      theString = mess;
           public String getMessage(){
                      return theString;
           public static void main(String[] theArgs){
                      StaticTester myTest = new StaticTester();
                    System.out.println(myTest.getMessage());
                    myTest.setMessage(" a New Message ");
                 System.out.println(myTest.getMessage());
    }Hope this helps...
    - MaxxDmg...
    - ' He who never sleeps... '

  • How to host one application using different database connection on OAS?

    Hi,
    Jdeveloper - 10.1.3.4
    Application - ADF/BC
    Oracle Application Server - 10.1.3
    Above our the specifications for our application,
    We have two database schemas different for development and production therfore we have different databse connections for the two,
    we have one application which is in production and enhacements on the same application are done by the development team.
    Since we have two different schemas for developement and prduction we use different database connections for the application on development and production.
    The problem is our Model and View Controller project are same, only the database connection file changes that's why we are able to host only on application at a time on our OAS. This is probably because the URL generated by OAS for developemnt and prodyction application is same.
    Is there a way we can host two instances of the same application with two different database connections on the a single OAS.
    Thanks & Regards,
    Raksha

    Use different deployment profiles each with a different context root for your application?
    See: http://one-size-doesnt-fit-all.blogspot.com/2009/02/configuring-separate-dev-test-prod-urls.html

  • How to use the dynamical or static variable for ESSBASE cube name?

    Hi Experts,
    When I import ESSBASE Cube into physical layer, the cube name from ESSBASE is created automatically, such as H_Sales.
    I want to use the the static or dynamical variable for replacing the external name. So I try to create the static variable in RPD,such as cubeName, and use the following code
    'VALUEOF(cubeName)' into the textbox of external name.
    However, when I view the report in answer, it will generate the error message: Database VALUEOF(cubeName) does not exist.
    Is it possible to implement this functionality?
    Thanks..

    Hi,
    use <%=odiRef.getSchemaName("D")%>
    D as parameter if it is the Data Schema or W if you need the schema from Work Schema
    Your command will be like:
    select <%=odiRef.getSchemaName("D")%>.GER_LOT_EXEC_ODI('Fluxo', 1, 'C') FROM DUAL
    Works?
    Cezar Santos
    http://odiexperts.com

  • To use a static variable in another class,but report NullPointerException

    when TableMain is running,I run testRecord so that let TableMain add a occur informatin and
    happened time in a row in TableMain,but when I run testRecord,java report a NullPointerException and I dont know how to solve this problem,thanks for helping me to check my code;(error report info is in end)
    import java.awt.event.*;
    import javax.swing.table.*;
    import java.io.*;
    public class TableMain extends JFrame{
    JTable table;
    static OwnModel model;
    String[] columnHeader={"occur","time"};
    class OwnModel extends DefaultTableModel{
    public OwnModel(Object[] columnNames,int numRows){
    super(columnNames,numRows);
    public boolean isCellEditable(int row,int column){
    return false;
    public TableMain(){
    model=new OwnModel(columnHeader,0);
    table=new JTable(model);
    JScrollPane scroll=new JScrollPane(table);
    JButton save=new JButton("save record");
    JButton delete=new JButton("delete record");
    JPanel buttons=new JPanel();
    buttons.add(save);
    buttons.add(delete);
    JLabel sign=new JLabel("occur record");
    Container cp=getContentPane();
    cp.add(BorderLayout.NORTH,sign);
    cp.add(BorderLayout.CENTER,scroll);
    cp.add(BorderLayout.SOUTH,buttons);
    this.setSize(300,500);
    this.setVisible(true);
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    public static void main(String[] args){
    new TableMain();
    import java.util.Vector;
    import java.util.Calendar;
    import java.text.SimpleDateFormat;
    public class testRecord{
    public static void main(String[] args){
    SimpleDateFormat simpledf=new SimpleDateFormat("yyyy/MM/dd hh:mm:ss");
    String tableName="friends";
    Calendar occurtime=Calendar.getInstance();
    Vector record=new Vector();
    record.add("send 'desc' sql, "+"operated table is :"+tableName);
    record.add(simpledf.format(occurtime.getTime()));
    System.out.println("model is "+Guide.model);
    System.out.println("record is "+record);
    Guide.model.addRow(record);
    error report:
    model is null
    record is [send 'desc' sql,operated table is :friends, 2004/05/26 11:39:03]
    Exception in thread "main" java.lang.NullPointerException
    at testRecord.main(testRecord.java:14)

    but I just use this constructor once,never use twice
    with same jvm;I thinks my idea is not too very badIt's a public constructor (if I'm looking in the right
    place) - it could be called from anywhere. To
    intialize a static variable outside the declaration,
    use a static initializer:private static String whatever;static {
    whatever = "whatever";
    }Or simply (in this case):private static String whatever = "whatever";

  • How to clone one part of an image into another

    Is it possible in Aperture to clone one part of an image into another or as in windows fuse the photos together?
    Thanks

    This points directly to the difference between a digital image conversion and development program, and a graphics program.
    Development programs' tools adjust the color and luminance information in each pixel.  They do not (mostly) add any information to the pixels or to the image.
    Graphics programs are built around adding information to images (or blank canvases).  Rectangles, circles, text, other images -- these are all graphics elements which are combined to make a new image.
    Aperture is the former (and also a superb digital asset manager).
    The generalized workflow is this:
    Capture information using a digital camera
    Optimize that information (make the picture as good as possible) using an image development program
    Combine pictures and graphics elements to make new graphics using a graphics program
    There are many excellent graphics programs.  Photoshop is the best known and most used.

  • How to copy one application to a new workspace in the same HTMLDB instance?

    Hi,
    I have an application running in production and I need to duplicate it into another workspace in the same instance, using another db schema with imported objects from the original one, as my area here has just been split in two and now we need two separate development environments. I tried exporting it from the old workspace and importing into the new, but when I try to install the app (using a new id) I just can't do it through the htmldb interface, as i get a timeout and page not found. I tried then to run the dump script directly in the database, but I couldn't find any reference in the script to a new application id or workspace, and after trying I found out that it only changes the owner of my original app (as I chose owner override when exporting).
    Does anybody knows how should i do it to ?? Perhaps there are some variables in the script I could change to make it into a new app in a new wokspace ??
    PS. I'm using HTMLDB 1.5, and it would be very difficult to change to a new version right now.
    Thanks,
    Nelson Sattler,
    Brasília, Brasil
    Message was edited by:
    nsattler

    Hi nsattler,
    Assuming u have apps in workspace1 .And u want to import that apps and install it in new workspace2.So before that u need to create workspace2 pointing to the diff schema that u mentioned .
    Then import the apps and install.......i dont know why you getting timeout .Ideally it should not have any error except the version compatibility.If u export using 1.5 then u can import it into any upper version say 1.6 .
    One thing u can do run the exported script from sql*plus and track the error .If there is no workspace identified from HTMLDB interface that means ur exported file is not version compatible or u can change p_provisioning_company_id of sql file and put the value of ur present workspace p_provisioning_company_id and then try to run it from SQL*PLUS.
    I also suggest u to upgrade from 1.5 to 1.6 or 2.0 to get more benefit of the fixed bug....
    Cheers,
    ROSY

  • How to Share One iTunes Media Folder on a Windows Laptop and Mac Laptop

    I have an HP EX490 Home Server setup. I want to use the Music Share volume to act as the home for all of our music. I am using a MacBook Pro and my wife is using a Dell Windows Vista Laptop. I have my iTunes pointing to the iTunes Media Folder on the Music Share. The iTunes Library resides on my laptop in Music/iTunes/Library. I used the consolidate library feature and it moved all the music to the appropriate iTunes folder on the Share. Now I want to do that with the Windows Vista Laptop. I have the Vista laptop pointing to the Share for the iTunes Media folder location. The question is how do I add the files to her library? Do I "consolidate library" again or just "add folder to library"? Also do I keep the boxes checked "Keep iTunes Media folder organized" and "Copy files to iTunes Media folder when adding to library" under the Advanced Tab in Preferences? Would greatly appreciate the help. Lots of music/videos and only want to do this once.
    Thanks in Advance
    Tom

    Tom DePrenda wrote:
    I used the consolidate library feature and it moved all the music to the appropriate iTunes folder on the Share.
    Good!
    I have the Vista laptop pointing to the Share for the iTunes Media folder location.
    Good!
    The question is how do I add the files to her library?
    Go to your File menu and use the command Add Folder to Library. When the dialog comes up, point it to the Music folder in the Share area. But read on first...
    Also do I keep the boxes checked "Keep iTunes Media folder organized"
    You must turn off the "Keep..." option. Otherwise, when one of you changes a tag, iTunes will re-"organize" and the other person's iTunes will lose the link.
    The "Copy..." option should also be turned off. As you add new music, put it where you want it. Then you must "Add File to Library" from each iTunes.

  • How to share one custom field from FITE_VC_GENERAL_DATA to FITE_VC_REVIEW

    Hi FORUM
      I haved created one custom field in the FITE_VC_GENERAL_DATA by one Enhancement, to get this custom field in FITE_VC_REVIEW screen, i filled a z_table_tmp, but i´m not happy with this solution and i thinked that is not the best way. How can i pass this custom value to the FITE_VC_REVIEW with a correct solution ?.. maybe by general_data context structure ?
    Thnks
    Josué Cruz

    Josue Cruz wrote:
    > Hi FORUM
    >
    >   I haved created one custom field in the FITE_VC_GENERAL_DATA by one Enhancement, to get this custom field in FITE_VC_REVIEW screen, i filled a z_table_tmp, but i´m not happy with this solution and i thinked that is not the best way. How can i pass this custom value to the FITE_VC_REVIEW with a correct solution ?.. maybe by general_data context structure ?
    >
    > Thnks
    > Josué Cruz
    Hello Josué,
    the correct approach would be to add a common Web Dynpro Component Usage Relation to both the FITE_VC_GENERAL_DATA and FITE_VC_REVIEW Component. To the common  Z Web Dynpro Component you add a Interface Context which will be exposed to the FITE Components. The new field should be mapped to the new Interface Node of the Z Web Dynpro Component. As bothe FITE share now a common context, the field will be available.
    regards,
    Markus

  • How to share one iTunes library with multiple computers AND Apple TV? Help?

    It seems like my dilemma may not be easily solved. Hopefully it isn't as complicated as I think it will be. Here's the situation:
    My wife hates that, in order to see or do anything with the images she takes, I need to have iPhoto open on my computer (Mac Pro), and she then has to connect to it over sharing.
    By the same token, I don't like that she buys iTunes content on her MacBook, which is sometimes a duplicate of content I already have. Now that the App Store is out, that is going to start getting really expensive.
    So instead, I want us to be able to:
    1) Have ONE iTunes library on the network, and ONE iPhoto library. Both of these would be accessible to any computer on the network. When you launch iTunes, you would get all the media that is in that library.
    2) Both be able to access iTunes at the same time to listen to / watch content.
    3) Both be able to purchase iTunes content, and when it it purchased, it updates that single library. If I buy a song, the next time my wife fires up iTunes, that song is there for her to listen to.
    4) Have our two Apple TV units be able to play content from this library.
    So, I know that we need something on the network. I have a Drobo with DroboShare, so that is one option. I also have a spare Mac Pro laying around, along with a copy of OS X Leopard Server.
    I just don't know what route we should take with this. All I want is for us to share a library, to be able to both use that library, for us to be able to sync content from that library to our portable devices, and for our Apple TVs to also see that library.
    Possible?!

    I'm sort of in the same boat. We've got an iMac with separate User Accounts set up and are currently sharing the same iTunes and iPhoto libraries along with streaming them to our Apple TV.
    Right now I'm the only one with an iPod, however she'll be getting one in a couple of weeks.
    We also just picked up a MacBook yesterday and I'd like to be able to sync certain libraries like iTunes and iPhoto so that no content gets duplicated on either the iMac or MacBook and so that we both have access to the current libraries for each program on our iPods and AppleTV.
    I have an external hard drive that I back up the iMac on and I assume I could manually keep things current with that but there's got to be an easier way...that's why these are Macs right?
    Bill

  • How to use one application with multiple schema without copying application?

    Hi,
    Previously we are using oracle forms and by that we can manage by using a set of folders containing fmx and use different schema/database for different customers. so the source code comes from one individual file but used for different database users.
    is it possible to do this without copying application in apex?
    reason is because if applications are copied for each customer, and in a situation where a page has a bug, the developer must correct multiple pages across all the application. This would not be appropriate to manage.
    could this be done in apex? or is there any other approach?

    Hi,
    An application is tied to its parsing schema, so it is not possible to have one code base which you can then point to different schemas. I have seen some threads relating to dynamically setting the parsing schema, but I don't think it has worked to well, and would not be a supported configuration by Oracle.
    The normal way to do this is to have one schema and for each entity where it is logical you will have an extra key which is the customer id. I mention where it is logical, because not every entity needs its own data defined by customer. Some data will be common across all customers, such as lookup data and some entities will comprise child entities by which the data separation will be implied by the parent. You can then use Oracle's Virtual Private Database feature to implement a seperate view of the data through the application, based most likely on the customer who is logged on.
    Hope this helps.
    Regards
    Andre

  • How to share one itune library among 3 computer at home

    I have 2 desktop and one laptop in my home and would like to know how to setup so that all 3 computers uses the same itune library

    See this -> http://discussions.apple.com/thread.jspa?messageID=7199320&#7199320

Maybe you are looking for

  • Two sites, Two Exchange servers, same domain

    Exchange can seriously baffle me at the best of times. Which is why I'm writing here at the moment. I have 2 sites in two geographical locations for the same business connected via IPsec VPN. At each site we have: - Domain Controller (domain.local) -

  • COnverting class to jsp

    I'm new to jsp and was just wondering how I go about adding my classpath to the jsp page... for example, I have a class like:public class testDriver{    public static void main(String args[]){       MyOtherClass other = new MyOtherClass();       Syst

  • Can i install forms and reports 6i on oracle 11g

    please give the ans?

  • Print margin in reports

    Is there a way to set the left margin? Since the migration from 6i to 10g, the report doesnt print correct. On the left side is about 0,5 cm not on the page. Anyone knows this problem? Thanks

  • Calling qualifications in Personnel Development forms

    Hi All, In training client have their own cmpentency matrix which i wan to configure in sap as qualification catalog. But here they have different compentency for every divc.ision and grades in every divisions. For example they hv 15 division like Ma