Tomcat external session store and WebRatio webapp.

03 Jun '14, 05:35 PM
54,109 Views
Forum Forum Starter - Level 2

Hi,

Is it possible to use any external session store for tomcat running a WebRatio generated webapp? I need it to be able to do hot redeploy of my app without loosing user's sessions but with restarting tomcat (if redeploying alive it will give permgen or outoufmemory sooner or later), using 2 tomcat instances pointing to the same session store. (I just start 2nd instance, change apache config to point to 2nd instance, reload apache2 and stop 1st instance).

I tried tomcat-redis-session-manager but it gives an error sometimes in some struts file like DynActionForm or so complaining about lastURL parameter. And i also tried memcached-session-manager with all possible serializers but Jump Components of WebRatio doesn't work with it (when it makes some push of context/session stack).

 

Thanks

 
x 0
Follow
Answer Answer at this question and get points!
Forum Starter - Level 2

Hi,

 

The solution of your session persistance problem is creating a Tomcat clustering environment with min. 2 Tomcat 6.x instances (there is a lot of documentation about configuration of  tomcat clusters on apache website). Also, you can find a good tutorial about this feature at   http://www.mulesoft.com/tcat/tomcat-clustering.

 

Good luck

 
x 1
Forum Starter - Level 2

Hi, thanks for your answer! But i think clustering requieres sticky sessions, or no? That's what i don't want, i (almost) don't have 2 instances running at the same time so i don't use load balancer so i want all new connections to go directly to new tomcat instance to stop old instance as soon as possible.

And i have tomcat 7.

 
x 0
Forum Starter - Level 2

Hi,

 

I don't understand why you want to avoid sticky session. But, to answer your question, one solution will be, indeed, "memcached-session-manager". Please provide a log files in order to try to identify the errors raised in the implementation. This approach (memcached-session-manager) should work. 

 
x 0
Forum Starter - Level 2

Hi,

About sticky sessions: I don't use load balancer and 99% of time i habe only one instance of tomcat launched (so sticky sessions are useless there). When i launch 2nd instance i change config of httpd to point to second instance only (no load balancer) and stop 1st instance.
 

Sometimes i have 100% cpu usage when using memcached but here last post seems to have the solution https://code.google.com/p/spymemcached/issues/detail?id=279

Exceptions that occur when using some of the serializers of memcached-session-manager:

 

ERROR ajp-apr-8009-exec-6 com.webratio.struts.exceptions.GenericExceptionHandler - An error occurred executing action for 'page31'
java.lang.NullPointerException: The type for property lastURL is invalid
    at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:442)
    at com.webratio.struts.actions.PageAction.doExecute(PageAction.java:409)
    at com.webratio.struts.actions.PageAction.execute(PageAction.java:76)
    at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
    at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

 

or, another serializers give this error (which is in WebRatio's Jump Unit code):

ERROR ajp-apr-8009-exec-10 com.webratio.struts.exceptions.GenericExceptionHandler - An error occurred executing action for 'pcu18d'
java.lang.NullPointerException
    at com.webratio.units.controlflow.rtx.JumpUnitService$JumpHistory.jumpForward(JumpUnitService.java:428)
    at com.webratio.units.controlflow.rtx.JumpUnitService.executeForward(JumpUnitService.java:141)
    at com.webratio.units.controlflow.rtx.JumpUnitService.execute(JumpUnitService.java:122)
    at com.webratio.units.controlflow.rtx.JumpUnitService_$$_javassist_197._d0execute(JumpUnitService_$$_javassist_197.java)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)

 

I think maybe it's possible to write my own Jump Unit alternative without pushing/poping history/context stacks.

 
x 0
Answer at this question and get points!

Related questions

404 on generated app page 500 error with WebRatio BPM 502 proxy error-generate and run A Commercial Hosting Service for the publication of a Website? Admin area disabled aggiornamento fallito a causa di un errore interno Ajax and FCK Editor (WebRatio 5.x) AJAX events problem to external JavaScript Ajax onchange and jQuery 2.x (with migrate plugin) incompatible Any sample deployment application not deploying properly Automatization of deployment AWS Elastic Beanstalk y Webratio Build Project. Only files for compilation .class Can I deploy an application to the cloud using RightScale and/or Scalr? Can I integrate Amazon S3 and/or Amazon CloudFront? Can I use Git with Webratio Cannot invoke method putAll() on null object Cannot invoke method selectSingleNode() on null object Can't generate and run database or start tomcat server! Can't run any aplication Code is exceeding the 65535 bytes limit error on JBOSS Compare with the current time Component computation com.webratio.struts.exceptions.WRSecurityException: Invalid request target host Connection refused. Database connection, Host and Port number DB in Data Service Project Debug configuration Default error pages Dependencies installation error Deploy de proyecto en HTTPS Deploying to CloudBees Deploy web project da riga di comando error activating student account Error deploying Bookstore sample to cloud Error deploying WAR against to JBOSS Error testing mobil app in android Error updating metadata process Error when updating to WR 7.2.3 Filtros Caracteres Especiales Find Model Problemas Format currency From BPM to WebProject - BUILD FAILED Generation errors on ajax enabled page with many components, ajax links and selective refresh "Generation Error" with Generate and Run Generation options problem Groovy script numer after an error Hacer pruebas unitarias y de integración / Unit Test in WebRatio HelloWorld Unit sample code Help with math unit. Debug mode says error as result code Hide form until a flow is triggered Hierarchy component How to accelerate the generation process? How to avoid language selection automatically according to the browser? how to delete this error? How to disble derby database? How to get a wr:AjaxURL tag working i can't install mobile version on windows I can't install Webratio on my Desktop (Ubuntu 13.04 x64) I can't run any application with WebRatio (Table/View 'APP.POST' does not exist) Installation with java 1.8 Installazione Macosx invio mail fallito java.lang.NullPointerException java virtual machine error Job not start correctly JSP/DO issues on Tomcat 5.5 (Ubuntu) Login Error mandatory control code parameter is missing Mensaje: the selection cannot be launched and there are no recent launches Missing plugin emulation support error Missing units when importing project Multi Selects didn't work in update page Next Activity Note property - Error synchronizing with web project No access to protected site view with Login No Apache Derby driver found No cloud accounts available No database on my cloud account Page Home - First time the Project Web begins Problema al generar y ejecutar proyecto Problema generando la logica de un proyecto Problema generazione codice Problema Grafo da una lista gerarchica Problema ¨HTTP Status 404" Problemas con el Operations View Delete Problem: Compile Failed problemi installazione su Mac sistema operativo OSX El Capitan problem on first deploy with webratio Problems to connect Sql Server DB from Webratio Problem syncing reports Problem to run an Application Problem with application runnung Problem with encoding Problem with execution of webratio Problem with fields with accents used in attribute condition Problem with ireport Problem with the deletion of more than 50.000 records in a table Project cannot be opened with WebRatio Community Platform Project generation best practices redeployCheckInterval property REST connection and Mobile App deploy Root Context & Enterprise Project Sample web application Showing items that have a relation with an entity Solve "Generation Error" with Generate and Run option Some hint before I generate and deploy a webapp on a 64-bit windows system? Start Job when WebApp starts Student reserved area, download error Table 'freeapp43.profesion' doesn't exist Tomcat buttons "Unable to close sub-context ..." Unable to compute the controller URL(s) for applicationUnable to compute the controller URL(s) for application having status PROVISIONING Unable to connect to Internet Unable to execute the script java.lang.NullPointerException Unable to find Cloud free function Unable to get ExpenseReport example work in WebRation Personl 7.2.2 Unable to instantiate a new application instance Unable to update the web project Unspecified BPM Engine Database Updating attributes of an entity Urgent: Google Chrome download error, Unsure User Login Timestamp Use Running profile en project Webratio Add-ons no permite login Web Ratio Add-ons shop not working WEBRATIO LINUX AT EXECUTION TIME Web Ratio Mobile plateform Macos Sierra Web Ratio Mobile - Remote data mapping problem Webratio with Git support When execute my web application I have this error: returned a null bean Where can i find ifml sample with webratio? XPCOM Error