Storing SessionManager or Server for multiple web applications

We currently have one enterprise application with 2 web applications installed. These 2 web applications must share the same session cache.
Toplink is installed as a shared library for both of these web applications.
What I am wondering is how Server and SessionManager should be utilized.
In our servlet initialization of web application one we get an instance of the SessionManager and assign the SessionManager to a static instance variable.
static SessionManager sessionManager;
sessionManager = SessionManager.getManager();
Now whenever we want to get a client session from either web application we make the call
Server serverSession = (Server) sessionManager.getSession("XXX");
From looking at the code for the sessionManager.getSession("XXX") I see that this
results in a synchronized method invocation which is in turn bottlenecking our database access code.
My question is should we not just be storing the Server in a static instance variable to distribute client sessions to both web applications and not the SessionManager.

Hi,
One SSA is ok, but you should think about access rights. If the access is clear cut between all the web apps you should be ok with one SSA. Multiple result sources limiting on content source also works, but could easily be bypassed.
Multiple SSA's will eat up RAM/CPU like a mother :)
As for popular etc.. it could be due to how those sources are set up, but haven't investigated or tested this much.
Thanks,
Mikael
Search Enthusiast - SharePoint MVP/MCT/MCPD - If you find an answer useful, please up-vote it.
http://techmikael.blogspot.com/
Author of Working with FAST Search Server 2010 for SharePoint

Similar Messages

  • One Search service application for multiple web applications in a single server

      We are planning to host 17 Web applications in a single Server. Do I need to create search service application for each web application or I need to create one  Search service application , create a Content source for each web
    application and create a Result source for filtering. Which is the best approach. And which approach takes more RAM memory.
       In my application I am using Search web part, "Recently Changed Items", "Popular Items" web parts. when I created only one one  Search Service application for all web applications and using Result sources ,
    I am not getting the results. What could be the problem.

    Hi,
    One SSA is ok, but you should think about access rights. If the access is clear cut between all the web apps you should be ok with one SSA. Multiple result sources limiting on content source also works, but could easily be bypassed.
    Multiple SSA's will eat up RAM/CPU like a mother :)
    As for popular etc.. it could be due to how those sources are set up, but haven't investigated or tested this much.
    Thanks,
    Mikael
    Search Enthusiast - SharePoint MVP/MCT/MCPD - If you find an answer useful, please up-vote it.
    http://techmikael.blogspot.com/
    Author of Working with FAST Search Server 2010 for SharePoint

  • Configure Log File for each web application deployed in weblogic server usi

    Hi All,
    How do I configure Log4J to log separately for each web application? i.e. Assuming, I have a web application "AWeb" and a web application "BWeb". I need a log file to be created for AWeb Separately and BWeb Separately. i.e. All the log information for "AWeb" web application will be stored in AWeb.log and all the "BWeb" web application will be stored in BWeb.log
    Do you have any sample code and configuration details for the above-mentioned requirement?
    Thanks in Advance,
    C R Baradwaj

    You do not need to do anything strange, just use log4j the usual way with the exception that you do not need to init log4j (this is not necesary when using a log4j.xml.)
    A minimal sample of a log4j.xml is
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
    <appender name="ConsoleAppender" class="org.apache.log4j.ConsoleAppender">
    <layout class="org.apache.log4j.SimpleLayout"/>
    </appender>
    <root>
    <priority value ="debug" />
    <appender-ref ref="ConsoleAppender"/>
    </root>
    </log4j:configuration>
    You just have to be sure that you have different log4j.xml in your classpath for different web applications.
    Regards,
    LG

  • WEB Server And Database Space requirements for deploying Web Application

       Hi,
         We are in requirement of WEB Server  And Database Space requirements for deploying  our Web Application in cloud server. We want to know technical requirements and feasibilities laid by Microsoft team for deploying web
    application.......
    Regards,
    Sreenivasa M S

    Hi,
    Please refer this link and check if it helps:
    http://blogs.technet.com/b/cbernier/archive/2013/09/24/deploy-your-web-application-to-windows-azure-from-with-visual-studio.aspx
    Regards,
    Azam Khan

  • Multiple Web Applications WLS 7.0

    Hi,
    I am trying to configure multiple web applications on the same WL 7.0 server and
    am having trouble doing the following.
    I would like to be able to use the following URLS:
    Application #1:
    http://myserver/st/aems - where st/aems maps to the path X:\SimpleTrade2\AEMS\ui\source\htdocs
    Application #2:
    http://myserver/st/acms - where st/aems maps to the path X:\SimpleTrade2\ACMS\ui\source\htdocs
    Root - Default web application - This would be left empty with the idea that our
    company could sell our web applications and we would deploy them on someone elses
    WLS and we would not conflict in any way.
    The problem with the above is that when I look at the DTD and try and configure
    config.xml in the following way:
    <Application Deployed="true" Name="AEMS"
    Path="X:\SimpleTrade2\AEMS\ui\source\htdocs" TwoPhase="true">
    <WebAppComponent DeploymentOrder="2000" Name="aems"
    Targets="simpletradeserver" URI="st/aems"/>
    WLS blows up on startup because it tries to POST-Pend the URI to the path... If
    I change it to:
    <Application Deployed="true" Name="AEMS"
    Path="X:\SimpleTrade2\AEMS\ui\source" TwoPhase="true">
    <WebAppComponent DeploymentOrder="2000" Name="aems"
    Targets="simpletradeserver" URI="htdocs"/>
    This will work but then my URL is not what I want it becomes http://myserver/htdocs
    Is there anyway around this or a way to get what I want?
    Another piece of information, I am developing in Exploded directory format when
    we deploy it will be as an ear.
    Thanks in advance for any ideas!!!
    -Jerry Rodgers

    Thanks for the info Christian.
    I thought I would pass along a bit more inforation for others who might be trying
    to do something similar. In case they run across this message.
    I did determine that if you are using a .WAR file the name attribute of the xml
    node WebAppComponent will allow you to create a different context path than the
    URI. I did not test to see if it allowed you to use a name like "st/aems" I am
    sure "st.aems" would work or any name that may be different than the URI. The
    weird thinhg is that when using the EXPLODED DIRECTORY format the URI is the name
    of the folder under the path and the name property appears to be ignored no matter
    what you change it to you can only get to your web app using the URI.
    Hope this helps someone who comes after me and is looking for the same thing,
    maybe they won't spend 6 hours on it like I did ;>
    -Jerry
    "Christian Plenagl" <[email protected]> wrote:
    >
    Hi,
    this is not possible.
    The URI field contains the directory name of the WebApplication, which
    normally
    is the same name as the directory where you put the webapplication in.
    Christian Plenagl
    Developer Relations Engineer
    BEA Support
    "Jerry Rodgers" <[email protected]> wrote:
    Hi,
    I am trying to configure multiple web applications on the same WL 7.0
    server and
    am having trouble doing the following.
    I would like to be able to use the following URLS:
    Application #1:
    http://myserver/st/aems - where st/aems maps to the path X:\SimpleTrade2\AEMS\ui\source\htdocs
    Application #2:
    http://myserver/st/acms - where st/aems maps to the path X:\SimpleTrade2\ACMS\ui\source\htdocs
    Root - Default web application - This would be left empty with the idea
    that our
    company could sell our web applications and we would deploy them onsomeone
    elses
    WLS and we would not conflict in any way.
    The problem with the above is that when I look at the DTD and try and
    configure
    config.xml in the following way:
    <Application Deployed="true" Name="AEMS"
    Path="X:\SimpleTrade2\AEMS\ui\source\htdocs" TwoPhase="true">
    <WebAppComponent DeploymentOrder="2000" Name="aems"
    Targets="simpletradeserver" URI="st/aems"/>
    WLS blows up on startup because it tries to POST-Pend the URI to the
    path... If
    I change it to:
    <Application Deployed="true" Name="AEMS"
    Path="X:\SimpleTrade2\AEMS\ui\source" TwoPhase="true">
    <WebAppComponent DeploymentOrder="2000" Name="aems"
    Targets="simpletradeserver" URI="htdocs"/>
    This will work but then my URL is not what I want it becomes http://myserver/htdocs
    Is there anyway around this or a way to get what I want?
    Another piece of information, I am developing in Exploded directoryformat
    when
    we deploy it will be as an ear.
    Thanks in advance for any ideas!!!
    -Jerry Rodgers

  • Authentication Across Multiple Web Applications (Revisited)

              Its been an ongoing battle, but I've made some insight into this situation. The problem stands as it seems impossible to authenticate against one web application deployed as a WAR archive and have that authentication carry across to another web application with the same security constraints. I've been told by BEA that, quote:
              "It seems to me that we are violating section 11.6 of the servlet 2.2 spec which talks about webapps"
              I've also been told that this is fixed in WLS 6.0, reference issue #38732.
              For those of us building production environments using 5.1 instead of 6.0 XML based configuration, this does NOT solve our problem.
              I've dug further into the bowels of 5.1 and found that if you manually set the realm name in the login-config of the security constraint in the web.xml file in each WAR deployment as such:
                   <login-config>
                        <auth-method> [whichever method] </auth-method>
                        <realm-name>WebLogic Server</realm-name>
                   </login-config>
              Authentication will carry across web applications. However, I've noted that the session management then becomes unpredictable. For example:
              I log into the application TESTAPP1 which contains a protected servlet that outputs the session ID and attempts to get the authenticated principal name from the "_wl_authuser_" session variable. Upon first load of the page (after the login dialog box), the session is null [can be fixed with .getSession(true) call instead] and the "_wl_authuser_" object does not exist. Reload the page and the session appears as well as the "_wl_authuser_" object. Strange.
              I then move to TESTAPP2, which does not prompt me for authentication but also is missing the session in the same manner. Upon browser reload, the session is created with a different ID and the "_wl_authuser_" object is now available with the appropriate principal name.
              Upon moving back to TESTAPP1, I am not prompted for authentication however, I am assigned yet another session ID after browser reload, different from the first.
              So it seems that although authentication is carried across web applications, the session IDs as you move from TESTAPP1 to TESTAPP2 change, and then change again but not back to the original when going back to TESTAPP1.
              This is a particular problem since we are using Vignette's V5 as our main client and tracking sessions through V5 - this would quickly become unmanageable if a single page view access three or four different application components with three or four different session ids.
              I'm wondering if we can expect the same behavior from WLS 6.0?
              Ideally, I'd like to see WebLogic use a single session ID to track users across multiple web applications but still have session independence between applications. So if I store something in session in TESTAPP1, its not available in TESTAPP2. Does this outline the behaviour in WLS 6.0? Can anyone verify this?
              Some food for thought. Thanks!
              ./Chris
              Senior Systems Anaylst
              MassMutual Financial Group
              

    Hello! I am searching an answer to this question too!!!
    Did you get some news regarding this item?
    Regards,
    C.M.

  • 500 Internal Server Error   BEx Web Application

    Hello,
    can everybody help for the fault, or had the same error ?
    500 Internal Server Error
      BEx Web Application
    Failed to process request; contact your system administrator
    Error Summary
    Exception occured while processing the current request; this exception cannot be handled by the application or framework
    If the information on this page does not help you locate and correct the cause of the problem, contact your system administrator
    To facilitate analysis of the problem, keep a copy of this error page Hint: Most Web browsers allow you to select all content, and copy and paste it into an empty document (such as in an email or simple text file)
    Root Cause
    The initial exception that caused the request to fail was:
    Cannot get connection for 60 seconds. Possible reasons: 1) Connections are cached within SystemThread(can be any server service or any code invoked within SystemThread in the SAP J2EE Engine), 2) The pool size of adapter "SAPFactory" is not enough according to the current load of the system or 3) The specified time to wait for connection is not enough according to the pool size and current load of the system. In case 1) the solution is to check for cached connections using the Connector Service list-conns command, in case 2) to increase the size of the pool and in case 3) to increase the time to wait for connection property. In case of application thread, there is an automatic mechanism which detects unclosed connections and unfinished transactions.
    Log ID 0014C265209B005B000007300000610A000473C4612CBCB9
    thanks

    Hi,
    I am getting similar kind of error.Can you please tell me how you resolved the issue.
    Regards,
    Priyanka

  • Use single realm for multiple web applciation in sharepoint 2013 and adfs 2.0

    Use single realm for multiple web applciation in sharepoint 2013 and adfs 2.0
    Please help!!

    I dont think you can do this, because you have to name/url of the web application in realm. You have to add new realm for each web application.here is script to add another realm.
    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
    $sts = Get-SPTrustedIdentityTokenIssuer | where {$_.Name -eq "ADFS2.0"}
    $uri = new-object System.Uri("http://url/")
    $sts.ProviderRealms.Add($uri, "urn:sharepoint:Name")
    $sts.Update();
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • OWSM and Webservices -Define policies once for multiple web services

    I thought that through using OWSM we had the possibility to use the same Policy Lines for multiple web services.
    Mostly when web services are used/integrated within an application, the same rules need to be defined and I thought this requirement could be met when using OWSM.
    But you need to define the policy requirements on each web service that's passing through a gateway or agent, why isn't it supported to define policy lines one level higher to be able to use the same requirements for multiple web services?

    Nathalie,
    For this purpose OWSM allows you to use Template Policy Pipelines.
    For individual services, you can than replace the pipeline with the Template.
    But I have to agree with you here: the templating functions are rough on the edges, e.g. limited editing capabilities.
    Hope this helps.
    Best regards, Sjoerd

  • Pros & Cons of having multiple web applications under one EAR project

    Could anybody let me know what are the advantages and disadvantages of having multiple web applications under one single EAR project?

    Either this is homework, in which case, do it yourself, or you already think you have some pros for doing this. Share with us

  • Why an organization require SSL for Shared Web Applications?

    Hi
    what is ssl and why an organization  require SSL for Shared Web Applications?
    adil

    Hi adil,
    Secure Socket Layer (SSL) is an encrypted communication protocol which uses encryption certificates. For more information about SSL in SharePoint, please refer to:
    http://technet.microsoft.com/en-us/magazine/2009.09.insidesharepoint.aspx
    http://technet.microsoft.com/en-us/library/cc262366(v=office.15).aspx
    SSL is supported for server-to-server authentication and app authentication.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Configuring the authentication scheme for a web application

    Hi all,
    We have a requirement to configure the authentication scheme for a web application where some set of users should access the application using basic LDAP (userid/password) authentication and some using digital certificate authentication.
    Since the deployment descriptor (web.xml) allows only one directive for auth-method in logic-config, we want to know if there is any other way to achieve this requirement. We are thinking of a custom login module approach. But we are not able to figure out how to configure the auth-method at runtime from the login servlet.
    Please let us know if there is any other approach to achieve this.
    I will be thankful if any body shares any specific solution to this issue.

    This forum is probably not the correct one to ask in. It's more related to the web container than Java Programming.
    Kaj

  • Office Web Apps - how to disable office web apps features for one web application

    ENV: Sharepoint 2010 farm with office web apps + fast search
    I have the requirement for one web application to open all its documents in client applications - I can enable feature "OpenInClient". This web application uses team site template and other web application also uses team site template. ( feature
    stapling ruled out)  Now I can run powershell cmdlet to enable this feature on all the currently existing site collections. But the requirement is to enable this feature for all the future site collections. This web applications has 60 k site collections
    and atleast more than 10 site collections get created each day and they dont like the option to run a powershell script each day to activate this solution.
    Is there any other way to by default activate new site collections on this WA to open in client applications by default (can we disable this office webapps features only on one web app)?
    VM

    I have learnt from this forum that it is not possible to turn off Office web apps on single web application. The line of control lies at farm level and then at site collection.
    Disable
    Office Web Apps on web application
    VM

  • SharePoint 2013 Central Admin says port 80 for three web applications, but IIS says they have different ports

    Hello,
    I have three web applications on a SharePoint 2013 servers.  In Central Administrators on the Application Management page where it lists all of the web applications, it shows Port 80 being used 2 3 sites.  When I go to IIS, 2 of the 3 are using
    different ports, 81 and 82.  So, only one site IIS says is using port 80. Why is this?  The host file has no entries in it.  Where these web applications extended?
    Thanks,
    Paul
    Paul

    Hi Paul,
    From the URL of the web application in Central Administration in the image, you have configured the Alternate Access Mapping for the web applications.
    And the URL configured is by default using port 80 if you don’t 
    assign other ports for the web application, so the port is changed to 80 in Central Administration.
    To be able to access the web application, you need to add binging for the web application in IIS(please make sure that you have added the host name in DNS).
    For example, SharePoint – 32298, you need to create the binding for the web application in IIS as the image below:
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • We are using the Azure server for our web services. Server is generating an error "Unable to connect to the remote server". What is this error means

    We are using the Azure server for our web services. Server is generating an error "Unable to connect to the remote server". What is this error means  

    Hello,
    Did you means that you use the Windows Azure Virtual Machine DNS name as the server name in the Reporting Server Web Services URL?
    For example:
    Report server:http://uebi.cloudapp.net/reportserver
    Report manager:http://uebi.cloudapp.net/reports
    If you want to connect to Report Manager on the virtual machine from a remote computer, you should create a  virtual machine TCP Endpoint and open the port in the virtual machine’s firewall. By default, the report server listens for HTTP requests
    on port 80.
    Reference:http://msdn.microsoft.com/en-us/library/jj992719.aspx#bkmk_ssrs_connect_2_remote_RM
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

Maybe you are looking for

  • How to hide a table row in pdf  using javascript?

    How to hide a table row in pdf  using javascript?

  • Double entry for a single lens in the Lens filter

    I've noticed that when I filter the Library with metadata, the same EF 50mm f/1.8 lens shows up as two distinct entries, depending on which body it was used on. The Canon 30D reports the lens as "EF50mm f/1.8", and the 450D reports it as "EF 50mm f/1

  • No sound on my Qosmio G50-10h

    Hi, Every now and again the sound disappears from my laptop. Sometimes it's all the sounds / beeps, other times I can hear the beeps when I press the buttons at the top of the keyboard (Dolby, Media Center etc). I've downloaded the sound driver for t

  • Imessage through iCloud

    Hi. I have Imessage through my Apple ID on my home computer and on my work computer.  I like using it at work to answer messages, but don't want them all popping up on my home computer at the same time. Is there a way to disable Imessage on one compu

  • How do you pan and/zoom an image--the "Ken Burns" effect?

    How do you pan and/zoom an image--the "Ken Burns" effect?