Enhydra 5 application on tomcat 7 - tomcat7

I have an application using enhydra 5 framework running on a resin 2 server.
Moving this application to a tomcat 7 server is giving me issues.
I was able to get the application deployed on tomcat server, but the session data is lost between requests. I compared the values by debugging the application on tomcat and resin and found that the session values are available in resin.
Does anyone have any idea or provide me the link to get Enhydra source code.
It is a very old framework and was written in 2000.

I did a little digging and the best I could come up with was http://www.together.at/download which appears to be where this code migrated to but there is no sign of an accessible source repository or src bundles for old versions.
It sounds like there may be a configuration problem at work here. Something as simple as looking at the HTTP headers may shed some light on what is going wrong.
Another option I sometimes use when the source code isn't immediately to hand is JAD. The decompiled code isn't always the most readable but it is usually good enough to figure out what is going wrong.

Related

Can weblogic cache reponses to get requests?

I don't mean using coherence. I am looking for a way to avoid hitting my application to look something up that I've already looked up. When the client performs a GET on a resource I want it to hit the application the first time only and after that return a cached copy.
I think I can do this with apache and mod_mem_cache, but I was hoping there was a weblogic built in solution that I'm just not able to find.
Thanks.
I don't believe there's inbuilt features to do that across the entire app server, but if you want to do it programmatically, perhaps CacheFilter might work.

"Too Many Open Files" error on Cloudfoundry

I receive the dreaded "Too Many Open Files" error after about 5 minutes running my application. This is a showstopper for me. I do know there is a 256 open file limit. I ran lsof to track down if I have a leak. I found that many of the open handles are simply connections Tomcat and other processes must make. The "nginx" process seems to be the only one that fluctuates but it still only goes to a maximum around 81. My application does not seem to leak file descriptors. I absolutely love Cloud Foundry. It is the first PAAS that hasn't required I refactor my application to make things work. When is the file limit going to be raised? I use Micro Cloud Foundry for testing but I want to run on the Hosted Cloud Foundry as soon as possible. I get this error in both versions. Is there a way around this? I tried modifying the limit on the Micro Cloud instance but I get errors saying I do not have the rights to make that kind of change. Any help or suggestions on this?
The new file descriptor quota is in the following database migration:
https://github.com/cloudfoundry/cloud_controller_ng/blob/master/db/migrations/20130131184954_new_initial_schema.rb
Line 185.
This particular setting will not take effect on our http://cloudfoundry.com until the April time frame when we emerge from our beta status and our "Next Generation" components are in production.
If you run your own version of Cloud Foundry, you could run this migration, assuming you are using cloud_controller_ng.
The Micro Cloud Foundry we are using internally for development does have the new cloud controller in it. You can read how we get that running for our own purposes here:
We are in a bit of a transition period as we deprecate the legacy bits and move towards these NG components. Apologies for the hitches, but they will be worth the cost. Thanks for your patience.
Best,
Matt Reider
Product Manager
Cloud Foundry
I logged in as the root user. I modified both the /var/vcap/packages/dea/dea/lib/dea/agent.rb file and the /etc/security/limits.conf file.
For the agent.rb file I followed the instructions here:
http://mdahlman.wordpress.com/2012/04/20/micro_cloud_foundry/
For the limits.conf file I followed the instructions here:
http://myadventuresincoding.wordpress.com/2010/10/09/ubuntu-increasing-the-maximum-number-of-open-files/
I am not sure which fix helped or if it required modifying both files. The application seems to be working now so I am moving on. If someone has a better solution I would be happy to hear it.
This only allows me to run my application on a self hosted micro cloud foundry. It would be much better if someone had a solution for the hosted version. Unfortunately I would have to find some way to limit my app to use under 256 file descriptors and that is not likely to happen.

Best way to rotate apache log files on Windows

Being new to the Windows server platform I need some input to figure out which way is the best to rotate the apache log files. The server version is Apache/2.0.47 (Win32).
Apache is shipped with the rotatelogs.exe. I found this (rather) old post http://www.sitebuddy.com/Apache/Cat/Logging saying
Conclusion: It is unusable and dangerous (it will eat up all your
memory/file handlers ...etc...).
You can not even use rotatelogs.exe on 4+ sites, Apache will
lockup when starting (tested on Apache 2.2.0).
Same guy has created a dll-file http://www.sitebuddy.com/mod_log_rotate which I'm not to sure that our hosting company will be to happy to implement on the production servers.
So since we are running this rather old version of Apache (which I'm stuck with, since it is really the IBM HTTP Server shipped with WebSphere) I'm afraid of the rotatelog.exe, anyone aware of what would be the best option to implement?
Our hosting partner decided not to allow usage of rotatelogs.exe since they have had some issues for other customers. Therefore the solution was to create a PowerShell-script, that stopped the service, rotated the logs and started the service again.

Session variables for classic ASP running on IIS7

Seems that lot of people already know that issue but I can not find solution.
We transferred our web app from IIS6 to IIS7. For authentication purposes and some other functions we using session variables.
While on IIS6 we did not had any problem but now all users losing their time and patience because app variables are being lost somewhere between pages being submitted and as a result users get kicked out of the app.
Server is 2008 R2 with 64 bit OS.
Default installation by Dell so it should be running on 64 bit mode.
We do not have any third party elements or modules. All developed in-house.
Database obviously MS SQL 2008 as well, on the same server (I know it is bad but we limited in resources and money).
So does anyone know what is going on and how to fix this?
Resolution of that problem is simple: do not use any other port except 80.
As soon as I moved site to separate IP with port 80 (use of header on the same IP was not tested) -- all problem gone....
Have you deployed your application as a new website or a virtual directory on the IIS ?
Remember that for the methods in the global.asa to be executed by the server you need to deploy your application as a new website not just a virtual directory under an existing web site.
I think the best way is to add logging code to trace when exactly a session variable is lost; after a post back to the server, redirection, etc... to try to narrow down the causes.
good luck.
Look here for a solution...
the intrinsic checkbox fixed my problem

Using Direct Connect access to ArcGIS databases in standalone applications

I work in an enterprise designing, creating and maintening custom applications on the base of ESRI ArcGIS. Some customers use Direct Connect, to connect to databases stored on Oracle or MS SQLServer. I have a problem with a standalone application for several months now.
I have an application, written in Delphi. One of the first things I do, of course, is opening the workspace.
pWorkspaceFactory:= CoSdeWorkspaceFactory.Create as IWorkspaceFactory;
pWorkspaceFactory.OpenFromFile('D:\directconnect.sde', WndHandle, pWorkspace);
This works fine for all "normal" connects, in some cases of direct connect it works fine too. But it may happen that I get on a different database a stackoverflow when calling OpenFromFile. Raising the MaxStackSize in the project options of the delphi project made it work on some Direct Connect databases. But it doesn't work for all.
Does anybody know the correct way to handle Direct Connects in standalone applications, without ArcMap? Accessing the databases in ArcMap has never been a problem, I think ArcMap has a special handling for Direct Connects.
Thanks for all ideas and replies. May the answer be with you ;-)
Greetings
warheart
Thank you for your comment. I can't post more details about the exception at the moment, because I can't reproduce it on my testdatabases. It's only out in the wild the exception occurs. But I can say that it happens in a (for me) closed ESRI-Dll, i cannot see the call stack of the dlls methods (OpenFromFile is an ESRI-Method in an ESRI-Dll). I would like to post such things, but I can't.
Could it have something to do with the DC library you are using? There are separate libraries for each version of ArcGIS and each flavor of database.

Resources