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.

Similar Messages

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

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

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

  • MAintain session across multiple DB Adapters.

    Hi,
    I am using a BPEL process which has multiple DB Adapters.
    As far as I understand each DB Adapter call from BPEL is a different session.
    Is there any way to maintain a same session across multiple DB Adapter calls i.e to make multiple DB calls in the same session?
    thanks,
    CD

    Yes this is supported.
    You'll have to take a look at the support for XA (distributed transactions).
    See this thread for some good links to other info.
    Re: DB Rollback Questions for 10.1.3.1 and 10.1.3.3

  • 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

  • Maintaining session across multiple browser windows and page refreshes

    Hi there,
    We're currently developing a Flex application with a couple of session-related requirements that we're not sure how to solve. Before we jump in and maybe go about things in the wrong way, I thought I'd post and see if anyone here knows of some elegant solutions!
    Currently, when our Flex app starts the user is presented with a log-in screen which authenticates the user against our server. Client-server communication is done through BlazeDS.
    Our first requirement is the ability to open a new browser window from Actionscript - this window will load a pdf document. The servlet that serves this pdf should deny the request if the user is not already logged in. The only way we can see to do this so far is to open the pdf url using navigateToUrl() with the '_blank' target, passing a jsessionid token as a url parameter. Is there a better way to preserve session state when opening a new window?
    The second requirement is to preserve some application and session across browser refreshes. Our Flex app has several screens that the user can tab between. If the user hits F5 or the refresh button in their browser, we'd like the app to return to the same screen after the refresh. I've been looking into using BrowserManager to add a fragment such as #screen=2 to the url, but of course we only want the app to display screen 2 if the user has already authenticated with the server. Is there a way to reuse the user's existing session credentials after a page refresh?
    Many thanks in advance for any advice anyone can offer on this. It could very well be that we're missing something about how BlazeDS uses / exposes session credentials that would make all of this easier to implement than we currently realise!

    We use javascript to pass values between a 'data look up' window and the originating Servlet. If this is of any use, I can send you some examples.

  • How to use a connection across multiple request

    What is the idea of using a connection across multiple requests.

    Please give more details. What connections and what requests
    And are you posting on the right forum? (This sounds more like a Networking/servlet question)

  • How  to reuse common code across multiple work repositories

    Hi Experts,
    I have a ruqirements from our customer side. we have a one master repository attached with three work repositories(wk1,wk2,2k3). Customer want to place some common code into wk1 workrepository and want to reuse across multiple workrepositories(wk2,wk3).
    Generally we can reuse code in same work repositories like knowmodules and interfaces.
    Is it possible to use across mutiple workrepositories?
    Thanks in Advance
    Siri

    You can't hare the same instance of the code across multiple work repositories. You have to have a seperate instance in each work repository. However you can manage it as if it was shared through ODI's versioning capability i.e. all changes to the common code are only ever made in one work repository i.e. Wk1 and then deployed to the other 2 which is as simple as getting the latest version from the Master repository. You could even set up security in Wk2 and Wk3 to make sure that your developers/users do not have permission to edit the common code in those repositories.

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

Maybe you are looking for

  • How to use Broadcast in the release 3.5

    Hi people, I need a big help for you. I have to implement the Broadcast (release 3.5), but I am new in BW and I don´t know very much the configurations. I already saw many documentation here in SDN, some one with links, but for while I couldn´t, mayb

  • No sounds on my Apple TV.  Help!

    I updated the software on my Apple TV and there is video, but no sound.  I have checked all settings.  Any ideas?

  • MIDP emulator with support for initiating a dial up connection to a RAS

    Hi, Is it possible to emulate the OTA installation via HTTP on an emulator ? I would like to execute some of the test cases for MIDlet downloads on my laptop having Windows 2000. If I understand it right it would either need to interface Windows' TCP

  • Sorting a Spry Table

    For a table listing events and fed by an xml file I need to sort the date and time columns. First priority is date, second is time. This is possible in a regular html table, but not an option in spry tables, at least not in CS 3 which I am using. It

  • BI-RFC problems after client copy

    Hi all Client copy was done and after that when I tried to load data in BW, it ran for long time and finally showed cancelled in SM37. When I checked the source system in RSA1, it gave two messages. 1.Incorrect IDoc type ZSAC008 in the ALE definition