How to share a session across applications?

Hi
I am developing a web application. There will be two web applications (including mine) running in one servlet container. The user can navigate from one application to other and vice versa. We need to know how can we share a session across these applications. Any inputs in this regard will be helpful!

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

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.

  • 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 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

  • Datalogging and Supervisory Control : how to share data among LabVIEW applications on the same network?

    I'm new to DSC. Is there an example program or article about how to share data (live data and data saved after running a program) among LabVIEW (using DSC) that is very basic? I would like to share live data and test reult data (eg. excel) among computers on the same network (may be LAN). Does sharing data over a network by using DSC makes whole system (all computers) down when one computer is locked up?

    Hi,
    The easiest way to network DSC data is using "network tags". The way you do it is by simply configuring the server PC as you normally would do for a local application.
    Then from a remote compute, which we can call a client computer you can go to Tag Configuration Editor and option "File >> Import Network Tags.."
    In the window that opens up you can hit the browse buttom and navigate to your server computer, select the .scf file you want to have and hit the buttom import.
    Save the "client .scf" file locally and now you have in the client the same configuration you have in the server and your data is networked, from there on is just a matter of manipulating the data.
    I hope it helps
    Andre Oliveira

  • 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 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

  • How to share a Drive across a Network

    I have just added an external drive to my G5 system that I need to share across a network as my internal drive which was shared is running low on space.
    How do I make my external drive shareable? Thanks in advance for your help.

    Hi, and a warm welcome to the forums!
    Easiest way to share an external HD is with Sharepoints...
    http://www.hornware.com/sharepoints/
    It's just a GUI interface to the OS' functions, but you can also do it in NetInfo Manager with a lot more work & understanding.

  • 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 All Photos Across All Devices?

    Hello.  I have a friend with an Ipad, an Iphone 5, and an Iphone 6.  He has photos on each device.  He has backed them all up to Icloud separately on the same apple id.  He has the 200gb storage option.
    The question is how can he see all his photos from all his devices on all of his devices?  Photostream is only last 1000 photos, plus Apple just killed it with ios8.  Isn't there a way to share them on all devices?  It appears there is not and that is very surprising, especially after he is paying extra to have enhanced icloud functionality.   Will he have to use a third party solution?
    Thanks for your replies.

    Copy Photos (& Videos) Between iOS Devices
    http://tinyurl.com/cnz95bc
     Cheers, Tom

  • Share Currency Databases across Applications?

    I have multiple applications on the same server that need to share the same currency database. <BR><BR>Is it possible to link an application database to a currency database in a different app?<BR><BR><BR><BR>

    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 web session among different OC4Js

    I am trying to do the following.
    I have two websites running on two different machines on two different OC4J instances. Now I want to login to be perform only on one website. If user is logged in to website A he shall be able to access site B without having to loggin once again. Is there anyway this could be done without having to use oracle OID since I'm only using OC4J stand alone. If user loggs off site A he should also be logged off site B.
    Any suggestions?

    The Oracle Java SSO mechanism in 10.1.3.1+ should allow you to do this. This is a "lightweight" SSO provider and does not require the use of OID.
    I'm pretty sure you can configure it to support SSO over different OC4J instances using the file based provider mechanism. As long as the same users/groups are populated in the file based user repository and JavaSSO is keyed the same across the different Oc4J instances I think it works.
    There's quite a few I thinks in there, so caveat emptor! But its simple enough to configure and uses only OC4J standalone, so its worth trying if you still don't have a solution.
    -steve-

  • 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

  • Share graphic layout across web applications (WAR)

    Does somebody know how to share graphic layout across web applications?
    e.g. how to dynamically include a layout html across multiple webapps, so, if I make a change to that layout,, the change is automatically reflected in all webapplications already deployed.
    any idea will be appreciated

    Hi,
    To have a common layout across multiple web applications you can use cascading style sheets (css). By making use of the same style sheet you can have the same appearance in all the web applications. Changing the styles in the css will be reflected in all the pages that make use of this css. The changes wont be effected though in all the already deployed web applications. They will have to be re deployed for the changes to take effect.
    Hope this helps you
    Cheers
    Giri :-)
    Creator Team

  • HOW TO: Connect web service (remote application module) to existing model

    Hello.
    I have J2EE application which displays some data in an applet, which reads them by a web service. I'd like to use persistence and connect with a web service called by applet to my current model set within a session. I tried to pass a session id to web service (to a function of an application module implementation). I wanted to create a new SessionCookie instance with such a session id and application id which are used for web application session (by ApplicationPoolImpl.createSessionCookie() or with custom session cookie factory). But I don't know how to pass a session and application ids to a sessioncookie creation process (ApplicationPool environment). I tried to use custom EnvInfoProvider, which set my properties, but it passes the params after a SessionCookie instance is created.
    Samples ... AppModuleServer - file generated to provide ws functionality. I changed code to use EnvInfoProvider:
    public class AppModuleServer extends Object{
      public AppModuleServer(){}
      public SomeObject[] myCustomFunction(String sessionId){
        AppModuleImpl _am = null;
        String appId="someValue";
        CustomEnvInfoProvider envProvider=new CustomEnvInfoProvider(appId, sessionId);
        try{
          _am=(AppModuleImpl)Configuration.createRootApplicationModule("data.AppModule", "AppModuleLocal", envProvider);
          return _am.myCustomFunction(sSessionId);
        finally{
          if (_am != null)Configuration.releaseRootApplicationModule(_am, false);
    }CustomEnvInfoProvider:
    public class CustomEnvInfoProvider implements EnvInfoProvider{
      private String applicationId;
      private String sessionId;
      public CustomEnvInfoProvider(String applicationId, String sessionId){
        this.applicationId=applicationId;
        this.sessionId=aessionId;
      public Object getInfo(String info, Object environment){
        if(info==null)return null;
        return ((Hashtable)environment).get(info);
      public void modifyInitialContext(Object environment){
        if(applicationId!=null)((Hashtable)environment).put("CookieApplicationId", applicationId);
        if(sessionId!=null)((Hashtable)environment).put("SessionId", sessionId);
      public int getNumOfRetries(){
        return 2;
    }Does anybody knows how to pass information from custom EnvInfoProvider just before a SessionCookie is created (e.g. how to run modifyInitialContext() function). Or another way how to pass these information from a web service base function into ApplicationPoolImpl instance. E.g., there is parameter "properties" whithin a createSessionCookie method of ApplicationPoolImpl, which is null during calling. Is it possible to pass there some additional information?
    Thanks for any suggestions.

    Use the Web Service Proxy wizard in JDeveloper to create a class that calls your Web service, and then call this class from code in your AM.
    http://docs.oracle.com/cd/E16340_01/web.1111/b31974/web_services.htm#CJAHGIEF

Maybe you are looking for

  • Poor graphics redraw when scrolling Word documents

    I have a strange blurring effect when scrolling Word documents on my Macbook pro, as if the graphic card had trouble refreshing: the screen is interspersed by horizontal irregular lines that make it impossible to read the text. I have recently replac

  • Oracle xe (windows) and netca

    Hi, I need to create a service. Where did the netca, but in xe is not? What should I do? Thanks.

  • I NEED HELP QUICK! Its about SYSTEM PREFRENCES!!! :O

    Well i downloaded a dock app the last week (btw im a mac newbie) anyway i downloaded and didnt want it. So i found it and deleted it. Not knowing i had deleted the wrong one and i only found out the other day that i had deleted it because i clicked d

  • Empty logfiles on 10.4.11 Server after extended uptime

    I am running about a dozen Xserves in a production environment with very strict change control. The Xserves are running Tiger Server. Recently while monitoring a server's performance I tailed the SMTP log and found it empty. I then checked the system

  • Lightroom help menu

    Why is Photoshop Elements 10 on the Help Menu when the program I am running is Lightroom 4?