On 04/11/2011 07:01 AM, Amit k wrote:
Hi,
I actually tried that option. I know it works but under one situation it
fails. When your application require tomcat to interact with desktop it
fails and in my case, application in tomcat interacts with Desktop through
JNI call. So I cant use this option.
And moreover it is required to be done with script and not manually.
Hope someone has solution for this problem or specifically for scenario.
Usually services and desktop interaction are mutually exclusive.
What happens when you boot the box and no user is present.
It might work with XP, but making it work with Vista+ is
almost impossible cause services run in a different session.
Console window will be shown (not with older versions of
Commons Daemon, so that's why an older 5.5 didn't pop-up)
because it is needed for stdout/stderr redirection since
we explicitly call 'AllocConsole' which isn't displayed
with services cause services don't have GUI.
"Interact with desktop" usage is strongly discouraged since
you need some pretty complex stuff to make it work.
See:
http://msdn.microsoft.com/en-us/library/ms683502%28v=vs.85%29.aspx
We have a sort of service interaction (for making thread dumps)
but this is done via an mutex registered to a Global session.
(Basically a sort of IPC)
So I'd suggest you modify your application to use some sort
of IPC to communicate between the service and desktop processes
like suggested by MSDN.
Regards
--
^TM
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org