Share data across multiple WAR

Does somebody know any pattern to share data across multiple WAR applications?
I need to modularize an Intranet Application?
So, I don't have to shutdown the entire intranet to make the changes in just one module .
It is possible to share a session object? or I must to get and propagate browser session id :( ?
Any idea will be appreciated.

Yes you can, I did it running tomcat
-First have to set crossContext propertie value to "YES"
Then this is my pice of working code :
javax.faces.context.FacesContext facesContext = javax.faces.context.FacesContext.getCurrentInstance();
javax.faces.context.ExternalContext externalContext = facesContext.getExternalContext();
javax.servlet.ServletContext servletContext = (javax.servlet.ServletContext)externalContext.getContext();
Object yourObject = new Object();
if(servletContext.getContext("/yourContextName")!=null)
servletContext.getContext("/yourContextName").setAttribute("yourObject ",yourObject);
Jesus

Similar Messages

  • Sharing static files across multiple WAR files in a single EAR

     

    Is there also a way to share the Session across multiple WARs in the
    same EAR ??
    TIA
    Nikhil.
    Vinod Mehra wrote:
    Yes, we have Virtual Directories for this in 7.0.
    http://edocs.bea.com/wls/docs70/webapp/weblogic_xml.html#1031951
    --Vinod.
    "Sam Smith" <[email protected]> wrote in message
    news:3d3f47cf$[email protected]..
    Hi,
    I have multiple web apps to be deployed to an intranet. I need to have acommon
    look and feel for these multiple webapps.
    I could place the webapps in a single ear file or deploy them without aear file.
    I wanted to know if there is any standard way to include static files likeimages,
    javascripts and css files (for a common look and feel) across multiple warfiles.
    Right now I am planning to keep a war file which just contains all thestatic
    files and point all the jsp pages in the other apps to the static files inthis
    common app. Is there a better way to go about this.
    Thanks,
    Sam

  • Syncing model sources across multiple WARs

    One of the problems we're hitting in our development is keeping model classes synced across a multi-WAR project. For example, the model class for, say, a User object was changed in WAR B, but that developer (an intern) did not publish those changes to WARs A and C. The end result was that a few of our web service calls started failing on the unchanged WARs, while others worked fine.
    I started looking into EJB3, intrigued by the @Remote and @Local setup, but those are related to the session beans themselves. I was hoping that object models could be referenced by interface across multiple WAR distributions as well, though I haven't dug up anything specific on this yet.
    Is there any advice on this forum for keeping model classes in sync across a multiple-WAR project (aside from tighter repository control and swift kicks to the butt)?

    Wraithe wrote:
    Quoting myself: +"The end result was that a few of our web service calls started failing on the unchanged WARs"+
    My original question pertaining to ensuring that the source code for the end user model classes remained consistent. You can't if the interface contains Java classes that are changed. You immediately have to deploy updated JAR files with the new code to all the clients that need it.
    The JAR idea is applicable, though not ideal, and I was hoping there was some other suggestion as to how to handle client-side objects.There is: XML messaging in the service interface instead of Java classes.
    %

  • Sync data across multiple clients

    I am create an application in flex that pulls and pushes data to a MySQL database.  This program will have multiple clients logged in at the same time.  I am wondering what the best way to ensure that the data is accurately updated across all of the clients would be.

    Can you explain what you mean exactly by sockets?
    Is there any way to Sync data across multiple clients without the crazy expensive cost of LCDS?

  • Spreading user data across multiple HD's?

    I hope this is the right forum for this. I'm on a Mac Pro 1,1 and recently installed a few extra hard drives to optimize performance for video editing (accoring to recommendations over at another big software company's support docs -- this is not about FCP).
    My goal is to have this general set-up:
    SSD: Boot Drive (OS & Apps) -- already set up
    Disk 2: Editing Project Files, media and exports
    Disk 3: Cache, renders and previews
    Disk 4: Ideally this would be for docs, itunes, photos and anythings non video related.
    The thing is, this advice comes from PC users mainly and the OSX User Folder structure isn't an issue.
    Question: Can the same user folder's contents be spread across multiple HD's? I realize I'll need to physically place a different "house" icon folder in each HD, probably, but can those have different contents? How can I make them all boot on start-up so the disk allocation is pretty much not noticeable?
    Thanks!

    A simple version of what you are trying is to establish a Boot Drive, with only System, Library, Applications, and the hidden unix files. All user files are moved off to a different drive.
    Here are some simple recipes for Moving the "Home" folder"
    Japamac's Blog: Make space for Performance -- Moving the Home Folder
    http://chris.pirillo.com/how-to-move-the-home-folder-in-os-x-and-why/
    You can embellish this basic setup any way you wish, especially putting Movie data on a different drive, and Movie cache data on yet another drive.

  • IBooks: Any way to share books across multiple iPads? (Family library)

    I'm currently using the Kindle app--which allows my family to share books with ONE account across multiple devices (like 2 iPads and 2 iPhones). Is there any way to do this with iBooks? It appears iBooks is locked to the userid set in iTunes. I love to set the userid within iBooks to make this a family library. Thanks!

    You can have multiple iTunes accounts on one computer. BUT you can NOT download DRM protected (commercial) ibooks from different iTunes accounts directly to your computer OR your iphone/ipad by signing into different accounts at any time you like.
    If you try, a message saying that you CAN switch accounts will come up, but also warning that you won't be able to download from any other iTunes account to that device or computer for 90 DAYS.
    Copying a DRM-protected ibook file (.epub) directly from within your own Music itunes library folder on your computer and then moving the epub file to another computer via wifi, email, usb stick, etc. may work.
    You can try dragging the transferred file onto the iTunes app icon to "open" it to add to the iTunes library.
    But you will probably need to put the ibook .epub file into an identically named folder in the iTunes folder on the new computer, and then sync the iPhone or iPad with the iTunes app on the second computer using a USB cable connection. Nothing else worked for me.

  • Summarizing Data Across Multiple Dates

    Here is my issues.
    I have two dimensions.
    Date and Time. Date is a standard date dimension. Time is a time dimension who's leaf level is at the second.
    I need the ability to obtain a value like maximum from my fact table for a given set of prices. I want to summarize this value at the day level. The issue is that the value can span across 2 dates.
    Example. A Sunday starts at 4PM and ends Monday at 9AM. I need to obtain the maximum value across these specific times from both Monday and Sunday (at the specified times).
    Effectively, I need MAX(MONDAY at time 12:00AM - 9AM, SUNDAY at time 4PM - 11:59:59PM) to be displayed in the data for Date Monday.
    Suggestions on to approaches for this?

    Guys thanks for your suggestions.  Yes I'll give those options a try...
    Just a pity there was no 'aggregator' type activity which would negate the need to go down the route of writing out to SQL or create master/child runbooks which just seem a bit of overkill or adding complexity esp when using very simple runbooks - like I
    say maybe one for the IP developers out there...
    To illustrate my specific eample (one of many simple runbooks requires a summary email sent out to show output) as below:
    So the first Powershell gets VDI desktop names (3 of them) then 2nd Powershell uses these machine names as published data to get associated registration state.  From there I'd ideally like to just generate out the single summary email showing the 3
    machines/reg states instead of 3 separate emails.  I added the append line and get line activities to expose the output to check it was OK and then tried flattening various activities to try and only generate the single email (I removed the junction activity
    infront of sendmail as it didn't work)
    So I'll try the options suggested for spliiting runbooks and/or writing to SQL and see how that goes..
    Cheers

  • Share Music across multiple iPods

    Both my wife and I have iPods.
    Is it possible to store music in one location and access/manage it with both iPods?

    hi Tim!
    yes it is. these resources might help with that:
    Natalie Beresford: multiple iPod/iTunes installations
    How to use multiple iPods with one computer
    iTunes: How to share music between different accounts on a single computer
    love, b

  • Cartesian time data across multiple hourly rows

    Looking for a solution for exploding time rows into multiple rows by hour. For example, take a row like this:
    EventTime         EventLengthSeconds
    2014-04-25 13:31:16.857 6657
    What I need is multiple rows to allocate the time by hour like this:
    EventTime         EventLengthSeconds
    2014-04-25 13:31:16 1724
    2014-04-25 14:00:00 3600
    2014-04-25 15:00:00 1333
    I've crafted a solution using a derived table that I cross join to then use case statements, etc. but it's super ugly and I'm embarrassed to post it. 
    I'm thinking in SQL 2012 there must be a elegant and efficient way to do this with the new windowing functions that are available. 
    Thanks for any insights and suggestions.

    You need a table of hours for this problem. The more general concept is a table of numbers. That is, a table that spans the dimension you are working and provides a row for each discrete value.
    Below is an example how you can fill the table and then a query which uses this table:
    CREATE TABLE Hours (Hour smalldatetime NOT NULL PRIMARY KEY);
    WITH digits (d) AS (
       SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION
       SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION
       SELECT 7 UNION SELECT 8 UNION SELECT 9 UNION
       SELECT 0)
    INSERT Hours (Hour)
       SELECT dateadd(Hour, Number, '20000101')
       FROM   (SELECT i.d + ii.d * 10 + iii.d * 100 + iv.d * 1000 +
                      v.d * 10000 + vi.d * 100000 AS Number
               FROM   digits i
               CROSS  JOIN digits ii
               CROSS  JOIN digits iii
               CROSS  JOIN digits iv
               CROSS  JOIN digits v
               CROSS  JOIN digits vi) AS Numbers
       WHERE  Number > 0
         AND  dateadd(Hour, Number, '20000101') < '20500101'
    DECLARE @eventtime datetime2(3) = '2014-04-25 13:31:16.857',
            @eventspan int          = 6657
    SELECT @eventtime AS EventTime,
           3600 - (60*datepart(minute, @eventtime) +
                      datepart(second, @eventtime)) AS EventSeconds
    UNION ALL
    SELECT Hour,
           CASE WHEN dateadd(second, @eventspan, @eventtime) >
                     dateadd(HOUR, 1, Hour)
                THEN 3600
                ELSE datediff(SECOND, Hour, dateadd(second, @eventspan, @eventtime))
          END
    FROM   Hours
    WHERE  Hour > @eventtime
      AND  Hour < dateadd(SECOND, @eventspan, @eventtime)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Duplicate rows and data across multiple pages.

    My form has 12 pages (each page = 1 month). With a loop, the pages are hidden until the corresponding button is clicked and it becomes visible (Thanks Assure Dynamics for a great solution to a very long form).
    In Month 1, I have a table with a repeating row. What I would like to do is copy the repreating row and it's data to Month 2. Then I would like to have the table from Month 2, duplicate to Month 3, Month 3 to Month 4 and so on.
    I have been able to get the row from Month 1 to duplicate in Month 2 on the exit event of each cell in the row, however, when you are in Month 2 and do not change a cell which was created in Month 1, the data does not duplicate into the next month (Month 3). Instead of on the exit event of the cell(field), I thought placing it on a button would work but it is not.
    This is what I used on the exit event in the table for Month 1:
    xfa.resolveNode("Month2.Performancegoals2.updates.details[" + this.parent.index + "]").projectName.rawValue = this.rawValue;
    I also thought instead of using a table and a repeating row, I could place the information in a repeating subform but I am still stuck with how to copy the subform and its completed data to the next month.
    I am really stuck and have been looking for hours for a solution. Can anyone help, I am out of time for the deadline of this form.?

    Hi,
    Firstly,you must do the count of the table.
    frmTableBlock.tblTableMonth2._rowItem.count = frmTableBlock.tblTableMonth1._rowItem.count
    frmTableBlock.tblTableMonth12._rowItem.count = frmTableBlock.tblTableMonth1._rowItem.count
    And write the code which is do you want to copy the data Month1 to month12.
    I hope
    S,Candy

  • How can i share files across multiple user accounts?

    I have four user accounts on the same iMac and I'd like to be able to view the files within each account.  When I try access one of the other three accounts through Finder, the folders have red minus signs on them.  If I try to open one, I get an error message about not have the right authorities.  However, I've given all four user accounts administrator access.  Thanks.

    Thanks for the response.  Do I change the rights by opening the folder, clicking "Get Info" and chaning the permissions to "write and read?"  If so, I did that.  Is there anything else I need to do?

  • Share photos across multiple accounts same machine--issues

    Dear All,
    I recently created a disk image as per the following article: http://support.apple.com/kb/HT1198?viewlocale=en_US&locale=en_US, section
    Alternatively, move the iPhoto library to a disk image
    Subsequently I copied the iphoto library to this disk.
    Now when I connect with one user, I see all the pictures OK, no problem. I log out (or even restart the computer) and connect with a different user (yes, I made sure the permissions are set read/write for these two users). With this new user, every time I open the library from that shared drive I get an error (something about the library is locked asking me to restart the computer); when I do I get the same. Then I open iPhoto with "option"+"command" and choose rebuild database (after tryiong repair unsusccessfully). The stupid thing keeps munching and munching for hours at in (library has 80 GB) and in the end it screws up all my events and put pictures (not sure they are ALL there) in a stupid event called "recovered photos".
    I have tried everything I could, I don't know what to do anymore. Please help (yes, I ran disk utility verify disk and verify permissions, all seems to be just fine).
    THANKS!

    The message that I get when trying to open the library from the other user account is:
    Your photo library is either in use by another application or has become unreadable
    Shut down and restart your computer, and then open iPhoto again. If the problem persists, try rebuilding your photo library. To do this, quit iPhoto, and then reopen it while keeping the Option and Command keys pressed. You can also try restoring your photo library from a backup.

  • How can split data into multiple sheets using an excel template

    Hi all,
    I'm using BIP 10.1.3.4.1 upgrated with the latest rollup patch, 9546699.
    I followed the example inside the article "Real Excel Templates 1.5" (on the Tim Dexter's blog)
    http://blogs.oracle.com/xmlpublisher/2010/05/real_excel_templates_i.html
    and I built my report directly from an excel template containing only one sheet (plus the XDO_METADATA sheet), and for one sheet it worked fine !!!
    Now I need to add more sheets to the template.... and I have two big questions:
    1. if I need to create a second sheet which contains almost the same data (with a different layout), I saw that it is not possible to map a value to more than 1 cell....so if I map a value in the first sheet, I can't map it in the second sheet (because it's already used in the first one).
    How can I map same values into two or different execll
    2. if I need to create a second sheet which contains another dataset (completely different from the dataset in the first sheet), I can I do, considering that every BIP report is based on ONLY a data source.
    Tim wrote: The most impressive, for me at least, is the sheet 'bursting'. You can split your hierarchical data across multiple sheets and dynamically name those sheets
    but I didn't yet understand how this bursting it's possible.....considering what I said above.....
    Surely I've a lack of knowledge.....but anybody can help me to understanding the "multiple excel sheets" black hole ?
    I'll appreciate any kind of help
    Thanks in advance
    Alex

    You can find working solution here http://xlspe.com

  • Joining multiple tables across multiple data sources in MYSQL throws error

    Hi all,
    I have to join tables across multiples MYSQL databases
    eg :
    Table T1,T2 from DB1
    Table T3 from DB2
    Columns from T3 are aggregated ( dimensional column ).
    Hence when i query using oracle answers ( say i have columns from T1,T2 and T3 ) , OBIEE tries to a query DB1 by having NULL for columns in T3
    It uses cast(NULL as INTEGER ) for columns from T3 . But MYSQL throws an error because "cast(NULL as INTEGER )" is not supported by MYSQL.
    I tried executing the query generated by OBIEE manually , if i try giving cast(NULL as SIGNED INTEGER ) , it works.
    pasting the query for reference
    select distinct D1.c2 as c1,
    D1.c1 as c2,
    cast(NULL as INTEGER ) as c3
    from
    (select distinct T87.title_id as c1,
    T59.asin as c2
    from
    print_book_catalog T59 left outer join
    title_authority T87 On T59.asin = T87.asin
    where ( T59.asin = '0345378911' )
    ) D1
    I am not able to find any config file to set this property ( and use signed integer instead of integer ) . Even DBFeatures.INI does not have relevant information.
    Can someobody please help me solve this problem.

    Stijn,
    Thank you for the article link. That was very helpful! It seems that I had a few things off as you do need the "This source should be combined with other sources at this level." checked. In my two table source columns for DATA_SOURCE I defined a literal ('086496' and '085597' for the other) in the Column Mapping tab. I pasted the following in the Fragmentation content, checking the "This source..." box on the Content tab:
    eSIS.SANDBOX4_SCHOOLS.DATA_SOURCE = '086496'
    And pasted the following into the WHERE clause, checking "Select distinct values" on the Content tab:
    sandbox4."".OBIEE.NWOCA_SCHOOLS.SCHOOL_CODE = VALUEOF(NQ_SESSION."SCHOOL") AND sandbox4."".OBIEE.NWOCA_SCHOOLS.DATA_SOURCE = VALUEOF(NQ_SESSION."GROUP")
    This took care of my user's security, utilizing the session variables in the WHERE clause. I am now able to generate reports that only one user can access from one data source and share that same report with another user who can only see data from the other data source.
    Many thanks!!!

  • 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

Maybe you are looking for