Sessions problem in a 3-tier application

Dear All,
I am trying to create a 3-tier application using Apache Tomcat and Toplink:
1. As a part of my servlet startup I create a ServerSession
session = project.createServerSession();
and store it as a static variable. Upon connect I can see that TopLink creates multiple connections. (I assume they are to be pooled between client sessions)
2. All subsequent DB operations are performed using client sessions acquired from that server session:
session.acquireClientSession()
I am running into the following problem:
After very mosdest usage (1 user) I manage to freeze the application as follows:
[TopLink Finer]: 2007.08.19 11:31:44.093--ServerSession(2285943)--Thread(Thread[http-8080-Processor25,5,main])--client acquired
[TopLink Finest]: 2007.08.19 11:31:44.109--ClientSession(15960898)--Thread(Thread[http-8080-Processor25,5,main])--Execute query ReadAllQuery(com.ligolab.application.domain.reporting.PatientResultReport)
[TopLink Fine]: 2007.08.19 11:31:44.109--ServerSession(2285943)--Connection(21849501)--Thread(Thread[http-8080-Processor25,5,main])-- MY SELECT QUERY HERE
[TopLink Finer]: 2007.08.19 11:31:44.921--ClientSession(15960898)--Thread(Thread[http-8080-Processor25,5,main])--client released
---------------------------------------------- [I hit Refresh on my browser here] ---------------
[TopLink Finer]: 2007.08.19 11:31:46.125--ServerSession(2285943)--Thread(Thread[http-8080-Processor24,5,main])--client acquired
[TopLink Finest]: 2007.08.19 11:31:46.125--ClientSession(28210421)--Thread(Thread[http-8080-Processor24,5,main])--Execute query ReadAllQuery(com.ligolab.application.domain.reporting.PatientResultReport)
[TopLink Fine]: 2007.08.19 11:31:46.125--ServerSession(2285943)--Connection(21849501)--Thread(Thread[http-8080-Processor24,5,main])-- MY SELECT QUERY HERE
[TopLink Finer]: 2007.08.19 11:31:47.265--ClientSession(28210421)--Thread(Thread[http-8080-Processor24,5,main])--client released
---------------------------------------------- [I hit Refresh on my browser here] ---------------
[TopLink Finer]: 2007.08.19 11:31:49.062--ServerSession(2285943)--Thread(Thread[http-8080-Processor25,5,main])--client acquired
[TopLink Finest]: 2007.08.19 11:31:49.062--ClientSession(25506524)--Thread(Thread[http-8080-Processor25,5,main])--Execute query ReadAllQuery(com.ligolab.application.domain.reporting.PatientResultReport)
[TopLink Fine]: 2007.08.19 11:31:49.062--ServerSession(2285943)--Connection(21849501)--Thread(Thread[http-8080-Processor25,5,main])-- MY SELECT QUERY HERE
[TopLink Finer]: 2007.08.19 11:31:50.000--ClientSession(25506524)--Thread(Thread[http-8080-Processor25,5,main])--client released
---------------------------------------------- [I hit Refresh on my browser here] ---------------
[TopLink Finer]: 2007.08.19 11:31:56.890--ServerSession(2285943)--Thread(Thread[http-8080-Processor24,5,main])--client acquired
[TopLink Finest]: 2007.08.19 11:31:56.890--ClientSession(19507034)--Thread(Thread[http-8080-Processor24,5,main])--Execute query ReadAllQuery(com.ligolab.application.domain.reporting.PatientResultReport)
After last refresh my Query does not get executed and the application just hangs. If I PAUSE it in debug mode I observe that it is stuck waiting in the ConnectionPool.acquireConnection()
I would appreciate any suggestions!
Tony.

Tony,
TopLink does have its own internal connection pooling by default with a Server Session. This can be changed to use the data sources of the container you are running if available and wanted.
Each read query acquires a connection and releases it once the query is completed. One exception to this is when cursored streams or scrollable cursors are used. These require the connection to be held out of the pool until the application closes the cursor/stream. Do your queries make use of this?
Doug

Similar Messages

  • Session problem in Enterprise Java / Weblogic application

    Background: we are using session variables in our enterprise java application running Weblogic application server.
    Issue: When we have more than one browser open in the same PC there is session variable conflict.
    Example:
    1) Variable v1 of browser b1 has state X.
    2) We open browser b2 and run the application, the variable v1 has session Y.
    3) We come back to browser b1. We notice that v1 has state Y, we are whereas expecting it to be X.
    Question:
    How do we maintain the various instances of session variables when using multiple browsers from a single PC?
    N.B. But this is not an issue when we check the application from multiple PCs each with a single browser open.

    I'm not sure about the ins and outs of the workings of Weblogic sessions, but:
    the sessions are probably being kept as cookies. This is probably what is causing the problem. That is why it works from different PCs.
    Try changing the session tracking from cookies to URL rewriting, and see if the problem remains. URL rewriting should make the URLs completely independent when run from different browsers.
    Let us know how you get on,
    Manuel Amago.

  • Problem if three tier application run through WebStart

    I developed a three tier application (Messaging Service (JMS,JNDI))
    When i run this applivation without web start it run without problem
    but when i run this application through web start the middel tier (JBoss) throwing some exception relATED TO CONNECTION
    Can u give me any hint to solve this problem
    regards
    tushar

    I had no problem with my application .i have a swing based client application that connects to JBoss Application Server to connect to Session Beans, JDO,etc. IT works fine. You need to distribute JBoss-all-client.jar.
    Can you describe your error

  • Session problem in jsp application

    I face a session problem. I setting everything in a session and when pass back to a main page, the value is not display in the screen. But after refresh the value will display in the screen and this kind of problem only come out very few time and i dun knw how to solve this...
    Anyone here can give me some idea and suggestion or the way to solve this kind of problem!!!

    define "2 different clients"
    1) You have 2 different PCs and it's using the same session ID for both? I doubt this. I think the server is advanced enough not to use give a session ID that's already been created.
    2) You have 1 PC and are using IE or Netscape and using File > New Window to open a new window and connect again. This you can't fix without using only URL rewriting to manage session, because the different windows will share the same session cookies.

  • Session time out in ADF 11g application.

    Hi,
    I am working for the ST BPO Project. We have one ADF application that is migrated from 10g to 11g.And our application is deployed on the weblogic server.
    we are facing some session time out issues in the application which is intermittent and whenever we leave the web page for some times, the session get timed out and page gets errored out.
    We have set the session time out parameter in web.xml as well as for AM.
    Session Management:
    Following are the parameters which we have set already.
    1.     Web.xml
    We have put the following session time out in web.xml:
    <session-config>
    <session-timeout>180</session-timeout>
    </session-config>
    2.     bc4j.xcfg
    We have set the timetolive property of AM as:
    <AM-Pooling jbo.ampool.timetolive="10000000" jbo.pooltimetolive="10000000"/>
    3.     Also for the DB we have set the session time out to 180 mins.
    But if we leave the page for say some times around 5-10 min, the session of the page expires and it throws error.
    Also, as per our investigation : After some times the view id of the page gets expired and hence the issue comes. Also the behaviour is only on the weblogic server and we don't face any issues in the local set up.
    Kindly help us in solving this problem. Also let me know if any further details is required.
    Thanks
    Namit.

    Hi,
    suggest you also contact customer support on this issue. The version of your JDeveloper 11g release may matter as well
    Frank

  • SSO - session time out while navigating across applications

    Hi,
    Problem statement
    Handling session time out while navigating across applications involving SSO
    Current approach
    Application 1
    1. Create session1.
    2. URL rewrite the sesssion ID1 into the link refering to App2.
    Application 2
    1. Create session2
    2. Get the session Id of App1.
    3. send the session ID of App1 in the header
    4. Invalidate the session2
    Application 1
    Get the ID from request and invoke getSession.
    I'm having a very large session timeout at App1.
    Is there a better approach. Ex: Having global session which is shared across multiple
    webapplications.

    "madhav" <[email protected]> wrote:
    >
    Hi,
    Problem statement
    Handling session time out while navigating across applications involving
    SSO
    Current approach
    Application 1
    1. Create session1.
    2. URL rewrite the sesssion ID1 into the link refering to App2.
    Application 2
    1. Create session2
    2. Get the session Id of App1.
    3. send the session ID of App1 in the header
    4. Invalidate the session2
    Application 1
    Get the ID from request and invoke getSession.
    I'm having a very large session timeout at App1.
    Is there a better approach. Ex: Having global session which is shared
    across multiple
    webapplications.
    I have similiar problems in my system. What do you do if the session 1 times out
    during ongoing operations in App 2 ?
    Thanks
    Kejuan

  • I suddenly have this error message on FireFoxthis message pops up: "Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory. Please check that this directory has no re

    I suddenly encounter this error message from Fire Fox.
    Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory. Please check that this directory has no read/write restrictions and your hard disk is not full or close to full. It is recommended that you exit the application and fix the problem. If you continue to use this session, you might see incorrect application behaviour when accessing security features.
    I uninstalled the browser and download a new version but it does not resolve the issue.
    I know my hard disc has ample space. I do NOT know where to find the Profile directory to fix the read restriction box.
    == This happened ==
    Every time Firefox opened
    == After something about security add-on of Norton pop up by itself. ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; MSN Optimized;US)

    This link shows things to check - https://support.mozilla.com/kb/Could+not+initialize+the+browser+security+component

  • New WIN7 System, FFox gives error "Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory" - will not go to any site.

    New Windows 7 computer. After installing Firefox, every time I bring it up I get the following message:
    "Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory. Please check that this directory has no read/write restrictions and your hard disk is not full or close to full. It is recommended that you exit the application and fix the problem. If you continue to use this session, you might see incorrect application behaviour when accessing security features."
    Then Firefox comes up, but will not function at all - can enter url address, but will not respond to ANY clicks, so can not go to any site.

    This link shows how to fix this - https://support.mozilla.com/kb/Could+not+initialize+the+browser+security+component

  • This message [Ubuntu repositories or Mozilla download: " There is no Profile folder Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory....

    Ubuntu 11.04: I have been getting this message whenever I install Firefox from the repositories and downloading the tar file. I cannot use Firefox! " There is no Profile folder Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory. Please check that this directory has no read/write restrictions and your hard disk is not full or close to full. It is recommended that you exit the application and fix the problem. If you continue to use this session, you might see incorrect application behaviour when accessing security features."Firefox does not respond to any addresses or a google search. Indeed it responds to nothing. There is no Profile folder!

    Uninstalling Firefox on Linux
    * http://kb.mozillazine.org/Uninstalling_Firefox#On_Linux
    * http://kb.mozillazine.org/Installation_directory#Linux
    * Removing user profile data - http://kb.mozillazine.org/Uninstalling_Firefox#Removing_user_profile_data
    After all is done, Restart your system.
    Installing Firefox on Linux
    * https://support.mozilla.com/en-US/kb/Installing%20Firefox%20on%20Linux
    Check and tell if its working.

  • Import Data Tier Application Collation 1033 is not supported

    When I try to use Import Data-Tier Application I am getting an error, Could not load schema model from package (Microsoft.SqlServer.Dac)
    Additional information: Collation 1033 is not supported.  you must specify one of the supported collations in the Collation attribute.
    Everything was working fine for a while and then I started getting this error.
    I checked my system restore and there's a message "Language Pack Removal"
    I also believe this started happening after I installed Office 2013.   
    Thanks for your help,
    Keith

    Looking over your answer again, I don't see how anything could be wrong with the file. 
    1) I am able to import the file with no problem
    2) I update windows
    3) I am no longer able to update the file or any other .bacpac files and get the error:
    Could not load schema model from package (Microsoft.SqlServer.Dac)
    Additional information: Collation 1033 is not supported.  you must specify one of the supported collations in the Collation attribute.
    I have checked that SQL server has all of the correct Collation settings as well so I have no idea where to even start looking for this issue.

  • Session Time Out capturing for legacy application running in portal

    Hi Forums,
    I am using portal URL  iView to connect to legacy application. How to capture the session time of of that legacy application and show it in the portal. In portal I have already handled session time out which shows a javascript popup message. I want to call the same piece of code once session time out happens in the legacy application which is been accessed by portal through URL iview.
    Many Thanks and Best Regards
    Sudhir

    Hi Sudhir,
    The handling of the session timeout should be done by the application itself not the portal. From the portal you have no way of working out what the application is doing. My suggestion to you is that you need to modify the application to handle the scenario you describe not the portal.
    BRgds,
    Simon

  • Problems building a stand alone application with LV 8.6.1.

    I'm having problems building  a stand alone application with LV8.6.1. I'm using a USB- 6008 DAQ and USB-6501 Digital device in the application. I already have an simple executable on the machine so the Run time Engine is already installed.  For the USB DAQ device, I assume I need to include the DAQmx8.8 as one of the installers. When I attempt to build the application, I'm prompted for several disk, one being a distribuition disk 1. I have the installation disk for the developer package. I did not  see a distribuiton disk as one of the installation disks. When I insert disk 1 I get an error that another application is trying to run. Could someone tell me which installers I need to include and where do I find the "distributor" disk.
    Thank you,

    are you building installer for the first time on this PC?...It usually asks for the drivers CDs and some toolkits if required.
    you just need to use drivers CDs (comes with LabVIEW) from which you installed on this PC. If you have ever upgraded drivers, then you have to use the latest CDs only.......
    another issue may be ...when u insert the driver disk, it has autorun, it will launch drivers installation wizard....close that and then try to build distribution......... 
    Message Edited by Anil Reddy on 09-25-2009 01:22 PM
    Anil Punnam
    CLD
    LV 2012, TestStand 4.2..........

  • How to create a .mdf SQL Server database from a Data-Tier Application file that has data?

    This is a noob question, though I do use SQL Server databases all the time with Entity Framework when I code in C# using Visual Studio 2013.  The development environment is found below at [A].  I am trying to make a clone of a SQL Server 2008 R2
    database (.mdf)  that exists online.  I can read, connect and work with this database in Visual Studio 2013, but I wish to make a local copy of the database, as an .MDF file.  Somewhere in my notes I have a way of creating a local copy from
    an online database when using Visual Studio but I forgot how (it seems, reviewing my notes, that it deals with ADO.NET which is deprecated in Visual Studio 2013 these days, or so it seems).  So I'm looking for another way.  What I did was create
    (or export) a "Data-Tier Application File" from the online SQL Server database, with data, and it seems to have worked in that this Data-Tier Application file exists on my hard drive and seems to have data in it ("SQL Server Replication Snapshot"
    is the format it seems).  It contains skeleton code to create a database, but when I tried to execute it with SQL Server 2014 Management Studio, I got a bunch of errors.
    So my question is:
    1) Can I somehow create a .MDF SQL Server Database from an Data-Tier Application file that has data?  What tool do I use?  I saw this link, http://social.technet.microsoft.com/wiki/contents/articles/2639.how-to-use-data-tier-application-import-and-export-with-a-windows-azure-sql-database.aspx 
    and it relates to Azure, but is there a tool for C#Visual Studio 2013, standalone?
    2) If there's an easy way to create a .mdf SQL Server Database file from an online file, within SQL Server Management Studio?  I don't think so, since it would require Administrator permissions on the online server, which I don't have. I have permission
    to read, update, delete the online database file, but strangely not to download it (the service I use has a tool for backup, but not for download).
    3) same question as 2), but for Visual Studio 2013?  I don't think so, since I notice none of the templates even mentions ADO.NET anymore, but instead they go with Entity Framework.  Using EF I can of course do anything I want with the online database
    (CRUD), but it remains online.  Maybe there's a switch to make a local copy?  I guess I could write a short program to suck all the data out of the online database and put it into a new, duplicate database having the same tables, that I create on
    my localhost, but my question here is if there's an easier way than this, maybe a tool or command I can run from inside Visual Studio?
    Any advice on any of the above questions is appreciated.
    Thank you,
    Paul
    [A] Microsoft Visual Studio Professional 2013
    Version 12.0.21005.1 REL
    Microsoft .NET Framework
    Version 4.5.51641
    Microsoft Web Developer Tools 2013   2.0.40926.0
    SQL Server Data Tools   12.0.30919.1
    Microsoft SQL Server Data Tools
    Windows Azure Mobile Services Tools   1.0
    Windows Azure Mobile Services Tools

    Thanks but these links are too general to help.
    "2. what do you mean by online file?" - I mean the SQL Server database file is on a remote web server that I rent from, but I am not the administrator of.  I can access my database using SQL Server Authentication, but nothing more.
    Paul
    What do you mean by too general? It explains on how you can use data tier application to create and deploy databases
    May be this will help you to understand better
    http://www.databasejournal.com/features/mssql/article.php/3911041/Creating-Data-Tier-Applications--in-SQL-Server-2008-R2.htm
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • When I open Firefox the following alert appears: "Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory." There is a solution in the forum but only for Windows based

    When I open the application the following alert appears: "Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory." There is a solution on the support site but only for Windows-based Firefox, and I'm a Mac user. I have plenty of room on my hard disk.
    == This happened ==
    Every time Firefox opened
    == Two days ago, for no apparent reason.

    In Mac OS X v10.7, the $HOME/Library folder is a hidden folder.
    Open Finder and use one of these:
    * Go > Go To Folder (Shift-Command-G) and in the dialog type: ~/Library
    * Open the "Go" menu and hold down the Option key to make the Library appear
    You can also use this command in a Terminal window to remove the hidden flag.
    * Mac HD > Applications > Utilities > Terminal
    * chflags nohidden ~/Library

  • Problem in downloading and installing application ...

    hey
     m havng problem in downloading and installing application on mah x2-01 . many times i tried to dwnload whatsapp to mah phn and if the application isz downloaded thn while verifyng the no. it says error unitterupted problem in contacting the server . so knw wht shud i do . i hav also restrore mah phn thn too. plz help me 

    You may verify first your mobile number from this link. Make sure to sign in and under Mobile numbers, click Verify now. 

Maybe you are looking for

  • Wierd noise when Using the XP partition

    Hey guys, When I'm using the XP partition I would also plug in another monitor while working. I would get this weird sound (like a robot) followed by pauses or short freezes when in the middle of my work. It doesn't happen all the time but only when

  • Accessing classes in external jar files

    I have a jar file called main. I want it to be able to acces the classes in another jar file say test.jar how do i do this. Thank you

  • Creating Materialized Views as sys

    Version: 10.2.0.4 Sun Solaris. Sometimes I am able to create application account mviews using sys account ( using alter session set current_schema=abcd ). Sometimes it errors out. But when I run the same script after logging as application account it

  • Cannot install newest upgrade version of Flash Player

    I have uninstalled older version. Install gets to about 50% and then requests I close Explorer. After closing all tabs I retry and it keeps telling me to close Explorer. Repeated attempts have gotten same results.

  • Menu "clear recent history is not actif? how to make actif?

    how to make actif menu clear recent history?