You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(13) |
Nov
(16) |
Dec
(29) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(38) |
Feb
(51) |
Mar
(51) |
Apr
(115) |
May
(82) |
Jun
(30) |
Jul
(50) |
Aug
(68) |
Sep
(57) |
Oct
(160) |
Nov
(80) |
Dec
(78) |
| 2004 |
Jan
(71) |
Feb
(75) |
Mar
(108) |
Apr
(87) |
May
(79) |
Jun
(70) |
Jul
(69) |
Aug
(39) |
Sep
(52) |
Oct
(47) |
Nov
(50) |
Dec
(32) |
| 2005 |
Jan
(22) |
Feb
(122) |
Mar
(46) |
Apr
(76) |
May
(31) |
Jun
(51) |
Jul
(61) |
Aug
(70) |
Sep
(37) |
Oct
(46) |
Nov
(57) |
Dec
(83) |
| 2006 |
Jan
(55) |
Feb
(81) |
Mar
(51) |
Apr
(67) |
May
(77) |
Jun
(43) |
Jul
(106) |
Aug
(64) |
Sep
(47) |
Oct
(64) |
Nov
(60) |
Dec
(12) |
| 2007 |
Jan
(50) |
Feb
(93) |
Mar
(49) |
Apr
(56) |
May
(40) |
Jun
(63) |
Jul
(40) |
Aug
(47) |
Sep
(54) |
Oct
(37) |
Nov
(54) |
Dec
(37) |
| 2008 |
Jan
(35) |
Feb
(39) |
Mar
(26) |
Apr
(14) |
May
(23) |
Jun
(51) |
Jul
(43) |
Aug
(26) |
Sep
(29) |
Oct
(31) |
Nov
(24) |
Dec
(16) |
| 2009 |
Jan
(21) |
Feb
(30) |
Mar
(74) |
Apr
(26) |
May
(26) |
Jun
(43) |
Jul
(23) |
Aug
(23) |
Sep
(15) |
Oct
(27) |
Nov
(37) |
Dec
(10) |
| 2010 |
Jan
(16) |
Feb
(28) |
Mar
(16) |
Apr
(45) |
May
(8) |
Jun
(68) |
Jul
(45) |
Aug
(44) |
Sep
(51) |
Oct
(7) |
Nov
(20) |
Dec
(21) |
| 2011 |
Jan
(14) |
Feb
(17) |
Mar
(7) |
Apr
(7) |
May
(48) |
Jun
(23) |
Jul
(5) |
Aug
(33) |
Sep
(22) |
Oct
(14) |
Nov
(14) |
Dec
(5) |
| 2012 |
Jan
|
Feb
(10) |
Mar
(12) |
Apr
(51) |
May
(10) |
Jun
(8) |
Jul
(14) |
Aug
(22) |
Sep
(9) |
Oct
(24) |
Nov
(14) |
Dec
(13) |
| 2013 |
Jan
(12) |
Feb
(4) |
Mar
(14) |
Apr
(19) |
May
(2) |
Jun
(5) |
Jul
(13) |
Aug
(10) |
Sep
(4) |
Oct
(11) |
Nov
(13) |
Dec
(2) |
| 2014 |
Jan
(3) |
Feb
(14) |
Mar
(5) |
Apr
(10) |
May
(10) |
Jun
(11) |
Jul
(10) |
Aug
(3) |
Sep
(13) |
Oct
(22) |
Nov
(14) |
Dec
(32) |
| 2015 |
Jan
(8) |
Feb
(2) |
Mar
(17) |
Apr
(1) |
May
(24) |
Jun
|
Jul
(4) |
Aug
|
Sep
(9) |
Oct
(9) |
Nov
(5) |
Dec
(2) |
| 2016 |
Jan
(8) |
Feb
(6) |
Mar
(6) |
Apr
(9) |
May
(3) |
Jun
(2) |
Jul
(7) |
Aug
(6) |
Sep
|
Oct
|
Nov
(1) |
Dec
(6) |
| 2017 |
Jan
(9) |
Feb
(8) |
Mar
(6) |
Apr
|
May
|
Jun
(3) |
Jul
(13) |
Aug
(10) |
Sep
(8) |
Oct
|
Nov
(6) |
Dec
|
| 2018 |
Jan
|
Feb
(5) |
Mar
(7) |
Apr
(2) |
May
|
Jun
|
Jul
(3) |
Aug
(2) |
Sep
(9) |
Oct
(1) |
Nov
(1) |
Dec
(1) |
| 2019 |
Jan
(9) |
Feb
|
Mar
|
Apr
(10) |
May
(3) |
Jun
|
Jul
(7) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2020 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2021 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(3) |
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2023 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2024 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2026 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Leif M. <le...@ta...> - 2004-03-06 15:05:11
|
Robert, SourceForge maintains a searchable archive of this list at the following location: http://sourceforge.net/mailarchive/forum.php?forum_id=11948 You can search using the search field in the upper left of the page. It was not clear at first that that is what you should use because it is there on all SF site pages. These archives seem to go down from time to time. But if you wait a day or two, they always seem to get them back up and running. Cheers, Leif Augustyn, Robert non Unisys wrote: >Hi, >I have few problems and before I start asking questions would like to do some searching first. >Is there a searchable version of this list available anywhere? >Thanks > > |
|
From: Leif M. <le...@ta...> - 2004-03-06 15:01:20
|
Richard,
When are you seeing this message? Does it happen shortly after your
application
was launched (within 30 seconds) or after your app has been running for
a while?
The first message "JVM appears hung: Timed out waiting for signal
from JVM."
is displayed when the Wrapper process first decides that there is a
problem with the
JVM. It then attempts to ask the JVM to shut itself down cleanly by
sending it a
stop command. This gives the JVM a chance to do any cleanup and shut itself
down cleanly.
If the JVM fails to shutdown on its own then the Wrapper will give
up and
forcibly kill it with a "kill -9". That is the message that you are seeing:
"JVM did not exit on request, terminated " It is printed right after
the kill
command because at that point, the JVM has failed to exit. The kill
command
will always work because it is killing a child process.
I assume that you digging into the code because you are having a
problem.
could you describe it?
Cheers,
Leif
Richard Emberson wrote:
> I get the following in wrapper logs on linux (not windows or solaris):
>
> JVM appears hung: Timed out waiting for signal from JVM.
> JVM did not exit on request, terminated
>
> Looking through the code in wrapper_unix.c I see the following in the
> function wrapperKillProcess() :
>
> kill(jvmPid, SIGKILL);
> log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_ERROR, "JVM did not
> exit on request, terminated");
>
> What does the message "JVM did not exit on request, terminated" mean?
> There is no test after the kill function is called to tell whether or
> not the JVM exited or not so how can one say that the JVM did not exit?
>
> Thanks.
> Richard
|
|
From: Leif M. <le...@ta...> - 2004-03-06 14:54:36
|
Shmul,
First of all 99% of the time. You do not want to be playing with
the timeouts. So
start by removing those from your wrapper.conf file.
I am making a wild guess here because you did not post much
information. But is
your application timing out and shutting down immediately after
startup? This is
usually caused because you specified your application's main class
directly in the
wrapper.conf file rather than using one of the helper classes like
WrapperSimpleApp.
Make sure that you have read over the integration section of the
documentation.
Most people make use of integration method #1.
If you have questions after reading that, please post with the
contents of your
wrapper.log file with the wrapper.debug=true property set. I need to be
able to
see that information to answer most questions.
Cheers,
Leif
sh...@vs... wrote:
>How can I completely disabled automatic JVM shutdowns that are caused
>by the JVM not responding to pings ?
>I have currently configured my service using the following lines but
>it didn't prevent the wrapper from shutting down the JVM:
>
>wrapper.cpu.timeout = 0
>wrapper.ping.interval = 3600
>wrapper.ping.timeout = 0
>
>Cheers,
>Shmul
>
>
|
|
From: Leif M. <le...@ta...> - 2004-03-06 14:49:46
|
Jennifer,
Sorry to keep you waiting. Busy week.
I tried this out and everything seems to be working correctly for
me. From your log
output, it looks like restart triggers get fired several times in rapid
succession. I tested
this and the Wrapper appears to be handling that correctly. Once the
restart has
started, additional restart requests are correctly ignored.
I think the problem is the following lines from your output:
INFO | jvm 7 | 2004/02/26 19:32:59 | Send a packet STOP : 0
DEBUG | wrapperp | 2004/02/26 19:32:59 | read a packet STOP : 0
DEBUG | wrapper | 2004/02/26 19:32:59 | JVM requested a shutdown. (0)
DEBUG | wrapper | 2004/02/26 19:32:59 | wrapperStopProcess(0) called.
Are you sure you are not calling System.exit or
WrapperManager.stop() someplace
in your code? If so that will override the restart request and cause
the Wrapper to
shutdown.
If you call System.exit, you will get the following in your log
output. System.exit
triggers a Shutdown Hook, which you have disabled, so I don't think this
what is
happening:
INFO | jvm 1 | main | 2004/03/06 23:27:15 | Wrapper Manager:
ShutdownHook started
INFO | jvm 1 | main | 2004/03/06 23:27:15 | Send a packet STOP : 0
DEBUG | wrapperp | main | 2004/03/06 23:27:15 | read a packet STOP : 0
DEBUG | wrapper | main | 2004/03/06 23:27:15 | JVM requested a
shutdown. (0)
DEBUG | wrapper | main | 2004/03/06 23:27:15 |
wrapperStopProcess(0) called.
DEBUG | wrapper | main | 2004/03/06 23:27:15 | Sending stop signal
to JVM
DEBUG | wrapperp | main | 2004/03/06 23:27:15 | send a packet STOP :
NULL
A call you WrapperManager.stop(0) on the other hand, looks like the
following. This is
exactly what is showing up in your log:
INFO | jvm 1 | main | 2004/03/06 23:29:06 | Send a packet STOP : 0
DEBUG | wrapperp | main | 2004/03/06 23:29:06 | read a packet STOP : 0
DEBUG | wrapper | main | 2004/03/06 23:29:06 | JVM requested a
shutdown. (0)
DEBUG | wrapper | main | 2004/03/06 23:29:06 |
wrapperStopProcess(0) called.
DEBUG | wrapper | main | 2004/03/06 23:29:06 | Sending stop signal
to JVM
DEBUG | wrapperp | main | 2004/03/06 23:29:06 | send a packet STOP :
NULL
Let me know if you don't think that is the cause or have questions
about to use
the filters.
Cheers,
Leif
Jennifer Kolar wrote:
> Leif,
>
> It appears that I never have a successful FILTER based restart. I
> have no problem getting restarts when I call WrapperManager.restart()
> internally.. however--
> if there is an exception that I didn't catch that a filter matches,
> then I never get a successful restart. I have had each of the
> following filters triggered always with the same result.
>
> I noticed that there was a recent email (Patrick Woodworth 1/23/2004)
> where another person was having similiar problems and he found
> disabling the shutdown hooks to be a soln for him.. I've had that
> disabled this whole time and don't see any difference.
>
>
> Here are my filter settings from my conf file.
>
> wrapper.filter.trigger.1=com.singingfish.werkflow.processors.ProcessorException
> wrapper.filter.action.1=RESTART
>
> wrapper.filter.trigger.2=java.lang.Error
> wrapper.filter.action.2=RESTART
>
> wrapper.filter.trigger.3=java.lang.OutOfMemoryError
> wrapper.filter.action.3=RESTART
>
>
> I also have these set if it provides any help.. ( I have tried
> playing around w/ different startup timeouts and invocation times and
> it seems to make no difference)
>
> wrapper.jvm_exit.timeout=30
> wrapper.cpu.timeout=10
> wrapper.ping.timeout=300
> wrapper.ping.interval=5
> wrapper.restart.delay=1
> wrapper.max_failed_invocations=3
> wrapper.successful_invocation_time=10
> wrapper.startup.timeout=30
> wrapper.request_thread_dump_on_failed_jvm_exit=FALSE
> wrapper.ignore_signals=TRUE
> wrapper.disable_shutdown_hook=TRUE
>
> And again, here is the result I see whenever a filter is triggered:
>
>
> *STATUS | wrapper | 2004/02/26 19:32:59 | Filter trigger matched.
> Restarting JVM.*
> *DEBUG | wrapper | 2004/02/26 19:32:59 | wrapperRestartProcess() called*
> ... (stuff from my stacktrack)
> *STATUS | wrapper | 2004/02/26 19:32:59 | Filter trigger matched.
> Restarting JVM.*
> *DEBUG | wrapper | 2004/02/26 19:32:59 | wrapperRestartProcess()
> called. (IGNORED)*
> INFO | jvm 7 | 2004/02/26 19:32:59 | java.lang.Error:
> com.singingfish.werkflow.processors.ProcessorException: Unexpected
> exception in cracker
> *STATUS | wrapper | 2004/02/26 19:32:59 | Filter trigger matched.
> Restarting JVM.*
> *DEBUG | wrapper | 2004/02/26 19:32:59 | wrapperRestartProcess()
> called. (IGNORED)*
> ... (stuff from my stack track)
> INFO | jvm 7 | 2004/02/26 19:32:59 | Send a packet STOP : 0
> DEBUG | wrapperp | 2004/02/26 19:32:59 | read a packet STOP : 0
> DEBUG | wrapper | 2004/02/26 19:32:59 | JVM requested a shutdown. (0)
> DEBUG | wrapper | 2004/02/26 19:32:59 | wrapperStopProcess(0) called.
> DEBUG | wrapper | 2004/02/26 19:32:59 | Sending stop signal to JVM
> DEBUG | wrapperp | 2004/02/26 19:32:59 | send a packet STOP : NULL
> INFO | jvm 7 | 2004/02/26 19:32:59 | Received a packet STOP :
> INFO | jvm 7 | 2004/02/26 19:33:00 | Thread,
> WrapperSimpleAppMain, handling the shutdown process.
> INFO | jvm 7 | 2004/02/26 19:33:00 | calling listener.stop()
> INFO | jvm 7 | 2004/02/26 19:33:00 | WrapperSimpleApp: stop(0)
> INFO | jvm 7 | 2004/02/26 19:33:00 | returned from listener.stop()
> INFO | jvm 7 | 2004/02/26 19:33:00 | Send a packet STOPPED : 0
> DEBUG | wrapperp | 2004/02/26 19:33:00 | read a packet STOPPED : 0
> DEBUG | wrapper | 2004/02/26 19:33:00 | JVM signalled that it was
> stopped.
> INFO | jvm 7 | 2004/02/26 19:33:00 | Closing socket.
> DEBUG | wrapperp | 2004/02/26 19:33:00 | socket read no code (closed?).
> INFO | jvm 7 | 2004/02/26 19:33:00 | calling System.exit(0)
> INFO | jvm 7 | 2004/02/26 19:33:00 | Server daemon shut down
> DEBUG | wrapper | 2004/02/26 19:33:00 | JVM exited normally.
> STATUS | wrapper | 2004/02/26 19:33:01 | <-- Wrapper Stopped
> STATUS | wrapper | 2004/02/26 19:36:28 | CrackerAgent3 removed.
>
>
> in comparison-- a normal restart has the following ...
>
>
> INFO | jvm 6 | 2004/02/26 19:31:48 | 2004-02-26 19:31:48,107
> DEBUG [WrapperSimpleAppMain] WerkflowAgent -
> WerkflowEngine requested VM restart (null). Shutting down...
> INFO | jvm 6 | 2004/02/26 19:31:48 | Send a packet RESTART : restart
> DEBUG | wrapperp | 2004/02/26 19:31:48 | read a packet RESTART : restart
> STATUS | wrapper | 2004/02/26 19:31:48 | JVM requested a restart.
> DEBUG | wrapper | 2004/02/26 19:31:48 | wrapperRestartProcess() called.
> DEBUG | wrapper | 2004/02/26 19:31:48 | Sending stop signal to JVM
> DEBUG | wrapperp | 2004/02/26 19:31:48 | send a packet STOP : NULL
> INFO | jvm 6 | 2004/02/26 19:31:48 | Received a packet STOP :
> INFO | jvm 6 | 2004/02/26 19:31:49 | Thread,
> WrapperSimpleAppMain, handling the shutdown process.
> INFO | jvm 6 | 2004/02/26 19:31:49 | calling listener.stop()
> INFO | jvm 6 | 2004/02/26 19:31:49 | WrapperSimpleApp: stop(0)
> INFO | jvm 6 | 2004/02/26 19:31:49 | returned from listener.stop()
> INFO | jvm 6 | 2004/02/26 19:31:49 | Send a packet STOPPED : 0
> DEBUG | wrapperp | 2004/02/26 19:31:49 | read a packet STOPPED : 0
> DEBUG | wrapper | 2004/02/26 19:31:49 | JVM signalled that it was
> stopped.
> INFO | jvm 6 | 2004/02/26 19:31:49 | Closing socket.
> DEBUG | wrapperp | 2004/02/26 19:31:49 | socket read no code (closed?).
> INFO | jvm 6 | 2004/02/26 19:31:50 | calling System.exit(0)
> INFO | jvm 6 | 2004/02/26 19:31:50 | Server daemon shut down
> DEBUG | wrapper | 2004/02/26 19:31:50 | JVM exited normally.
> STATUS | wrapper | 2004/02/26 19:31:52 | Launching a JVM...
> DEBUG | wrapper | 2004/02/26 19:31:52 | command:
> "C:\WINNT\system32\java.exe"
> -Dcom.singingfish.core.utils.config.dir=c:/sf/config
> -Duser.dir=C:\aolrun -Dsun.rmi.loader.logLevel=VERBOSE
> -Dsun.rmi.server.logLevel=VERBOSE -Dsun.rmi.transport.logLevel=VERBOSE
> -Dsun.rmi.transport.tcp.logLevel=VERBOSE
> -Dsun.rmi.transport.proxy.logLevel=VERBOSE -Xms3m -Xmx96m
> -Djava.library.path="c:/sf/lib;c:/winnt;c:/winnt/system32;c:/j2sdk1.4.2_02/bin"
> -classpath
> "c:/sf/java/classes;c:/sf/java/jars/commons-logging-1.0.3/commons-logging.jar;c:/sf/java/jars/jakarta-log4j-1.2.8/dist/lib/log4j-1.2.8.jar;c:/sf/java/jars/jakarta-oro-2.0.4/jakarta-oro-2.0.4.jar;c:/sf/java/jars/quicktime_6_5/QTJava.zip;c:/sf/java/jars/xerces-1_3_1/xerces.jar;c:/sf/java/jars/toplink/TOPLink.jar;c:/sf/java/jars/toplink/Tools.jar;c:/sf/java/jars/toplink/TOPLinkX.jar;c:/sf/java/jars/oracle_jdbc_9_2_03/ojdbc14.jar;c:/sf/java/jars/commons-httpclient-2.0/commons-httpclient-2.0-final.jar"
> -Dwrapper.key="VRxfE5Fd856GSIaF" -Dwrapper.port=32013
> -Dwrapper.debug="TRUE" -Dwrapper.ignore_signals="TRUE"
> -Dwrapper.service="TRUE" -Dwrapper.disable_shutdown_hook="TRUE"
> -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=7
> org.tanukisoftware.wrapper.WrapperSimpleApp
> com.singingfish.werkflow.agent.WerkflowAgent
> c:/sf/config/workflow/specs/cracker.spec CrackerAgent3
> DEBUG | wrapper | 2004/02/26 19:31:52 | Java Virtual Machine started
> (PID=9244)
> INFO | jvm 7 | 2004/02/26 19:31:52 | Wrapper Manager: JVM #7
> INFO | jvm 7 | 2004/02/26 19:31:52 | Wrapper Manager: Using wrapper
> INFO | jvm 7 | 2004/02/26 19:31:52 | Calling native
> initialization method.
> INFO | jvm 7 | 2004/02/26 19:31:52 | Initializing WrapperManager
> native library.
> INFO | jvm 7 | 2004/02/26 19:31:52 | Java Executable:
> C:\WINNT\system32\java.exe
> INFO | jvm 7 | 2004/02/26 19:31:52 | Java Version :
> 1.4.2_02-b03 Java HotSpot(TM) Client VM
> INFO | jvm 7 | 2004/02/26 19:31:52 | Java VM Vendor : Sun
> Microsystems Inc.
> INFO | jvm 7 | 2004/02/26 19:31:52 |
> INFO | jvm 7 | 2004/02/26 19:31:52 | Wrapper (Version 3.0.5)
> INFO | jvm 7 | 2004/02/26 19:31:52 |
> INFO | jvm 7 | 2004/02/26 19:31:52 | Open socket to wrapper
> attempted on port 32013...
> INFO | jvm 7 | 2004/02/26 19:31:52 | Opened Socket to port 3242
> INFO | jvm 7 | 2004/02/26 19:31:52 | Send a packet KEY :
> VRxfE5Fd856GSIaF
> INFO | jvm 7 | 2004/02/26 19:31:52 |
> handleSocket(Socket[addr=/127.0.0.1,port=32013,localport=3242])
> DEBUG | wrapperp | 2004/02/26 19:31:52 | accepted a socket from
> 127.0.0.1 on port 3242
> DEBUG | wrapperp | 2004/02/26 19:31:52 | read a packet KEY :
> VRxfE5Fd856GSIaF
> DEBUG | wrapper | 2004/02/26 19:31:52 | Got key from JVM:
> VRxfE5Fd856GSIaF
> DEBUG | wrapperp | 2004/02/26 19:31:52 | send a packet LOW_LOG_LEVEL : 1
> DEBUG | wrapperp | 2004/02/26 19:31:52 | send a packet PING_TIMEOUT : 300
> DEBUG | wrapper | 2004/02/26 19:31:52 | Start Application.
> ....
|
|
From: Jason L. <lu...@fa...> - 2004-03-05 16:45:22
|
rob...@un... said: > I have few problems and before I start asking questions would like to > do some searching first. Is there a searchable version of this list > available anywhere? http://news.gmane.org/gmane.comp.java.wrapper.user Jason |
|
From: <bar...@on...> - 2004-03-05 16:26:43
|
Hi, I am having an Fileshareing server application in a jarfile. Now I wanted to run it as a service. I dont get it running with nohup in the background. Then I found wrapper ... I configured as discribed in the integration. As it is an JAR file application, that dont need any parameters (only config file) on startup, I found in the FAQ, that I need to look into the manifest.mf but I dont get it running. Below I pasted the LogOutputs with debug Infos. I hope someone can help me get it running Thx in advance Barney -------------------------------------------- I have everything in the current directory: <<<<<<<< script >>>>>>>>> # Application APP_NAME="AJ_Server" APP_LONG_NAME="Applejuice Java Server" # Wrapper WRAPPER_CMD="./wrapper" WRAPPER_CONF="./ajserver.conf" # Priority at which to run the wrapper. See "man nice" for valid priorities. # nice is only used if a priority is specified. PRIORITY= # Location of the pid file. PIDDIR="/var/run" <<<<<<<<< conf >>>>>>>>>> # from META-INF/MANIFEST.MF wrapper.java.mainclass=de/applejuicenet/server/Daemon wrapper.java.classpath.1=./wrapper.jar wrapper.java.classpath.2=./ajserver.jar wrapper.java.library.path.1=./ ==================================== Now I am getting the following in the logfile (debug on) <<<<<<<< log >>>>>>>>> DEBUG | wrapper | 2004/03/05 16:22:58 | Spawning intermediate process... DEBUG | wrapper | 2004/03/05 16:22:58 | Spawning daemon process... STATUS | wrapper | 2004/03/05 16:22:58 | --> Wrapper Started as Daemon DEBUG | wrapperp | 2004/03/05 16:22:58 | server listening on port 32000. DEBUG | wrapper | 2004/03/05 16:22:59 | Command[0] : java DEBUG | wrapper | 2004/03/05 16:22:59 | Command[1] : -Xms32m DEBUG | wrapper | 2004/03/05 16:22:59 | Command[2] : -Xmx128m DEBUG | wrapper | 2004/03/05 16:22:59 | Command[3] : -Djava.library.path=./ DEBUG | wrapper | 2004/03/05 16:22:59 | Command[4] : -classpath DEBUG | wrapper | 2004/03/05 16:22:59 | Command[5] : ./wrapper.jar:./ajserver.jar DEBUG | wrapper | 2004/03/05 16:22:59 | Command[6] : -Dwrapper.key=a_DbQegXe3TBBZN8 DEBUG | wrapper | 2004/03/05 16:22:59 | Command[7] : -Dwrapper.port=32000 DEBUG | wrapper | 2004/03/05 16:22:59 | Command[8] : -Dwrapper.debug=TRUE DEBUG | wrapper | 2004/03/05 16:22:59 | Command[9] : -Dwrapper.service=TRUE DEBUG | wrapper | 2004/03/05 16:22:59 | Command[10] : -Dwrapper.cpu.timeout=10 DEBUG | wrapper | 2004/03/05 16:22:59 | Command[11] : -Dwrapper.jvmid=1 DEBUG | wrapper | 2004/03/05 16:22:59 | Command[12] : de/applejuicenet/server/Daemon STATUS | wrapper | 2004/03/05 16:22:59 | Launching a JVM... INFO | jvm 1 | 2004/03/05 16:23:02 | 4:23:02 PM start server INFO | jvm 1 | 2004/03/05 16:23:04 | 4:23:04 PM timediff: 2170ms ERROR | wrapper | 2004/03/05 16:23:30 | Startup failed: Timed out waiting for signal from JVM. ERROR | wrapper | 2004/03/05 16:23:30 | JVM did not exit on request, terminated DEBUG | wrapper | 2004/03/05 16:23:30 | JVM was only running for 31 seconds leading to a failed restart count of 1. DEBUG | wrapper | 2004/03/05 16:23:36 | Command[0] : java DEBUG | wrapper | 2004/03/05 16:23:36 | Command[1] : -Xms32m DEBUG | wrapper | 2004/03/05 16:23:36 | Command[2] : -Xmx128m DEBUG | wrapper | 2004/03/05 16:23:36 | Command[3] : -Djava.library.path=./ DEBUG | wrapper | 2004/03/05 16:23:36 | Command[4] : -classpath DEBUG | wrapper | 2004/03/05 16:23:36 | Command[5] : ./wrapper.jar:./ajserver.jar DEBUG | wrapper | 2004/03/05 16:23:36 | Command[6] : -Dwrapper.key=mi_bxg8Mj1mV092R DEBUG | wrapper | 2004/03/05 16:23:36 | Command[7] : -Dwrapper.port=32000 DEBUG | wrapper | 2004/03/05 16:23:36 | Command[8] : -Dwrapper.debug=TRUE DEBUG | wrapper | 2004/03/05 16:23:36 | Command[9] : -Dwrapper.service=TRUE DEBUG | wrapper | 2004/03/05 16:23:36 | Command[10] : -Dwrapper.cpu.timeout=10 DEBUG | wrapper | 2004/03/05 16:23:36 | Command[11] : -Dwrapper.jvmid=2 DEBUG | wrapper | 2004/03/05 16:23:36 | Command[12] : de/applejuicenet/server/Daemon STATUS | wrapper | 2004/03/05 16:23:36 | Launching a JVM... INFO | jvm 2 | 2004/03/05 16:23:39 | 4:23:39 PM start server INFO | jvm 2 | 2004/03/05 16:23:41 | 4:23:41 PM timediff: 39220ms INFO | jvm 2 | 2004/03/05 16:24:00 | 4:24:00 PM check IP INFO | jvm 2 | 2004/03/05 16:24:00 | 4:24:00 PM serverip: 80.134.23.111 INFO | jvm 2 | 2004/03/05 16:24:01 | java.lang.NullPointerException INFO | jvm 2 | 2004/03/05 16:24:01 | at de.applejuicenet.server.Daemon.cancel(TRUX) INFO | jvm 2 | 2004/03/05 16:24:01 | at de.applejuicenet.server.Daemon.main(TRUX) INFO | jvm 2 | 2004/03/05 16:24:01 | 4:24:01 PM shutdown server ERROR | wrapper | 2004/03/05 16:24:07 | Startup failed: Timed out waiting for signal from JVM. ERROR | wrapper | 2004/03/05 16:24:07 | JVM did not exit on request, terminated DEBUG | wrapper | 2004/03/05 16:24:07 | JVM was only running for 31 seconds leading to a failed restart count of 2. DEBUG | wrapper | 2004/03/05 16:24:13 | Command[0] : java DEBUG | wrapper | 2004/03/05 16:24:13 | Command[1] : -Xms32m DEBUG | wrapper | 2004/03/05 16:24:13 | Command[2] : -Xmx128m DEBUG | wrapper | 2004/03/05 16:24:13 | Command[3] : -Djava.library.path=./ DEBUG | wrapper | 2004/03/05 16:24:13 | Command[4] : -classpath DEBUG | wrapper | 2004/03/05 16:24:13 | Command[5] : ./wrapper.jar:./ajserver.jar DEBUG | wrapper | 2004/03/05 16:24:13 | Command[6] : -Dwrapper.key=fCWMT4xc5U6639Xa DEBUG | wrapper | 2004/03/05 16:24:13 | Command[7] : -Dwrapper.port=32000 DEBUG | wrapper | 2004/03/05 16:24:13 | Command[8] : -Dwrapper.debug=TRUE DEBUG | wrapper | 2004/03/05 16:24:13 | Command[9] : -Dwrapper.service=TRUE DEBUG | wrapper | 2004/03/05 16:24:13 | Command[10] : -Dwrapper.cpu.timeout=10 DEBUG | wrapper | 2004/03/05 16:24:13 | Command[11] : -Dwrapper.jvmid=3 DEBUG | wrapper | 2004/03/05 16:24:13 | Command[12] : de/applejuicenet/server/Daemon STATUS | wrapper | 2004/03/05 16:24:13 | Launching a JVM... INFO | jvm 3 | 2004/03/05 16:24:16 | 4:24:16 PM start server INFO | jvm 3 | 2004/03/05 16:24:21 | 4:24:21 PM timediff: 20647ms INFO | jvm 3 | 2004/03/05 16:24:30 | 4:24:30 PM check IP INFO | jvm 3 | 2004/03/05 16:24:30 | 4:24:30 PM serverip: 80.134.23.111 INFO | jvm 3 | 2004/03/05 16:24:31 | java.lang.NullPointerException INFO | jvm 3 | 2004/03/05 16:24:31 | at de.applejuicenet.server.Daemon.cancel(TRUX) INFO | jvm 3 | 2004/03/05 16:24:31 | at de.applejuicenet.server.Daemon.main(TRUX) INFO | jvm 3 | 2004/03/05 16:24:31 | 4:24:31 PM shutdown server ERROR | wrapper | 2004/03/05 16:24:44 | Startup failed: Timed out waiting for signal from JVM. ERROR | wrapper | 2004/03/05 16:24:44 | JVM did not exit on request, terminated DEBUG | wrapper | 2004/03/05 16:24:44 | JVM was only running for 31 seconds leading to a failed restart count of 3. DEBUG | wrapper | 2004/03/05 16:24:50 | Command[0] : java DEBUG | wrapper | 2004/03/05 16:24:50 | Command[1] : -Xms32m DEBUG | wrapper | 2004/03/05 16:24:50 | Command[2] : -Xmx128m DEBUG | wrapper | 2004/03/05 16:24:50 | Command[3] : -Djava.library.path=./ DEBUG | wrapper | 2004/03/05 16:24:50 | Command[4] : -classpath DEBUG | wrapper | 2004/03/05 16:24:50 | Command[5] : ./wrapper.jar:./ajserver.jar DEBUG | wrapper | 2004/03/05 16:24:50 | Command[6] : -Dwrapper.key=FBbxFJJLDQRGZORT DEBUG | wrapper | 2004/03/05 16:24:50 | Command[7] : -Dwrapper.port=32000 DEBUG | wrapper | 2004/03/05 16:24:50 | Command[8] : -Dwrapper.debug=TRUE DEBUG | wrapper | 2004/03/05 16:24:50 | Command[9] : -Dwrapper.service=TRUE DEBUG | wrapper | 2004/03/05 16:24:50 | Command[10] : -Dwrapper.cpu.timeout=10 DEBUG | wrapper | 2004/03/05 16:24:50 | Command[11] : -Dwrapper.jvmid=4 DEBUG | wrapper | 2004/03/05 16:24:50 | Command[12] : de/applejuicenet/server/Daemon STATUS | wrapper | 2004/03/05 16:24:50 | Launching a JVM... INFO | jvm 4 | 2004/03/05 16:24:53 | 4:24:53 PM start server INFO | jvm 4 | 2004/03/05 16:24:55 | 4:24:55 PM timediff: 53168ms INFO | jvm 4 | 2004/03/05 16:25:03 | 4:25:03 PM check IP INFO | jvm 4 | 2004/03/05 16:25:03 | 4:25:03 PM serverip: 80.134.23.111 INFO | jvm 4 | 2004/03/05 16:25:04 | java.lang.NullPointerException INFO | jvm 4 | 2004/03/05 16:25:04 | at de.applejuicenet.server.Daemon.cancel(TRUX) INFO | jvm 4 | 2004/03/05 16:25:04 | at de.applejuicenet.server.Daemon.main(TRUX) INFO | jvm 4 | 2004/03/05 16:25:04 | 4:25:04 PM shutdown server ERROR | wrapper | 2004/03/05 16:25:21 | Startup failed: Timed out waiting for signal from JVM. ERROR | wrapper | 2004/03/05 16:25:21 | JVM did not exit on request, terminated DEBUG | wrapper | 2004/03/05 16:25:21 | JVM was only running for 31 seconds leading to a failed restart count of 4. DEBUG | wrapper | 2004/03/05 16:25:27 | Command[0] : java DEBUG | wrapper | 2004/03/05 16:25:27 | Command[1] : -Xms32m DEBUG | wrapper | 2004/03/05 16:25:27 | Command[2] : -Xmx128m DEBUG | wrapper | 2004/03/05 16:25:27 | Command[3] : -Djava.library.path=./ DEBUG | wrapper | 2004/03/05 16:25:27 | Command[4] : -classpath DEBUG | wrapper | 2004/03/05 16:25:27 | Command[5] : ./wrapper.jar:./ajserver.jar DEBUG | wrapper | 2004/03/05 16:25:27 | Command[6] : -Dwrapper.key=_dQEXzpzogfm35fb DEBUG | wrapper | 2004/03/05 16:25:27 | Command[7] : -Dwrapper.port=32000 DEBUG | wrapper | 2004/03/05 16:25:27 | Command[8] : -Dwrapper.debug=TRUE DEBUG | wrapper | 2004/03/05 16:25:27 | Command[9] : -Dwrapper.service=TRUE DEBUG | wrapper | 2004/03/05 16:25:27 | Command[10] : -Dwrapper.cpu.timeout=10 DEBUG | wrapper | 2004/03/05 16:25:27 | Command[11] : -Dwrapper.jvmid=5 DEBUG | wrapper | 2004/03/05 16:25:27 | Command[12] : de/applejuicenet/server/Daemon STATUS | wrapper | 2004/03/05 16:25:27 | Launching a JVM... INFO | jvm 5 | 2004/03/05 16:25:30 | 4:25:30 PM start server INFO | jvm 5 | 2004/03/05 16:25:35 | 4:25:35 PM timediff: 34645ms INFO | jvm 5 | 2004/03/05 16:25:47 | 4:25:47 PM check IP INFO | jvm 5 | 2004/03/05 16:25:47 | 4:25:47 PM serverip: 80.134.23.111 INFO | jvm 5 | 2004/03/05 16:25:48 | java.lang.NullPointerException INFO | jvm 5 | 2004/03/05 16:25:48 | at de.applejuicenet.server.Daemon.cancel(TRUX) INFO | jvm 5 | 2004/03/05 16:25:48 | at de.applejuicenet.server.Daemon.main(TRUX) INFO | jvm 5 | 2004/03/05 16:25:48 | 4:25:48 PM shutdown server ERROR | wrapper | 2004/03/05 16:25:58 | Startup failed: Timed out waiting for signal from JVM. ERROR | wrapper | 2004/03/05 16:25:58 | JVM did not exit on request, terminated DEBUG | wrapper | 2004/03/05 16:25:58 | JVM was only running for 31 seconds leading to a failed restart count of 5. FATAL | wrapper | 2004/03/05 16:25:58 | There were 5 failed launches in a row, each lasting less than 300 seconds. Giving up. FATAL | wrapper | 2004/03/05 16:25:58 | There may be a configuration problem: please check the logs. STATUS | wrapper | 2004/03/05 16:25:59 | <-- Wrapper Stopped |
|
From: Augustyn, R. n. U. <rob...@un...> - 2004-03-05 15:32:38
|
Hi,
I have few problems and before I start asking questions would like to do =
some searching first.
Is there a searchable version of this list available anywhere?
Thanks
-----Original Message-----
From: wra...@li...
[mailto:wra...@li...]On Behalf Of Leif
Mortenson
Sent: Sunday, February 15, 2004 11:12 PM
To: wra...@li...
Subject: Re: [Wrapper-user] Using WrapperStartStopApp with JBoss
Rob,
Starting with Java 1.3, a feature called shutdown hooks were added=20
to Java. A
method was added to the java.lang.Runtime class which allows you to=20
register a
Thread which will be started when the JVM starts to shutdown. This can =
be
triggered by either hitting CTRL-C or by calling System.exit someplace=20
in the
code.
In the case of the Wrapper, a request by the Wrapper to shutdown the
JVM results in System.exit being called from within the JVM. This=20
results in all
registered shutdown hooks being executed before the JVM actually shuts =
down.
JBoss registers such a shutdown hook to handle the case where the user=20
presses
CTRL-C. This makes it very easy to integrate with the Wrapper.
Tomcat on the other hand does not register any shutdown hooks and=20
will this
shutdown hard if you hit CTRL-C in the console. In order to shut it=20
down cleanly
another class must be executed. That is why its integration makes use=20
of the
WrapperStartStopApp helper class.
As a note, if you want your application to exit the JVM without=20
executing any
shutdown hooks you can do so by calling Runtime.getRuntime.halt()
Cheers,
Leif
Rob Moore wrote:
> Hi, Leif,
>
> Thanks for your response. The WrapperSimpleApp is working fine, but I=20
> just had the understanding that I needed to notify JBoss to shut=20
> itself down properly. From what you are saying, this is the case by=20
> default. I'm just curious how this is communicated to JBoss -- is it=20
> equivalent to hitting control-c in the console window?
>
> Rob
>
> Leif Mortenson wrote:
>
>> Rob,
>>
>> I have never tried that integration method with JBoss. Is there a
>> reason why the
>>
>> WrapperSimpleApp method is not working for you? JBoss shuts down=20
>> normally
>>
>> using its own shutdown hook so you shouldn't have to be calling a =
stop
>> method.
>>
>>
>>
>> When using the WrapperStartStopApp, both the start and stop =
classes
>> are loaded
>>
>> using the same class path. This will only work for applications =
which
>> allow that.
>>
>>
>>
>> Also what are the errors you are seeing so I can help you without
>> trying to
>>
>> reproduce your configuration in the dark.
>>
>>
>>
>> Cheers,
>>
>> Leif
>>
>>
>>
>> Rob Moore wrote:
>>
>>
>>
>>> Has anybody been able to get WrapperStartStopApp to work =
successfully
>>
>>
>>
>>> with JBoss?
>>
>>
>>
>>>
>>
>>> I would like to use the WrapperStartStopApp with JBoss, but I get
>>
>>
>>
>>> errors when I attempt to do so (I don't see the errors using
>>
>>
>>
>>> WrapperSimpleApp) that appear to be related to the classpath. It =
looks
>>
>>
>>
>>> like the problem results from the fact that I have to include all of
>>
>>
>>
>>> the jars needed for startup and shutdown. So I was curious if there =
is
>>
>>
>>
>>> a way to specify some jars in the classpath to be used for start and
>>
>>
>>
>>> others to be used for stop.=20
>>
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
|
|
From: Richard E. <rem...@ed...> - 2004-03-04 16:40:33
|
I get the following in wrapper logs on linux (not windows or solaris):
JVM appears hung: Timed out waiting for signal from JVM.
JVM did not exit on request, terminated
Looking through the code in wrapper_unix.c I see the following in the
function wrapperKillProcess() :
kill(jvmPid, SIGKILL);
log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_ERROR, "JVM did not
exit on request, terminated");
What does the message "JVM did not exit on request, terminated" mean?
There is no test after the kill function is called to tell whether or
not the JVM exited or not so how can one say that the JVM did not exit?
Thanks.
Richard
|
|
From: <sh...@vs...> - 2004-03-04 14:29:34
|
How can I completely disabled automatic JVM shutdowns that are caused by the JVM not responding to pings ? I have currently configured my service using the following lines but it didn't prevent the wrapper from shutting down the JVM: wrapper.cpu.timeout = 0 wrapper.ping.interval = 3600 wrapper.ping.timeout = 0 Cheers, Shmul |
|
From: Jennifer K. <jk...@si...> - 2004-03-03 22:05:24
|
I send a couple of emails a couple of weeks ago but haven't gotten any =20= feedback-- so here is the info again-- Namely the problem is that the wrapper is exiting rather than =20 restarting when a filter trigger is matched. all other restarts operate correctly. here is the info from the previous 2 emails I send, from most to least =20= recent. I look forward to a response.. thanks Jennifer ------------- Subject: [Wrapper-user] more on problems with filters- restart = never =20 works Date: February 27, 2004 8:14:47 AM PST To: wra...@li... Reply-To: wra...@li... It appears that I never have a successful FILTER based restart.=A0 I =20= have no problem getting restarts when I call WrapperManager.restart() =20= internally.. however-- if there is an exception that I didn't catch that a filter matches, =20= then I never get a successful restart. I have had each of the following =20= filters triggered always with the same result. I noticed that there was a recent email (Patrick Woodworth 1/23/2004)=A0= =20 where another person was having similiar problems and he found =20 disabling the shutdown hooks to be a soln for him.. I've had that =20 disabled this whole time and=A0 don't see any difference. Here are my filter settings from my conf file. wrapper.filter.trigger.1=3Dcom.singingfish.werkflow.processors.ProcessorEx= =20 ception wrapper.filter.action.1=3DRESTART wrapper.filter.trigger.2=3Djava.lang.Error wrapper.filter.action.2=3DRESTART wrapper.filter.trigger.3=3Djava.lang.OutOfMemoryError wrapper.filter.action.3=3DRESTART I also have these set if it provides any help..=A0 ( I have tried =20 playing around w/ different startup timeouts and invocation times and =20= it seems to make no difference) wrapper.jvm_exit.timeout=3D30 wrapper.cpu.timeout=3D10 wrapper.ping.timeout=3D300 wrapper.ping.interval=3D5 wrapper.restart.delay=3D1 wrapper.max_failed_invocations=3D3 wrapper.successful_invocation_time=3D10 wrapper.startup.timeout=3D30 wrapper.request_thread_dump_on_failed_jvm_exit=3DFALSE wrapper.ignore_signals=3DTRUE wrapper.disable_shutdown_hook=3DTRUE And again, here is the result I see whenever a filter is triggered: STATUS | wrapper=A0 | 2004/02/26 19:32:59 | Filter trigger matched.=A0 =20= Restarting JVM. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:32:59 | wrapperRestartProcess() = called ... (stuff from my stacktrack) STATUS | wrapper=A0 | 2004/02/26 19:32:59 | Filter trigger matched.=A0 =20= Restarting JVM. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:32:59 | wrapperRestartProcess() =20= called.=A0 (IGNORED) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | java.lang.Error: =20= com.singingfish.werkflow.processors.ProcessorException: Unexpected =20 exception in cracker STATUS | wrapper=A0 | 2004/02/26 19:32:59 | Filter trigger matched.=A0 =20= Restarting JVM. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:32:59 | wrapperRestartProcess() =20= called.=A0 (IGNORED) ... (stuff from my stack track) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | Send a packet STOP = : 0 DEBUG=A0 | wrapperp | 2004/02/26 19:32:59 | read a packet STOP : 0 DEBUG=A0 | wrapper=A0 | 2004/02/26 19:32:59 | JVM requested a = shutdown. (0) DEBUG=A0 | wrapper=A0 | 2004/02/26 19:32:59 | wrapperStopProcess(0) = called. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:32:59 | Sending stop signal to = JVM DEBUG=A0 | wrapperp | 2004/02/26 19:32:59 | send a packet STOP : NULL INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | Received a packet = STOP : INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:33:00 | Thread, =20 WrapperSimpleAppMain, handling the shutdown process. INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:33:00 | calling = listener.stop() INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:33:00 | WrapperSimpleApp: = stop(0) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:33:00 | returned from = listener.stop() INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:33:00 | Send a packet = STOPPED : 0 DEBUG=A0 | wrapperp | 2004/02/26 19:33:00 | read a packet STOPPED : 0 DEBUG=A0 | wrapper=A0 | 2004/02/26 19:33:00 | JVM signalled that it = was =20 stopped. INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:33:00 | Closing socket. DEBUG=A0 | wrapperp | 2004/02/26 19:33:00 | socket read no code =20 (closed?). INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:33:00 | calling = System.exit(0) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:33:00 | Server daemon shut = down DEBUG=A0 | wrapper=A0 | 2004/02/26 19:33:00 | JVM exited normally. STATUS | wrapper=A0 | 2004/02/26 19:33:01 | <-- Wrapper Stopped STATUS | wrapper=A0 | 2004/02/26 19:36:28 | CrackerAgent3 removed. in comparison-- a normal restart has the following ... INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:31:48 | 2004-02-26 = 19:31:48,107 =20 DEBUG [WrapperSimpleAppMain] WerkflowAgent=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 - WerkflowEngine =20 requested VM restart (null). Shutting down... INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:31:48 | Send a packet = RESTART : =20 restart DEBUG=A0 | wrapperp | 2004/02/26 19:31:48 | read a packet RESTART : =20= restart STATUS | wrapper=A0 | 2004/02/26 19:31:48 | JVM requested a restart. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:31:48 | wrapperRestartProcess() =20= called. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:31:48 | Sending stop signal to = JVM DEBUG=A0 | wrapperp | 2004/02/26 19:31:48 | send a packet STOP : NULL INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:31:48 | Received a packet = STOP : INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:31:49 | Thread, =20 WrapperSimpleAppMain, handling the shutdown process. INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:31:49 | calling = listener.stop() INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:31:49 | WrapperSimpleApp: = stop(0) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:31:49 | returned from = listener.stop() INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:31:49 | Send a packet = STOPPED : 0 DEBUG=A0 | wrapperp | 2004/02/26 19:31:49 | read a packet STOPPED : 0 DEBUG=A0 | wrapper=A0 | 2004/02/26 19:31:49 | JVM signalled that it = was =20 stopped. INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:31:49 | Closing socket. DEBUG=A0 | wrapperp | 2004/02/26 19:31:49 | socket read no code =20 (closed?). INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:31:50 | calling = System.exit(0) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:31:50 | Server daemon shut = down DEBUG=A0 | wrapper=A0 | 2004/02/26 19:31:50 | JVM exited normally. STATUS | wrapper=A0 | 2004/02/26 19:31:52 | Launching a JVM... DEBUG=A0 | wrapper=A0 | 2004/02/26 19:31:52 | command: =20 "C:\WINNT\system32\java.exe" =20 -Dcom.singingfish.core.utils.config.dir=3Dc:/sf/config =20 -Duser.dir=3DC:\aolrun -Dsun.rmi.loader.logLevel=3DVERBOSE =20 -Dsun.rmi.server.logLevel=3DVERBOSE -Dsun.rmi.transport.logLevel=3DVERBOSE= =20 -Dsun.rmi.transport.tcp.logLevel=3DVERBOSE =20 -Dsun.rmi.transport.proxy.logLevel=3DVERBOSE -Xms3m -Xmx96m =20 -Djava.library.path=3D"c:/sf/lib;c:/winnt;c:/winnt/system32;c:/=20 j2sdk1.4.2_02/bin" -classpath =20 "c:/sf/java/classes;c:/sf/java/jars/commons-logging-1.0.3/commons-=20 logging.jar;c:/sf/java/jars/jakarta-log4j-1.2.8/dist/lib/log4j=20 -1.2.8.jar;c:/sf/java/jars/jakarta-oro-2.0.4/jakarta-oro-2.0.4.jar;c:/=20= sf/java/jars/quicktime_6_5/QTJava.zip;c:/sf/java/jars/xerces-1_3_1/=20 xerces.jar;c:/sf/java/jars/toplink/TOPLink.jar;c:/sf/java/jars/toplink/=20= Tools.jar;c:/sf/java/jars/toplink/TOPLinkX.jar;c:/sf/java/jars/=20 oracle_jdbc_9_2_03/ojdbc14.jar;c:/sf/java/jars/commons-httpclient-2.0/=20= commons-httpclient-2.0-final.jar" -Dwrapper.key=3D"VRxfE5Fd856GSIaF" =20 -Dwrapper.port=3D32013 -Dwrapper.debug=3D"TRUE" =20 -Dwrapper.ignore_signals=3D"TRUE" -Dwrapper.service=3D"TRUE" =20 -Dwrapper.disable_shutdown_hook=3D"TRUE" -Dwrapper.cpu.timeout=3D"10" =20= -Dwrapper.jvmid=3D7 org.tanukisoftware.wrapper.WrapperSimpleApp =20 com.singingfish.werkflow.agent.WerkflowAgent =20 c:/sf/config/workflow/specs/cracker.spec CrackerAgent3 DEBUG=A0 | wrapper=A0 | 2004/02/26 19:31:52 | Java Virtual Machine = started =20 (PID=3D9244) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:31:52 | Wrapper Manager: = JVM #7 INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:31:52 | Wrapper Manager: = Using =20 wrapper INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:31:52 | Calling native =20 initialization method. INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:31:52 | Initializing = WrapperManager =20 native library. INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:31:52 | Java Executable: =20= C:\WINNT\system32\java.exe INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:31:52 | Java Version=A0=A0 = : =20 1.4.2_02-b03 Java HotSpot(TM) Client VM INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:31:52 | Java VM Vendor : = Sun =20 Microsystems Inc. INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:31:52 | INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:31:52 | Wrapper (Version = 3.0.5) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:31:52 | INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:31:52 | Open socket to = wrapper =20 attempted on port 32013... INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:31:52 | Opened Socket to = port 3242 INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:31:52 | Send a packet KEY = : =20 VRxfE5Fd856GSIaF INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:31:52 | =20 handleSocket(Socket[addr=3D/127.0.0.1,port=3D32013,localport=3D3242]) DEBUG=A0 | wrapperp | 2004/02/26 19:31:52 | accepted a socket from =20 127.0.0.1 on port 3242 DEBUG=A0 | wrapperp | 2004/02/26 19:31:52 | read a packet KEY : =20 VRxfE5Fd856GSIaF DEBUG=A0 | wrapper=A0 | 2004/02/26 19:31:52 | Got key from JVM: =20 VRxfE5Fd856GSIaF DEBUG=A0 | wrapperp | 2004/02/26 19:31:52 | send a packet = LOW_LOG_LEVEL =20 : 1 DEBUG=A0 | wrapperp | 2004/02/26 19:31:52 | send a packet PING_TIMEOUT = : =20 300 DEBUG=A0 | wrapper=A0 | 2004/02/26 19:31:52 | Start Application. .... ----------- Subject: [Wrapper-user] Restart being ignored Date: February 26, 2004 5:14:40 PM PST To: wra...@li... Reply-To: wra...@li... thanks for the speedy replies- this one has me stumped... and I am =20 hoping there is something obvious I am not understanding about when the =20= wrapper does and doesn't restart the vm. I have a java process running that throws an exception I have a filter = =20 for. the filter is set to RESTART as the action. For some reason, at some point the restart message is ignored and a =20= stop is issued which exits the service. What is happening that this is getting to an ignore state? In my config file I have 3 set for the max tries for invocation, but I = =20 thought that didn't apply to restarts once successfully past the min =20 invocation running time... any ideas?? (note this is returning a exit code of 0 instead of 1 since I=A0 was =20= seeing if that would make a difference- it doesn't) This is the 1st place any filters are matched on in any of these =20 files.. although.. there are previous successful restarts requested =20 internally by my app via the wrappermanager. Thanks Jennifer DEBUG=A0 | wrapperp | 2004/02/26 19:21:49 | read a packet PING : ok DEBUG=A0 | wrapper=A0 | 2004/02/26 19:21:49 | Got ping response from = JVM INFO=A0=A0 | jvm 1=A0=A0=A0 | 2004/02/26 19:21:50 | WrapperSimpleApp: =20= Encountered an error running main: java.lang.Error: unexpected =20 exception in completed STATUS | wrapper=A0 | 2004/02/26 19:21:50 | Filter trigger matched.=A0 = =20 Restarting JVM. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:21:50 | wrapperRestartProcess() =20= called. INFO=A0=A0 | jvm 1=A0=A0=A0 | 2004/02/26 19:21:50 | java.lang.Error: = unexpected =20 exception in completed STATUS | wrapper=A0 | 2004/02/26 19:21:50 | Filter trigger matched.=A0 = =20 Restarting JVM. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:21:50 | wrapperRestartProcess() =20= called.=A0 (IGNORED) INFO=A0=A0 | jvm 1=A0=A0=A0 | 2004/02/26 19:21:50 | Send a packet STOP = : 0 DEBUG=A0 | wrapperp | 2004/02/26 19:21:50 | read a packet STOP : 0 DEBUG=A0 | wrapper=A0 | 2004/02/26 19:21:50 | JVM requested a = shutdown. (0) DEBUG=A0 | wrapper=A0 | 2004/02/26 19:21:50 | wrapperStopProcess(0) = called. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:21:50 | Sending stop signal to = JVM DEBUG=A0 | wrapperp | 2004/02/26 19:21:50 | send a packet STOP : NULL INFO=A0=A0 | jvm 1=A0=A0=A0 | 2004/02/26 19:21:50 | Received a packet = STOP : INFO=A0=A0 | jvm 1=A0=A0=A0 | 2004/02/26 19:21:51 | Thread, =20 WrapperSimpleAppMain, handling the shutdown process. INFO=A0=A0 | jvm 1=A0=A0=A0 | 2004/02/26 19:21:51 | calling = listener.stop() INFO=A0=A0 | jvm 1=A0=A0=A0 | 2004/02/26 19:21:51 | WrapperSimpleApp: = stop(0) INFO=A0=A0 | jvm 1=A0=A0=A0 | 2004/02/26 19:21:51 | returned from = listener.stop() INFO=A0=A0 | jvm 1=A0=A0=A0 | 2004/02/26 19:21:51 | Send a packet = STOPPED : 0 DEBUG=A0 | wrapperp | 2004/02/26 19:21:51 | read a packet STOPPED : 0 DEBUG=A0 | wrapper=A0 | 2004/02/26 19:21:51 | JVM signalled that it = was =20 stopped. INFO=A0=A0 | jvm 1=A0=A0=A0 | 2004/02/26 19:21:51 | Closing socket. DEBUG=A0 | wrapperp | 2004/02/26 19:21:51 | socket read no code =20 (closed?). INFO=A0=A0 | jvm 1=A0=A0=A0 | 2004/02/26 19:21:52 | calling = System.exit(0) INFO=A0=A0 | jvm 1=A0=A0=A0 | 2004/02/26 19:21:52 | Server daemon shut = down ERROR=A0 | wrapper=A0 | 2004/02/26 19:22:27 | Shutdown failed: Timed = out =20 waiting for the JVM to terminate. ERROR=A0 | wrapper=A0 | 2004/02/26 19:22:27 | Java Virtual Machine did = not =20 exit on request, terminated STATUS | wrapper=A0 | 2004/02/26 19:22:27 | <-- Wrapper Stopped Here is a different case of the same problem INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =20 com.singingfish.werkflow.processors.ProcessorException: Unexpected =20 exception in cracker STATUS | wrapper=A0 | 2004/02/26 19:32:59 | Filter trigger matched.=A0 = =20 Restarting JVM. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:32:59 | wrapperRestartProcess() =20= called. .... INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =A0=A0=A0 at =20 com.singingfish.werkflow.agent.WerkflowAgent.run(WerkflowAgent.java:67) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =A0=A0=A0 at =20 com.singingfish.werkflow.agent.WerkflowAgent.main(WerkflowAgent.java:=20 270) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =A0=A0=A0 at =20 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =A0=A0=A0 at =20 sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =A0=A0=A0 at =20 sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =A0=A0=A0 at =20 java.lang.reflect.Method.invoke(Unknown Source) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =A0=A0=A0 at =20 org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:=20= 111) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =A0=A0=A0 at =20 java.lang.Thread.run(Unknown Source) ... INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | WrapperSimpleApp: =20= Encountered an error running main: java.lang.Error: =20 com.singingfish.werkflow.processors.ProcessorException: Unexpected =20 exception in cracker STATUS | wrapper=A0 | 2004/02/26 19:32:59 | Filter trigger matched.=A0 = =20 Restarting JVM. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:32:59 | wrapperRestartProcess() =20= called.=A0 (IGNORED) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | java.lang.Error: =20= com.singingfish.werkflow.processors.ProcessorException: Unexpected =20 exception in cracker STATUS | wrapper=A0 | 2004/02/26 19:32:59 | Filter trigger matched.=A0 = =20 Restarting JVM. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:32:59 | wrapperRestartProcess() =20= called.=A0 (IGNORED) .... INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =A0=A0=A0 at =20 com.singingfish.werkflow.agent.WerkflowAgent.run(WerkflowAgent.java:67) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =A0=A0=A0 at =20 com.singingfish.werkflow.agent.WerkflowAgent.main(WerkflowAgent.java:=20 270) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =A0=A0=A0 at =20 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =A0=A0=A0 at =20 sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =A0=A0=A0 at =20 sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =A0=A0=A0 at =20 java.lang.reflect.Method.invoke(Unknown Source) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =A0=A0=A0 at =20 org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:=20= 111) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | =A0=A0=A0 at =20 java.lang.Thread.run(Unknown Source) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | Send a packet STOP = : 0 DEBUG=A0 | wrapperp | 2004/02/26 19:32:59 | read a packet STOP : 0 DEBUG=A0 | wrapper=A0 | 2004/02/26 19:32:59 | JVM requested a = shutdown. (0) DEBUG=A0 | wrapper=A0 | 2004/02/26 19:32:59 | wrapperStopProcess(0) = called. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:32:59 | Sending stop signal to = JVM DEBUG=A0 | wrapperp | 2004/02/26 19:32:59 | send a packet STOP : NULL INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:32:59 | Received a packet = STOP : INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:33:00 | Thread, =20 WrapperSimpleAppMain, handling the shutdown process. INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:33:00 | calling = listener.stop() INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:33:00 | WrapperSimpleApp: = stop(0) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:33:00 | returned from = listener.stop() INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:33:00 | Send a packet = STOPPED : 0 DEBUG=A0 | wrapperp | 2004/02/26 19:33:00 | read a packet STOPPED : 0 DEBUG=A0 | wrapper=A0 | 2004/02/26 19:33:00 | JVM signalled that it = was =20 stopped. INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:33:00 | Closing socket. DEBUG=A0 | wrapperp | 2004/02/26 19:33:00 | socket read no code =20 (closed?). INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:33:00 | calling = System.exit(0) INFO=A0=A0 | jvm 7=A0=A0=A0 | 2004/02/26 19:33:00 | Server daemon shut = down DEBUG=A0 | wrapper=A0 | 2004/02/26 19:33:00 | JVM exited normally. STATUS | wrapper=A0 | 2004/02/26 19:33:01 | <-- Wrapper Stopped STATUS | wrapper=A0 | 2004/02/26 19:36:28 | CrackerAgent3 removed. and finally a 3rd case: DEBUG=A0 | wrapper=A0 | 2004/02/26 19:28:09 | Pause reading child = output =20 to share cycles. DEBUG=A0 | wrapperp | 2004/02/26 19:28:09 | read a packet PING : # DEBUG=A0 | wrapper=A0 | 2004/02/26 19:28:09 | Got ping response from = JVM DEBUG=A0 | wrapperp | 2004/02/26 19:28:09 | send a packet PING : ping ... INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:09 | Send a packet PING = : # INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:09 | Received a packet = PING : ping INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:09 | Not responding to = pings INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | Send a packet PING = : # INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =20 com.singingfish.werkflow.processors.ProcessorException: Unexpected =20 exception in cracker STATUS | wrapper=A0 | 2004/02/26 19:28:10 | Filter trigger matched.=A0 = =20 Restarting JVM. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:28:10 | wrapperRestartProcess() =20= called. ... INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 com.singingfish.werkflow.agent.WerkflowAgent.run(WerkflowAgent.java:67) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 com.singingfish.werkflow.agent.WerkflowAgent.main(WerkflowAgent.java:=20 270) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 java.lang.reflect.Method.invoke(Unknown Source) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:=20= 111) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 java.lang.Thread.run(Unknown Source) ... INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | WrapperSimpleApp: =20= Encountered an error running main: java.lang.Error: =20 com.singingfish.werkflow.processors.ProcessorException: Unexpected =20 exception in cracker STATUS | wrapper=A0 | 2004/02/26 19:28:10 | Filter trigger matched.=A0 = =20 Restarting JVM. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:28:10 | wrapperRestartProcess() =20= called.=A0 (IGNORED) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | java.lang.Error: =20= com.singingfish.werkflow.processors.ProcessorException: Unexpected =20 exception in cracker STATUS | wrapper=A0 | 2004/02/26 19:28:10 | Filter trigger matched.=A0 = =20 Restarting JVM. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:28:10 | wrapperRestartProcess() =20= called.=A0 (IGNORED) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 com.singingfish.werkflow.processors.BaseCrackProcessor.process(BaseCrack=20= Processor.java:117) DEBUG=A0 | wrapper=A0 | 2004/02/26 19:28:10 | Pause reading child = output =20 to share cycles. DEBUG=A0 | wrapperp | 2004/02/26 19:28:10 | read a packet PING : # DEBUG=A0 | wrapper=A0 | 2004/02/26 19:28:10 | Got ping response from = JVM DEBUG=A0 | wrapperp | 2004/02/26 19:28:10 | read a packet STOP : 0 DEBUG=A0 | wrapper=A0 | 2004/02/26 19:28:10 | JVM requested a = shutdown. (0) DEBUG=A0 | wrapper=A0 | 2004/02/26 19:28:10 | wrapperStopProcess(0) = called. DEBUG=A0 | wrapper=A0 | 2004/02/26 19:28:10 | Sending stop signal to = JVM DEBUG=A0 | wrapperp | 2004/02/26 19:28:10 | send a packet STOP : NULL ... INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 com.singingfish.werkflow.agent.WerkflowAgent.run(WerkflowAgent.java:67) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 com.singingfish.werkflow.agent.WerkflowAgent.main(WerkflowAgent.java:=20 270) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 java.lang.reflect.Method.invoke(Unknown Source) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:=20= 111) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | =A0=A0=A0 at =20 java.lang.Thread.run(Unknown Source) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | Send a packet STOP = : 0 INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:10 | Received a packet = STOP : INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:11 | Thread, =20 WrapperSimpleAppMain, handling the shutdown process. INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:11 | calling = listener.stop() INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:11 | WrapperSimpleApp: = stop(0) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:11 | returned from = listener.stop() INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:11 | Send a packet = STOPPED : 0 DEBUG=A0 | wrapperp | 2004/02/26 19:28:11 | read a packet STOPPED : 0 DEBUG=A0 | wrapper=A0 | 2004/02/26 19:28:11 | JVM signalled that it = was =20 stopped. INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:11 | Closing socket. DEBUG=A0 | wrapperp | 2004/02/26 19:28:11 | socket read no code =20 (closed?). INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:12 | calling = System.exit(0) INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:12 | Server daemon shut = down INFO=A0=A0 | jvm 6=A0=A0=A0 | 2004/02/26 19:28:12 | AWTPATH C:\Program = =20 Files\Java\j2re1.4.2_02\bin\jawt.dll DEBUG=A0 | wrapper=A0 | 2004/02/26 19:28:12 | JVM exited normally. STATUS | wrapper=A0 | 2004/02/26 19:28:12 | <-- Wrapper Stopped STATUS | wrapper=A0 | 2004/02/26 19:36:28 | CrackerAgent2 removed. =20= |
|
From: Richard L. <ric...@ms...> - 2004-03-02 00:09:22
|
Leif,
I'm sorry if I was not clear. Basically, our program will consist of
two parts. Native code that will interact with the Windows Login and a
Java thread that will listen to a card reader. The native code will
send a system event to the Java thread running as a service. Basically,
these commands could be simplified, such as "canLogin" = 123. The Java
thread will receive that system event, and answer it with a true or
false, depending on whether a valid card has been connected to the card
reader. The native code would be continually "polling" for an answer.
When a card is read, then the Java thread performs what it needs to, and
the next time the "canLogin" event is received, it will return "TRUE".
The native code, will then automatically sign the user into the system
with a generic user account.
Since you said it wouldn't be possible for us to return an integer, I
thought one possible work-around would be to change all the custom
system events to simple true/false. However, if that's not possible, it
seems as if I'm stuck. From what I understand, it sounds like system
events will only allow for one-way communication ( from native code to
Java). Any help or insight would be appreciated.
Thanks,
Richard.
Leif Mortenson wrote:
> Richard,
> As I described in my last mail, the native code is currently not
> capable of returning
> the boolean value returned by the call to WrapperListener.controlEvent
> because that
> call is not currently done synchronously. This was necessary to work
> around some
> stability problems with the JVM.
>
> A better approach to this exercise might be for you to describe in
> detail exactly
> what you are trying to do and how and why you are going about doing
> it. From
> that info, I might have some ideas as to how you could possibly do
> things differently.
> If you don't want to post that much detail on-list, then sent it to me
> directly.
>
> Cheers,
> Leif
>
> Richard Luong wrote:
>
>> Leif,
>>
>> Thanks again for your very informative response. The custom dll, that
>> would have been the calling code would have taken the return value,
>> which is usually regarded as 0 being false and any other value as true,
>> and actually "cast/convert" the response and use it as if it were an
>> int. But from what I'm reading from your response, this might be a
>> little too much for myself to do. But maybe I can work around this
>> constraint.
>>
>> This brings me to my next question. If the native code currently
>> returns a BOOL, is there anyway that the java code can return a true or
>> false, that way the calling native code will forward that response on?
>>
>> Richard.
>>
>> Leif Mortenson wrote:
>>
>>
>>> Richard,
>>> I am confused. If I understand correctly then what you are saying
>>> does not
>>> appear to be supported by the Windows API.
>>>
>>> It would be possible for the WrapperListener.controlEvent method to
>>> return
>>> an integer rather than a boolean. This would be difficult as it would
>>> break
>>> things for the user base. But it is technically possible. The problem is
>>> what to do with that code once it has been returned to the native JNI
>>> library.
>>>
>>> This is complicated by what follows, but normally the controlEvent
>>> would be
>>> called from within a Handler callback function registered with the
>>> Windows
>>> SetConsoleCtrlHandler function. This API declares that the handler
>>> function should return a BOOL, not an int. That means that the calling
>>> code would interpret 0 as FALSE and anything else as TRUE. I don't see
>>> how returning an integer code could possibly work?
>>>
>>> Now. The problem is that the above call thread is not the way things are
>>> actually implemented. For some reason I was finding that various
>>> versions
>>> of the JVM liked to crash if a JNI call was made into the JVM from
>>> within
>>> a Ctrl Handler. To work around this, the handler will simply store
>>> its last
>>> known event code. The JVM then polls that code for a value to pass to
>>> the
>>> WrapperListener.controlEvent. User code should never notice a
>>> difference as signals are never fired at very high rates. The problem is
>>> that as things are currently implemented, it is not possible to
>>> return even
>>> the BOOL return value. Rather, the WrapperManager java code takes
>>> responsibility of handling things like CTRL-C events. If the user code
>>> chose not to handle the event then the WrapperManager does so.
>>>
>>> Is this what you are asking?
>>>
>>> If all you want to do is be able to pass user defined events to the
>>> Wrapper
>>> and thus the JVM, then the Wrapper should handle that as is. Any user
>>> defined signals should be passed right into the JVM via the
>>> WrapperListener.controlEvent method.
>>>
>>> Cheers,
>>> Leif
>>>
>>> Richard Luong wrote:
>>>
>>>
>>>
>>>
>>>> Leif,
>>>>
>>>> Thanks for your response. We have implemented a custom login dll that
>>>> hooks into the windows system. It will send the service a system
>>>> event. The service will then "respond" back to the the custom dll with
>>>> a custom code. Thereby allowing pseudo-communication between the java
>>>> thread being run as a service and the custom windows login dll.
>>>>
>>>> Is that not possible with the current code? If not, do you think it
>>>> would be a hard thing for myself to implement? You are more
>>>> knowledgable in this topic than I am. But is it possible for me to
>>>> edit the contolEvent method to return back an integer to the call
>>>> native code? I don't want to waste time coding something that will not
>>>> work. Is it possible for a java method to return an integer in JNI?
>>>> Thanks for your help. This seems like a great product and I really
>>>> hope I can use it.
>>>>
>>>> Richard.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> From: Leif Mortenson <le...@ta...>
>>>>> Reply-To: wra...@li...
>>>>> To: wra...@li...
>>>>> Subject: Re: [Wrapper-user] How to catch other system events
>>>>> Date: Sun, 29 Feb 2004 22:05:46 +0900
>>>>>
>>>>> Richard,
>>>>> The wrapperConsoleHandler function is simply a callback registered
>>>>> with the
>>>>> Windows SetConsoleCtrlHandler function. The handler actually returns
>>>>> a BOOL.
>>>>> Even if the code allowed you to return a custom code, the Windows API
>>>>> would
>>>>> not know what to do with it. Am I missing something?
>>>>> | |
>>>>> Cheers,
>>>>> Leif
>>>>>
>>>>> Richard Luong wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Leif,
>>>>>>
>>>>>> Thanks for your response. Sorry my response is somewhat late,
>>>>>> however this project's priority was shifted around for me.
>>>>>>
>>>>>> You are correct in that Windows doesn't throw any signal for a use
>>>>>> login. What I have is a dll, that hooks onto the windows login
>>>>>> service and basically sends my java thread custom signals. My thread
>>>>>> will then return an integer as a response. At least that's the plan.
>>>>>>
>>>>>> My question is, how do I reply to a system event? I see from your
>>>>>> code sample below, that your wrapperConsoleHandler returns an int.
>>>>>> And that int is true. That method then passes it to the JVM's
>>>>>> controlEvent method, which returns void. Is there anyway that I can
>>>>>> return my own custom code? Thanks.
>>>>>>
>>>>>> Richard.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Subject:
>>>>>>> Re: [Wrapper-user] How to catch other system events
>>>>>>> From:
>>>>>>> Leif Mortenson <le...@ta...>
>>>>>>> Date:
>>>>>>> Thu, 08 Jan 2004 18:59:21 +0900
>>>>>>> To:
>>>>>>> wra...@li...
>>>>>>>
>>>>>>> To:
>>>>>>> wra...@li...
>>>>>>>
>>>>>>>
>>>>>>> Richard,
>>>>>>> Sorry I never answered you did I.
>>>>>>>
>>>>>>> The Wrapper currently catches system events in the native code,
>>>>>>> Wrapper.DLL. It is taking any signal except the CTRL_BREAK_EVENT,
>>>>>>> which
>>>>>>> is used to generate thread dumps.
>>>>>>> What is the actual system signal that your card is throwing?
>>>>>>> Normally
>>>>>>> windows does not throw any signals that I know of when a user logs
>>>>>>> in. I am
>>>>>>> interesting in finding out how your card works because I have been
>>>>>>> looking
>>>>>>> for a nice clean way of telling when a user logs on for a while.
>>>>>>> The next
>>>>>>> version of the Wrapper allows you to poll for this information, but
>>>>>>> there is
>>>>>>> no signal that I could find that is fired when a user logs on to a
>>>>>>> Windows system.
>>>>>>>
>>>>>>> Here is the native code that parses the signals. Note that I am
>>>>>>> passing any
>>>>>>> unknown signals off to the JVM as well so the controlEvent method
>>>>>>> of your
>>>>>>> WrapperListener should get them if they are thrown.
>>>>>>>
>>>>>>> ---
>>>>>>> int wrapperConsoleHandler(int key) {
>>>>>>> int event;
>>>>>>>
>>>>>>> /* Call the control callback in the java code */
>>>>>>> switch(key) {
>>>>>>> case CTRL_C_EVENT:
>>>>>>> event =
>>>>>>> org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_C_EVENT;
>>>>>>> break;
>>>>>>> case CTRL_BREAK_EVENT:
>>>>>>> /* This is a request to do a thread dump. Let the JVM handle
>>>>>>> this. */
>>>>>>> return FALSE;
>>>>>>> case CTRL_CLOSE_EVENT:
>>>>>>> event =
>>>>>>> org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_CLOSE_EVENT;
>>>>>>> break;
>>>>>>> case CTRL_LOGOFF_EVENT:
>>>>>>> event =
>>>>>>> org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_LOGOFF_EVENT;
>>>>>>> break;
>>>>>>> case CTRL_SHUTDOWN_EVENT:
>>>>>>> event =
>>>>>>> org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_SHUTDOWN_EVENT;
>>>>>>>
>>>>>>> break;
>>>>>>> default:
>>>>>>> event = key;
>>>>>>> }
>>>>>>> if (wrapperJNIDebugging) {
>>>>>>> printf("Got Control Signal %d->%d\n", key, event);
>>>>>>> flushall();
>>>>>>> }
>>>>>>>
>>>>>>> wrapperJNIHandleSignal(event);
>>>>>>>
>>>>>>> if (wrapperJNIDebugging) {
>>>>>>> printf("Handled signal\n");
>>>>>>> flushall();
>>>>>>> }
>>>>>>>
>>>>>>> return TRUE; /* We handled the event. */
>>>>>>> }
>>>>>>> ---
>>>>>>>
>>>>>>> Please most back with as much info as you can make available even
>>>>>>> if you
>>>>>>> get this working.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Leif
>>>>>>>
>>>>>>> Richard Luong wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> I want to hook onto the Windows Login (Gina.dll) so that I can
>>>>>>>> login
>>>>>>>> through an ID card. I can do the JNI stuff to talk from Java to
>>>>>>>> the C
>>>>>>>> dll. But I would like the C code to be able to talk back to the
>>>>>>>> Java
>>>>>>>> code through throwing events to my NT Service.
>>>>>>>>
>>>>>>>> My question is, does the Java Service Wrapper catch all events and
>>>>>>>> pass them on? If that's so, then problem solved.
>>>>>>>>
>>>>>>>> If not, does it only pass on specific control events such as
>>>>>>>> windows
>>>>>>>> logoff, shutdown and ctr+C ?
>>>>>>>>
>>>>>>>> If so, can I modify the code to pass on all events? I know that I
>>>>>>>> will
>>>>>>>> have to use Integration Method #3, which is not a problem for me.
>>>>>>>> However, any pointers to the code that is catching and possibly
>>>>>>>> ignoring/passing on events would be helpful.
>>>>>>>>
>>>>>>>> Thanks.
>>>>>>>>
>>>>>>>
>>>>>>>
>
>
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
> .
>
|
|
From: Leif M. <le...@ta...> - 2004-03-01 22:25:53
|
Richard,
As I described in my last mail, the native code is currently not
capable of returning
the boolean value returned by the call to WrapperListener.controlEvent
because that
call is not currently done synchronously. This was necessary to work
around some
stability problems with the JVM.
A better approach to this exercise might be for you to describe in
detail exactly
what you are trying to do and how and why you are going about doing
it. From
that info, I might have some ideas as to how you could possibly do
things differently.
If you don't want to post that much detail on-list, then sent it to me
directly.
Cheers,
Leif
Richard Luong wrote:
>Leif,
>
>Thanks again for your very informative response. The custom dll, that
>would have been the calling code would have taken the return value,
>which is usually regarded as 0 being false and any other value as true,
>and actually "cast/convert" the response and use it as if it were an
>int. But from what I'm reading from your response, this might be a
>little too much for myself to do. But maybe I can work around this
>constraint.
>
>This brings me to my next question. If the native code currently
>returns a BOOL, is there anyway that the java code can return a true or
>false, that way the calling native code will forward that response on?
>
>Richard.
>
>Leif Mortenson wrote:
>
>
>>Richard,
>>I am confused. If I understand correctly then what you are saying does not
>>appear to be supported by the Windows API.
>>
>>It would be possible for the WrapperListener.controlEvent method to return
>>an integer rather than a boolean. This would be difficult as it would break
>>things for the user base. But it is technically possible. The problem is
>>what to do with that code once it has been returned to the native JNI
>>library.
>>
>>This is complicated by what follows, but normally the controlEvent would be
>>called from within a Handler callback function registered with the Windows
>>SetConsoleCtrlHandler function. This API declares that the handler
>>function should return a BOOL, not an int. That means that the calling
>>code would interpret 0 as FALSE and anything else as TRUE. I don't see
>>how returning an integer code could possibly work?
>>
>>Now. The problem is that the above call thread is not the way things are
>>actually implemented. For some reason I was finding that various versions
>>of the JVM liked to crash if a JNI call was made into the JVM from within
>>a Ctrl Handler. To work around this, the handler will simply store its last
>>known event code. The JVM then polls that code for a value to pass to the
>>WrapperListener.controlEvent. User code should never notice a
>>difference as signals are never fired at very high rates. The problem is
>>that as things are currently implemented, it is not possible to return even
>>the BOOL return value. Rather, the WrapperManager java code takes
>>responsibility of handling things like CTRL-C events. If the user code
>>chose not to handle the event then the WrapperManager does so.
>>
>>Is this what you are asking?
>>
>>If all you want to do is be able to pass user defined events to the Wrapper
>>and thus the JVM, then the Wrapper should handle that as is. Any user
>>defined signals should be passed right into the JVM via the
>>WrapperListener.controlEvent method.
>>
>>Cheers,
>>Leif
>>
>>Richard Luong wrote:
>>
>>
>>
>>
>>>Leif,
>>>
>>>Thanks for your response. We have implemented a custom login dll that
>>>hooks into the windows system. It will send the service a system
>>>event. The service will then "respond" back to the the custom dll with
>>>a custom code. Thereby allowing pseudo-communication between the java
>>>thread being run as a service and the custom windows login dll.
>>>
>>>Is that not possible with the current code? If not, do you think it
>>>would be a hard thing for myself to implement? You are more
>>>knowledgable in this topic than I am. But is it possible for me to
>>>edit the contolEvent method to return back an integer to the call
>>>native code? I don't want to waste time coding something that will not
>>>work. Is it possible for a java method to return an integer in JNI?
>>>Thanks for your help. This seems like a great product and I really
>>>hope I can use it.
>>>
>>>Richard.
>>>
>>>
>>>
>>>
>>>
>>>>From: Leif Mortenson <le...@ta...>
>>>>Reply-To: wra...@li...
>>>>To: wra...@li...
>>>>Subject: Re: [Wrapper-user] How to catch other system events
>>>>Date: Sun, 29 Feb 2004 22:05:46 +0900
>>>>
>>>>Richard,
>>>>The wrapperConsoleHandler function is simply a callback registered
>>>>with the
>>>>Windows SetConsoleCtrlHandler function. The handler actually returns
>>>>a BOOL.
>>>>Even if the code allowed you to return a custom code, the Windows API
>>>>would
>>>>not know what to do with it. Am I missing something?
>>>>| |
>>>>Cheers,
>>>>Leif
>>>>
>>>>Richard Luong wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>Leif,
>>>>>
>>>>>Thanks for your response. Sorry my response is somewhat late,
>>>>>however this project's priority was shifted around for me.
>>>>>
>>>>>You are correct in that Windows doesn't throw any signal for a use
>>>>>login. What I have is a dll, that hooks onto the windows login
>>>>>service and basically sends my java thread custom signals. My thread
>>>>>will then return an integer as a response. At least that's the plan.
>>>>>
>>>>>My question is, how do I reply to a system event? I see from your
>>>>>code sample below, that your wrapperConsoleHandler returns an int.
>>>>>And that int is true. That method then passes it to the JVM's
>>>>>controlEvent method, which returns void. Is there anyway that I can
>>>>>return my own custom code? Thanks.
>>>>>
>>>>>Richard.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>Subject:
>>>>>>Re: [Wrapper-user] How to catch other system events
>>>>>>From:
>>>>>>Leif Mortenson <le...@ta...>
>>>>>>Date:
>>>>>>Thu, 08 Jan 2004 18:59:21 +0900
>>>>>>To:
>>>>>>wra...@li...
>>>>>>
>>>>>>To:
>>>>>>wra...@li...
>>>>>>
>>>>>>
>>>>>>Richard,
>>>>>>Sorry I never answered you did I.
>>>>>>
>>>>>>The Wrapper currently catches system events in the native code,
>>>>>>Wrapper.DLL. It is taking any signal except the CTRL_BREAK_EVENT,
>>>>>>which
>>>>>>is used to generate thread dumps.
>>>>>>What is the actual system signal that your card is throwing? Normally
>>>>>>windows does not throw any signals that I know of when a user logs
>>>>>>in. I am
>>>>>>interesting in finding out how your card works because I have been
>>>>>>looking
>>>>>>for a nice clean way of telling when a user logs on for a while.
>>>>>>The next
>>>>>>version of the Wrapper allows you to poll for this information, but
>>>>>>there is
>>>>>>no signal that I could find that is fired when a user logs on to a
>>>>>>Windows system.
>>>>>>
>>>>>>Here is the native code that parses the signals. Note that I am
>>>>>>passing any
>>>>>>unknown signals off to the JVM as well so the controlEvent method
>>>>>>of your
>>>>>>WrapperListener should get them if they are thrown.
>>>>>>
>>>>>>---
>>>>>>int wrapperConsoleHandler(int key) {
>>>>>>int event;
>>>>>>
>>>>>>/* Call the control callback in the java code */
>>>>>>switch(key) {
>>>>>>case CTRL_C_EVENT:
>>>>>>event =
>>>>>>org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_C_EVENT;
>>>>>>break;
>>>>>>case CTRL_BREAK_EVENT:
>>>>>>/* This is a request to do a thread dump. Let the JVM handle this. */
>>>>>>return FALSE;
>>>>>>case CTRL_CLOSE_EVENT:
>>>>>>event =
>>>>>>org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_CLOSE_EVENT;
>>>>>>break;
>>>>>>case CTRL_LOGOFF_EVENT:
>>>>>>event =
>>>>>>org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_LOGOFF_EVENT;
>>>>>>break;
>>>>>>case CTRL_SHUTDOWN_EVENT:
>>>>>>event =
>>>>>>org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_SHUTDOWN_EVENT;
>>>>>>break;
>>>>>>default:
>>>>>>event = key;
>>>>>>}
>>>>>>if (wrapperJNIDebugging) {
>>>>>>printf("Got Control Signal %d->%d\n", key, event);
>>>>>>flushall();
>>>>>>}
>>>>>>
>>>>>>wrapperJNIHandleSignal(event);
>>>>>>
>>>>>>if (wrapperJNIDebugging) {
>>>>>>printf("Handled signal\n");
>>>>>>flushall();
>>>>>>}
>>>>>>
>>>>>>return TRUE; /* We handled the event. */
>>>>>>}
>>>>>>---
>>>>>>
>>>>>>Please most back with as much info as you can make available even
>>>>>>if you
>>>>>>get this working.
>>>>>>
>>>>>>Cheers,
>>>>>>Leif
>>>>>>
>>>>>>Richard Luong wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>I want to hook onto the Windows Login (Gina.dll) so that I can login
>>>>>>>through an ID card. I can do the JNI stuff to talk from Java to the C
>>>>>>>dll. But I would like the C code to be able to talk back to the Java
>>>>>>>code through throwing events to my NT Service.
>>>>>>>
>>>>>>>My question is, does the Java Service Wrapper catch all events and
>>>>>>>pass them on? If that's so, then problem solved.
>>>>>>>
>>>>>>>If not, does it only pass on specific control events such as windows
>>>>>>>logoff, shutdown and ctr+C ?
>>>>>>>
>>>>>>>If so, can I modify the code to pass on all events? I know that I
>>>>>>>will
>>>>>>>have to use Integration Method #3, which is not a problem for me.
>>>>>>>However, any pointers to the code that is catching and possibly
>>>>>>>ignoring/passing on events would be helpful.
>>>>>>>
>>>>>>>Thanks.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
|
|
From: Richard L. <ric...@ms...> - 2004-03-01 19:55:30
|
Leif,
Thanks again for your very informative response. The custom dll, that
would have been the calling code would have taken the return value,
which is usually regarded as 0 being false and any other value as true,
and actually "cast/convert" the response and use it as if it were an
int. But from what I'm reading from your response, this might be a
little too much for myself to do. But maybe I can work around this
constraint.
This brings me to my next question. If the native code currently
returns a BOOL, is there anyway that the java code can return a true or
false, that way the calling native code will forward that response on?
Richard.
Leif Mortenson wrote:
> Richard,
> I am confused. If I understand correctly then what you are saying does not
> appear to be supported by the Windows API.
>
> It would be possible for the WrapperListener.controlEvent method to return
> an integer rather than a boolean. This would be difficult as it would break
> things for the user base. But it is technically possible. The problem is
> what to do with that code once it has been returned to the native JNI
> library.
>
> This is complicated by what follows, but normally the controlEvent would be
> called from within a Handler callback function registered with the Windows
> SetConsoleCtrlHandler function. This API declares that the handler
> function should return a BOOL, not an int. That means that the calling
> code would interpret 0 as FALSE and anything else as TRUE. I don't see
> how returning an integer code could possibly work?
>
> Now. The problem is that the above call thread is not the way things are
> actually implemented. For some reason I was finding that various versions
> of the JVM liked to crash if a JNI call was made into the JVM from within
> a Ctrl Handler. To work around this, the handler will simply store its last
> known event code. The JVM then polls that code for a value to pass to the
> WrapperListener.controlEvent. User code should never notice a
> difference as signals are never fired at very high rates. The problem is
> that as things are currently implemented, it is not possible to return even
> the BOOL return value. Rather, the WrapperManager java code takes
> responsibility of handling things like CTRL-C events. If the user code
> chose not to handle the event then the WrapperManager does so.
>
> Is this what you are asking?
>
> If all you want to do is be able to pass user defined events to the Wrapper
> and thus the JVM, then the Wrapper should handle that as is. Any user
> defined signals should be passed right into the JVM via the
> WrapperListener.controlEvent method.
>
> Cheers,
> Leif
>
> Richard Luong wrote:
>
>
>>Leif,
>>
>>Thanks for your response. We have implemented a custom login dll that
>>hooks into the windows system. It will send the service a system
>>event. The service will then "respond" back to the the custom dll with
>>a custom code. Thereby allowing pseudo-communication between the java
>>thread being run as a service and the custom windows login dll.
>>
>>Is that not possible with the current code? If not, do you think it
>>would be a hard thing for myself to implement? You are more
>>knowledgable in this topic than I am. But is it possible for me to
>>edit the contolEvent method to return back an integer to the call
>>native code? I don't want to waste time coding something that will not
>>work. Is it possible for a java method to return an integer in JNI?
>>Thanks for your help. This seems like a great product and I really
>>hope I can use it.
>>
>>Richard.
>>
>>
>>
>>>From: Leif Mortenson <le...@ta...>
>>>Reply-To: wra...@li...
>>>To: wra...@li...
>>>Subject: Re: [Wrapper-user] How to catch other system events
>>>Date: Sun, 29 Feb 2004 22:05:46 +0900
>>>
>>>Richard,
>>>The wrapperConsoleHandler function is simply a callback registered
>>>with the
>>>Windows SetConsoleCtrlHandler function. The handler actually returns
>>>a BOOL.
>>>Even if the code allowed you to return a custom code, the Windows API
>>>would
>>>not know what to do with it. Am I missing something?
>>>| |
>>>Cheers,
>>>Leif
>>>
>>>Richard Luong wrote:
>>>
>>>
>>>>Leif,
>>>>
>>>>Thanks for your response. Sorry my response is somewhat late,
>>>>however this project's priority was shifted around for me.
>>>>
>>>>You are correct in that Windows doesn't throw any signal for a use
>>>>login. What I have is a dll, that hooks onto the windows login
>>>>service and basically sends my java thread custom signals. My thread
>>>>will then return an integer as a response. At least that's the plan.
>>>>
>>>>My question is, how do I reply to a system event? I see from your
>>>>code sample below, that your wrapperConsoleHandler returns an int.
>>>>And that int is true. That method then passes it to the JVM's
>>>>controlEvent method, which returns void. Is there anyway that I can
>>>>return my own custom code? Thanks.
>>>>
>>>>Richard.
>>>>
>>>>
>>>>>Subject:
>>>>>Re: [Wrapper-user] How to catch other system events
>>>>>From:
>>>>>Leif Mortenson <le...@ta...>
>>>>>Date:
>>>>>Thu, 08 Jan 2004 18:59:21 +0900
>>>>>To:
>>>>>wra...@li...
>>>>>
>>>>>To:
>>>>>wra...@li...
>>>>>
>>>>>
>>>>>Richard,
>>>>>Sorry I never answered you did I.
>>>>>
>>>>>The Wrapper currently catches system events in the native code,
>>>>>Wrapper.DLL. It is taking any signal except the CTRL_BREAK_EVENT,
>>>>>which
>>>>>is used to generate thread dumps.
>>>>>What is the actual system signal that your card is throwing? Normally
>>>>>windows does not throw any signals that I know of when a user logs
>>>>>in. I am
>>>>>interesting in finding out how your card works because I have been
>>>>>looking
>>>>>for a nice clean way of telling when a user logs on for a while.
>>>>>The next
>>>>>version of the Wrapper allows you to poll for this information, but
>>>>>there is
>>>>>no signal that I could find that is fired when a user logs on to a
>>>>>Windows system.
>>>>>
>>>>>Here is the native code that parses the signals. Note that I am
>>>>>passing any
>>>>>unknown signals off to the JVM as well so the controlEvent method
>>>>>of your
>>>>>WrapperListener should get them if they are thrown.
>>>>>
>>>>>---
>>>>>int wrapperConsoleHandler(int key) {
>>>>>int event;
>>>>>
>>>>>/* Call the control callback in the java code */
>>>>>switch(key) {
>>>>>case CTRL_C_EVENT:
>>>>>event =
>>>>>org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_C_EVENT;
>>>>>break;
>>>>>case CTRL_BREAK_EVENT:
>>>>>/* This is a request to do a thread dump. Let the JVM handle this. */
>>>>>return FALSE;
>>>>>case CTRL_CLOSE_EVENT:
>>>>>event =
>>>>>org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_CLOSE_EVENT;
>>>>>break;
>>>>>case CTRL_LOGOFF_EVENT:
>>>>>event =
>>>>>org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_LOGOFF_EVENT;
>>>>>break;
>>>>>case CTRL_SHUTDOWN_EVENT:
>>>>>event =
>>>>>org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_SHUTDOWN_EVENT;
>>>>>break;
>>>>>default:
>>>>>event = key;
>>>>>}
>>>>>if (wrapperJNIDebugging) {
>>>>>printf("Got Control Signal %d->%d\n", key, event);
>>>>>flushall();
>>>>>}
>>>>>
>>>>>wrapperJNIHandleSignal(event);
>>>>>
>>>>>if (wrapperJNIDebugging) {
>>>>>printf("Handled signal\n");
>>>>>flushall();
>>>>>}
>>>>>
>>>>>return TRUE; /* We handled the event. */
>>>>>}
>>>>>---
>>>>>
>>>>>Please most back with as much info as you can make available even
>>>>>if you
>>>>>get this working.
>>>>>
>>>>>Cheers,
>>>>>Leif
>>>>>
>>>>>Richard Luong wrote:
>>>>>
>>>>>
>>>>>
>>>>>>I want to hook onto the Windows Login (Gina.dll) so that I can login
>>>>>>through an ID card. I can do the JNI stuff to talk from Java to the C
>>>>>>dll. But I would like the C code to be able to talk back to the Java
>>>>>>code through throwing events to my NT Service.
>>>>>>
>>>>>>My question is, does the Java Service Wrapper catch all events and
>>>>>>pass them on? If that's so, then problem solved.
>>>>>>
>>>>>>If not, does it only pass on specific control events such as windows
>>>>>>logoff, shutdown and ctr+C ?
>>>>>>
>>>>>>If so, can I modify the code to pass on all events? I know that I
>>>>>>will
>>>>>>have to use Integration Method #3, which is not a problem for me.
>>>>>>However, any pointers to the code that is catching and possibly
>>>>>>ignoring/passing on events would be helpful.
>>>>>>
>>>>>>Thanks.
>>>>>
>>>>>
>
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
> .
>
|
|
From: Leif M. <le...@ta...> - 2004-03-01 09:49:46
|
Richard,
I am confused. If I understand correctly then what you are saying does not
appear to be supported by the Windows API.
It would be possible for the WrapperListener.controlEvent method to return
an integer rather than a boolean. This would be difficult as it would break
things for the user base. But it is technically possible. The problem is
what to do with that code once it has been returned to the native JNI
library.
This is complicated by what follows, but normally the controlEvent would be
called from within a Handler callback function registered with the Windows
SetConsoleCtrlHandler function. This API declares that the handler
function should return a BOOL, not an int. That means that the calling
code would interpret 0 as FALSE and anything else as TRUE. I don't see
how returning an integer code could possibly work?
Now. The problem is that the above call thread is not the way things are
actually implemented. For some reason I was finding that various versions
of the JVM liked to crash if a JNI call was made into the JVM from within
a Ctrl Handler. To work around this, the handler will simply store its last
known event code. The JVM then polls that code for a value to pass to the
WrapperListener.controlEvent. User code should never notice a
difference as signals are never fired at very high rates. The problem is
that as things are currently implemented, it is not possible to return even
the BOOL return value. Rather, the WrapperManager java code takes
responsibility of handling things like CTRL-C events. If the user code
chose not to handle the event then the WrapperManager does so.
Is this what you are asking?
If all you want to do is be able to pass user defined events to the Wrapper
and thus the JVM, then the Wrapper should handle that as is. Any user
defined signals should be passed right into the JVM via the
WrapperListener.controlEvent method.
Cheers,
Leif
Richard Luong wrote:
> Leif,
>
> Thanks for your response. We have implemented a custom login dll that
> hooks into the windows system. It will send the service a system
> event. The service will then "respond" back to the the custom dll with
> a custom code. Thereby allowing pseudo-communication between the java
> thread being run as a service and the custom windows login dll.
>
> Is that not possible with the current code? If not, do you think it
> would be a hard thing for myself to implement? You are more
> knowledgable in this topic than I am. But is it possible for me to
> edit the contolEvent method to return back an integer to the call
> native code? I don't want to waste time coding something that will not
> work. Is it possible for a java method to return an integer in JNI?
> Thanks for your help. This seems like a great product and I really
> hope I can use it.
>
> Richard.
>
>
>> From: Leif Mortenson <le...@ta...>
>> Reply-To: wra...@li...
>> To: wra...@li...
>> Subject: Re: [Wrapper-user] How to catch other system events
>> Date: Sun, 29 Feb 2004 22:05:46 +0900
>>
>> Richard,
>> The wrapperConsoleHandler function is simply a callback registered
>> with the
>> Windows SetConsoleCtrlHandler function. The handler actually returns
>> a BOOL.
>> Even if the code allowed you to return a custom code, the Windows API
>> would
>> not know what to do with it. Am I missing something?
>> | |
>> Cheers,
>> Leif
>>
>> Richard Luong wrote:
>>
>>> Leif,
>>>
>>> Thanks for your response. Sorry my response is somewhat late,
>>> however this project's priority was shifted around for me.
>>>
>>> You are correct in that Windows doesn't throw any signal for a use
>>> login. What I have is a dll, that hooks onto the windows login
>>> service and basically sends my java thread custom signals. My thread
>>> will then return an integer as a response. At least that's the plan.
>>>
>>> My question is, how do I reply to a system event? I see from your
>>> code sample below, that your wrapperConsoleHandler returns an int.
>>> And that int is true. That method then passes it to the JVM's
>>> controlEvent method, which returns void. Is there anyway that I can
>>> return my own custom code? Thanks.
>>>
>>> Richard.
>>>
>>>> Subject:
>>>> Re: [Wrapper-user] How to catch other system events
>>>> From:
>>>> Leif Mortenson <le...@ta...>
>>>> Date:
>>>> Thu, 08 Jan 2004 18:59:21 +0900
>>>> To:
>>>> wra...@li...
>>>>
>>>> To:
>>>> wra...@li...
>>>>
>>>>
>>>> Richard,
>>>> Sorry I never answered you did I.
>>>>
>>>> The Wrapper currently catches system events in the native code,
>>>> Wrapper.DLL. It is taking any signal except the CTRL_BREAK_EVENT,
>>>> which
>>>> is used to generate thread dumps.
>>>> What is the actual system signal that your card is throwing? Normally
>>>> windows does not throw any signals that I know of when a user logs
>>>> in. I am
>>>> interesting in finding out how your card works because I have been
>>>> looking
>>>> for a nice clean way of telling when a user logs on for a while.
>>>> The next
>>>> version of the Wrapper allows you to poll for this information, but
>>>> there is
>>>> no signal that I could find that is fired when a user logs on to a
>>>> Windows system.
>>>>
>>>> Here is the native code that parses the signals. Note that I am
>>>> passing any
>>>> unknown signals off to the JVM as well so the controlEvent method
>>>> of your
>>>> WrapperListener should get them if they are thrown.
>>>>
>>>> ---
>>>> int wrapperConsoleHandler(int key) {
>>>> int event;
>>>>
>>>> /* Call the control callback in the java code */
>>>> switch(key) {
>>>> case CTRL_C_EVENT:
>>>> event =
>>>> org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_C_EVENT;
>>>> break;
>>>> case CTRL_BREAK_EVENT:
>>>> /* This is a request to do a thread dump. Let the JVM handle this. */
>>>> return FALSE;
>>>> case CTRL_CLOSE_EVENT:
>>>> event =
>>>> org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_CLOSE_EVENT;
>>>> break;
>>>> case CTRL_LOGOFF_EVENT:
>>>> event =
>>>> org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_LOGOFF_EVENT;
>>>> break;
>>>> case CTRL_SHUTDOWN_EVENT:
>>>> event =
>>>> org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_SHUTDOWN_EVENT;
>>>> break;
>>>> default:
>>>> event = key;
>>>> }
>>>> if (wrapperJNIDebugging) {
>>>> printf("Got Control Signal %d->%d\n", key, event);
>>>> flushall();
>>>> }
>>>>
>>>> wrapperJNIHandleSignal(event);
>>>>
>>>> if (wrapperJNIDebugging) {
>>>> printf("Handled signal\n");
>>>> flushall();
>>>> }
>>>>
>>>> return TRUE; /* We handled the event. */
>>>> }
>>>> ---
>>>>
>>>> Please most back with as much info as you can make available even
>>>> if you
>>>> get this working.
>>>>
>>>> Cheers,
>>>> Leif
>>>>
>>>> Richard Luong wrote:
>>>>
>>>>
>>>>> I want to hook onto the Windows Login (Gina.dll) so that I can login
>>>>> through an ID card. I can do the JNI stuff to talk from Java to the C
>>>>> dll. But I would like the C code to be able to talk back to the Java
>>>>> code through throwing events to my NT Service.
>>>>>
>>>>> My question is, does the Java Service Wrapper catch all events and
>>>>> pass them on? If that's so, then problem solved.
>>>>>
>>>>> If not, does it only pass on specific control events such as windows
>>>>> logoff, shutdown and ctr+C ?
>>>>>
>>>>> If so, can I modify the code to pass on all events? I know that I
>>>>> will
>>>>> have to use Integration Method #3, which is not a problem for me.
>>>>> However, any pointers to the code that is catching and possibly
>>>>> ignoring/passing on events would be helpful.
>>>>>
>>>>> Thanks.
>>>>
>>>>
|
|
From: Richard L. <ric...@ms...> - 2004-03-01 05:32:38
|
Leif,
Thanks for your response. We have implemented a custom login dll that hooks
into the windows system. It will send the service a system event. The
service will then "respond" back to the the custom dll with a custom code.
Thereby allowing pseudo-communication between the java thread being run as a
service and the custom windows login dll.
Is that not possible with the current code? If not, do you think it would
be a hard thing for myself to implement? You are more knowledgable in this
topic than I am. But is it possible for me to edit the contolEvent method
to return back an integer to the call native code? I don't want to waste
time coding something that will not work. Is it possible for a java method
to return an integer in JNI? Thanks for your help. This seems like a great
product and I really hope I can use it.
Richard.
>From: Leif Mortenson <le...@ta...>
>Reply-To: wra...@li...
>To: wra...@li...
>Subject: Re: [Wrapper-user] How to catch other system events
>Date: Sun, 29 Feb 2004 22:05:46 +0900
>
>Richard,
> The wrapperConsoleHandler function is simply a callback registered with
>the
>Windows SetConsoleCtrlHandler function. The handler actually returns a
>BOOL.
>Even if the code allowed you to return a custom code, the Windows API would
>not know what to do with it. Am I missing something?
>| |
>Cheers,
>Leif
>
>Richard Luong wrote:
>
>>Leif,
>>
>>Thanks for your response. Sorry my response is somewhat late, however
>>this project's priority was shifted around for me.
>>
>>You are correct in that Windows doesn't throw any signal for a use login.
>>What I have is a dll, that hooks onto the windows login service and
>>basically sends my java thread custom signals. My thread will then return
>>an integer as a response. At least that's the plan.
>>
>>My question is, how do I reply to a system event? I see from your code
>>sample below, that your wrapperConsoleHandler returns an int. And that
>>int is true. That method then passes it to the JVM's controlEvent method,
>>which returns void. Is there anyway that I can return my own custom code?
>> Thanks.
>>
>>Richard.
>>
>>>Subject:
>>>Re: [Wrapper-user] How to catch other system events
>>>From:
>>>Leif Mortenson <le...@ta...>
>>>Date:
>>>Thu, 08 Jan 2004 18:59:21 +0900
>>>To:
>>>wra...@li...
>>>
>>>To:
>>>wra...@li...
>>>
>>>
>>>Richard,
>>>Sorry I never answered you did I.
>>>
>>>The Wrapper currently catches system events in the native code,
>>>Wrapper.DLL. It is taking any signal except the CTRL_BREAK_EVENT, which
>>>is used to generate thread dumps.
>>>What is the actual system signal that your card is throwing? Normally
>>>windows does not throw any signals that I know of when a user logs in. I
>>>am
>>>interesting in finding out how your card works because I have been
>>>looking
>>>for a nice clean way of telling when a user logs on for a while. The next
>>>version of the Wrapper allows you to poll for this information, but there
>>>is
>>>no signal that I could find that is fired when a user logs on to a
>>>Windows system.
>>>
>>>Here is the native code that parses the signals. Note that I am passing
>>>any
>>>unknown signals off to the JVM as well so the controlEvent method of your
>>>WrapperListener should get them if they are thrown.
>>>
>>>---
>>>int wrapperConsoleHandler(int key) {
>>>int event;
>>>
>>>/* Call the control callback in the java code */
>>>switch(key) {
>>>case CTRL_C_EVENT:
>>>event = org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_C_EVENT;
>>>break;
>>>case CTRL_BREAK_EVENT:
>>>/* This is a request to do a thread dump. Let the JVM handle this. */
>>>return FALSE;
>>>case CTRL_CLOSE_EVENT:
>>>event =
>>>org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_CLOSE_EVENT;
>>>break;
>>>case CTRL_LOGOFF_EVENT:
>>>event =
>>>org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_LOGOFF_EVENT;
>>>break;
>>>case CTRL_SHUTDOWN_EVENT:
>>>event =
>>>org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_SHUTDOWN_EVENT;
>>>break;
>>>default:
>>>event = key;
>>>}
>>>if (wrapperJNIDebugging) {
>>>printf("Got Control Signal %d->%d\n", key, event);
>>>flushall();
>>>}
>>>
>>>wrapperJNIHandleSignal(event);
>>>
>>>if (wrapperJNIDebugging) {
>>>printf("Handled signal\n");
>>>flushall();
>>>}
>>>
>>>return TRUE; /* We handled the event. */
>>>}
>>>---
>>>
>>>Please most back with as much info as you can make available even if you
>>>get this working.
>>>
>>>Cheers,
>>>Leif
>>>
>>>Richard Luong wrote:
>>>
>>>
>>>>I want to hook onto the Windows Login (Gina.dll) so that I can login
>>>>through an ID card. I can do the JNI stuff to talk from Java to the C
>>>>dll. But I would like the C code to be able to talk back to the Java
>>>>code through throwing events to my NT Service.
>>>>
>>>>My question is, does the Java Service Wrapper catch all events and
>>>>pass them on? If that's so, then problem solved.
>>>>
>>>>If not, does it only pass on specific control events such as windows
>>>>logoff, shutdown and ctr+C ?
>>>>
>>>>If so, can I modify the code to pass on all events? I know that I will
>>>>have to use Integration Method #3, which is not a problem for me.
>>>>However, any pointers to the code that is catching and possibly
>>>>ignoring/passing on events would be helpful.
>>>>
>>>>Thanks.
>>>
>
>
>
>-------------------------------------------------------
>SF.Net is sponsored by: Speed Start Your Linux Apps Now.
>Build and deploy apps & Web services for Linux with
>a free DVD software kit from IBM. Click Now!
>http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
>_______________________________________________
>Wrapper-user mailing list
>Wra...@li...
>https://lists.sourceforge.net/lists/listinfo/wrapper-user
_________________________________________________________________
Dream of owning a home? Find out how in the First-time Home Buying Guide.
http://special.msn.com/home/firsthome.armx
|
|
From: Leif M. <le...@ta...> - 2004-02-29 13:17:39
|
Richard,
The wrapperConsoleHandler function is simply a callback registered
with the
Windows SetConsoleCtrlHandler function. The handler actually returns a
BOOL.
Even if the code allowed you to return a custom code, the Windows API would
not know what to do with it. Am I missing something?
| |
Cheers,
Leif
Richard Luong wrote:
> Leif,
>
> Thanks for your response. Sorry my response is somewhat late, however
> this project's priority was shifted around for me.
>
> You are correct in that Windows doesn't throw any signal for a use
> login. What I have is a dll, that hooks onto the windows login
> service and basically sends my java thread custom signals. My thread
> will then return an integer as a response. At least that's the plan.
>
> My question is, how do I reply to a system event? I see from your
> code sample below, that your wrapperConsoleHandler returns an int.
> And that int is true. That method then passes it to the JVM's
> controlEvent method, which returns void. Is there anyway that I can
> return my own custom code? Thanks.
>
> Richard.
>
>> Subject:
>> Re: [Wrapper-user] How to catch other system events
>> From:
>> Leif Mortenson <le...@ta...>
>> Date:
>> Thu, 08 Jan 2004 18:59:21 +0900
>> To:
>> wra...@li...
>>
>> To:
>> wra...@li...
>>
>>
>> Richard,
>> Sorry I never answered you did I.
>>
>> The Wrapper currently catches system events in the native code,
>> Wrapper.DLL. It is taking any signal except the CTRL_BREAK_EVENT, which
>> is used to generate thread dumps.
>> What is the actual system signal that your card is throwing? Normally
>> windows does not throw any signals that I know of when a user logs
>> in. I am
>> interesting in finding out how your card works because I have been
>> looking
>> for a nice clean way of telling when a user logs on for a while. The
>> next
>> version of the Wrapper allows you to poll for this information, but
>> there is
>> no signal that I could find that is fired when a user logs on to a
>> Windows system.
>>
>> Here is the native code that parses the signals. Note that I am
>> passing any
>> unknown signals off to the JVM as well so the controlEvent method of
>> your
>> WrapperListener should get them if they are thrown.
>>
>> ---
>> int wrapperConsoleHandler(int key) {
>> int event;
>>
>> /* Call the control callback in the java code */
>> switch(key) {
>> case CTRL_C_EVENT:
>> event = org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_C_EVENT;
>> break;
>> case CTRL_BREAK_EVENT:
>> /* This is a request to do a thread dump. Let the JVM handle this. */
>> return FALSE;
>> case CTRL_CLOSE_EVENT:
>> event =
>> org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_CLOSE_EVENT;
>> break;
>> case CTRL_LOGOFF_EVENT:
>> event =
>> org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_LOGOFF_EVENT;
>> break;
>> case CTRL_SHUTDOWN_EVENT:
>> event =
>> org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_SHUTDOWN_EVENT;
>> break;
>> default:
>> event = key;
>> }
>> if (wrapperJNIDebugging) {
>> printf("Got Control Signal %d->%d\n", key, event);
>> flushall();
>> }
>>
>> wrapperJNIHandleSignal(event);
>>
>> if (wrapperJNIDebugging) {
>> printf("Handled signal\n");
>> flushall();
>> }
>>
>> return TRUE; /* We handled the event. */
>> }
>> ---
>>
>> Please most back with as much info as you can make available even if you
>> get this working.
>>
>> Cheers,
>> Leif
>>
>> Richard Luong wrote:
>>
>>
>>> I want to hook onto the Windows Login (Gina.dll) so that I can login
>>> through an ID card. I can do the JNI stuff to talk from Java to the C
>>> dll. But I would like the C code to be able to talk back to the Java
>>> code through throwing events to my NT Service.
>>>
>>> My question is, does the Java Service Wrapper catch all events and
>>> pass them on? If that's so, then problem solved.
>>>
>>> If not, does it only pass on specific control events such as windows
>>> logoff, shutdown and ctr+C ?
>>>
>>> If so, can I modify the code to pass on all events? I know that I will
>>> have to use Integration Method #3, which is not a problem for me.
>>> However, any pointers to the code that is catching and possibly
>>> ignoring/passing on events would be helpful.
>>>
>>> Thanks.
>>
|
|
From: Richard L. <ric...@ms...> - 2004-02-29 03:37:04
|
Leif,
Thanks for your response. Sorry my response is somewhat late, however
this project's priority was shifted around for me.
You are correct in that Windows doesn't throw any signal for a use
login. What I have is a dll, that hooks onto the windows login service
and basically sends my java thread custom signals. My thread will then
return an integer as a response. At least that's the plan.
My question is, how do I reply to a system event? I see from your code
sample below, that your wrapperConsoleHandler returns an int. And that
int is true. That method then passes it to the JVM's controlEvent
method, which returns void. Is there anyway that I can return my own
custom code? Thanks.
Richard.
> Subject:
> Re: [Wrapper-user] How to catch other system events
> From:
> Leif Mortenson <le...@ta...>
> Date:
> Thu, 08 Jan 2004 18:59:21 +0900
> To:
> wra...@li...
>
> To:
> wra...@li...
>
>
> Richard,
> Sorry I never answered you did I.
>
> The Wrapper currently catches system events in the native code,
> Wrapper.DLL. It is taking any signal except the CTRL_BREAK_EVENT, which
> is used to generate thread dumps.
> What is the actual system signal that your card is throwing? Normally
> windows does not throw any signals that I know of when a user logs in. I am
> interesting in finding out how your card works because I have been looking
> for a nice clean way of telling when a user logs on for a while. The next
> version of the Wrapper allows you to poll for this information, but there is
> no signal that I could find that is fired when a user logs on to a
> Windows system.
>
> Here is the native code that parses the signals. Note that I am passing any
> unknown signals off to the JVM as well so the controlEvent method of your
> WrapperListener should get them if they are thrown.
>
> ---
> int wrapperConsoleHandler(int key) {
> int event;
>
> /* Call the control callback in the java code */
> switch(key) {
> case CTRL_C_EVENT:
> event = org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_C_EVENT;
> break;
> case CTRL_BREAK_EVENT:
> /* This is a request to do a thread dump. Let the JVM handle this. */
> return FALSE;
> case CTRL_CLOSE_EVENT:
> event = org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_CLOSE_EVENT;
> break;
> case CTRL_LOGOFF_EVENT:
> event = org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_LOGOFF_EVENT;
> break;
> case CTRL_SHUTDOWN_EVENT:
> event =
> org_tanukisoftware_wrapper_WrapperManager_WRAPPER_CTRL_SHUTDOWN_EVENT;
> break;
> default:
> event = key;
> }
> if (wrapperJNIDebugging) {
> printf("Got Control Signal %d->%d\n", key, event);
> flushall();
> }
>
> wrapperJNIHandleSignal(event);
>
> if (wrapperJNIDebugging) {
> printf("Handled signal\n");
> flushall();
> }
>
> return TRUE; /* We handled the event. */
> }
> ---
>
> Please most back with as much info as you can make available even if you
> get this working.
>
> Cheers,
> Leif
>
> Richard Luong wrote:
>
>
>>I want to hook onto the Windows Login (Gina.dll) so that I can login
>>through an ID card. I can do the JNI stuff to talk from Java to the C
>>dll. But I would like the C code to be able to talk back to the Java
>>code through throwing events to my NT Service.
>>
>>My question is, does the Java Service Wrapper catch all events and
>>pass them on? If that's so, then problem solved.
>>
>>If not, does it only pass on specific control events such as windows
>>logoff, shutdown and ctr+C ?
>>
>>If so, can I modify the code to pass on all events? I know that I will
>>have to use Integration Method #3, which is not a problem for me.
>>However, any pointers to the code that is catching and possibly
>>ignoring/passing on events would be helpful.
>>
>>Thanks.
>>
>>_________________________________________________________________
>>Expand your wine savvy ?and get some great new recipes ?at MSN Wine.
>>http://wine.msn.com
>>
>>
>>
>>-------------------------------------------------------
>>This SF.net email is sponsored by: Perforce Software.
>>Perforce is the Fast Software Configuration Management System offering
>>advanced branching capabilities and atomic changes on 50+ platforms.
>>Free Eval! http://www.perforce.com/perforce/loadprog.html
>>_______________________________________________
>>Wrapper-user mailing list
>>Wra...@li...
>>https://lists.sourceforge.net/lists/listinfo/wrapper-user
>>
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Perforce Software.
> Perforce is the Fast Software Configuration Management System offering
> advanced branching capabilities and atomic changes on 50+ platforms.
> Free Eval! http://www.perforce.com/perforce/loadprog.html
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
|
|
From: Leif M. <le...@ta...> - 2004-02-27 00:59:47
|
Jennifer,
Currently this is not possible. I registered a Feature Request for
this and will look
into whether it is possible.
https://sourceforge.net/tracker/index.php?func=detail&aid=905510&group_id=39428&atid=425190
Cheers,
Leif
Jennifer Kolar wrote:
> Is there any way via the ServiceWrapper config or code for how to
> install a windows service to specify the recovery setttings for that
> service???
> that would be very useful... so it didn't have to be done manually for
> each service.
>
> Thanks
> Jennifer
|
|
From: Leif M. <le...@ta...> - 2004-02-27 00:56:34
|
Jennifer,
There have been a large number of changes across the board. So doubt
that updating any one file would work for you. Please checkout the latest
version of the entire CVS repository and build from that.
The following page tells you how to check out the code. You will want
to check out the "wrapper" module from the repository. Once you have it
checked out you should just be able to run build.bat. This requires a JDK
and MSVC to build.
http://sourceforge.net/cvs/?group_id=39428
Cheers,
Leif
Jennifer Kolar wrote:
>Leif,
>what files in particular do I need to grab from CVS to get this fix??
>and what revision of those files?
>thanks
>Jennifer
>
>Leif Mortenson wrote on 2/25/2004, 7:47 AM:
>
> > Jocke,
> > This is actually a known problem with 3.0.5 and earlier versions. Due
> > to a
> > misunderstanding in the way that portion of the NT Service Manager API
> > worked, I was not exiting the Wrapper correctly in the event of a
> > non-zero
> > exit code.
> >
> > This has been resolved and will be in the 3.1.0 release. If you are able,
> > you can build a snapshot from CVS to get this fix early.
> >
> > Cheers,
> > Leif
> >
> > my Mailer wrote:
> >
> > >Hi all!
> > >
> > >I know this has been a topic before but when I’m
> > >reading earlier mails, the documentation and running a
> > >few tests I don’t get it all. In W2k one could set the
> > >service to restart if it fails (in the recovery tab).
> > >My guess is that the return code from the service
> > >determines if the service has failed or not when
> > >stopping. The stop method from the WrapperListener
> > >returns the exit code for the service. If it returns 0
> > >everything works the way I want, the service stops
> > >correctly. But if the exit code is not zero, that
> > >should indicate that something is wrong and the
> > >service should be restarted, but it doesn’t. Instead,
> > >if the exit code is 1 the service stops and in the W2k
> > >Event Viewer shows the description of the exit code
> > >(in this case ‘Incorrect function’).
> > >
> > >Is it possible to get the Wrapper to return the code
> > >to the Service Control Manager in a way that the
> > >service will be restarted?
> > >
> > >Thanks in advance,
> > >
> > >/Jocke
> > >
> > >
> > >Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på
> > adressen http://se.docs.yahoo.com/travel/index.html
> > >
> > >
> > >-------------------------------------------------------
> > >SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> > >Build and deploy apps & Web services for Linux with
> > >a free DVD software kit from IBM. Click Now!
> > >http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> > >_______________________________________________
> > >Wrapper-user mailing list
> > >Wra...@li...
> > >https://lists.sourceforge.net/lists/listinfo/wrapper-user
> > >
> > >
> > >
> >
> >
> >
> > -------------------------------------------------------
> > SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> > Build and deploy apps & Web services for Linux with
> > a free DVD software kit from IBM. Click Now!
> > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> > _______________________________________________
> > Wrapper-user mailing list
> > Wra...@li...
> > https://lists.sourceforge.net/lists/listinfo/wrapper-user
> >
>
>
>
>
>-------------------------------------------------------
>SF.Net is sponsored by: Speed Start Your Linux Apps Now.
>Build and deploy apps & Web services for Linux with
>a free DVD software kit from IBM. Click Now!
>http://ads.osdn.com/?ad_id56&alloc_id438&op=click
>_______________________________________________
>Wrapper-user mailing list
>Wra...@li...
>https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
|
|
From: Jennifer K. <jk...@si...> - 2004-02-26 17:48:34
|
Leif, what files in particular do I need to grab from CVS to get this fix??=20 and what revision of those files? thanks Jennifer Leif Mortenson wrote on 2/25/2004, 7:47 AM: > Jocke, > This is actually a known problem with 3.0.5 and earlier versions. Due > to a > misunderstanding in the way that portion of the NT Service Manager API > worked, I was not exiting the Wrapper correctly in the event of a > non-zero > exit code. > > This has been resolved and will be in the 3.1.0 release. If you are able= , > you can build a snapshot from CVS to get this fix early. > > Cheers, > Leif > > my Mailer wrote: > > >Hi all! > > > >I know this has been a topic before but when I=E2=80=99m > >reading earlier mails, the documentation and running a > >few tests I don=E2=80=99t get it all. In W2k one could set the > >service to restart if it fails (in the recovery tab). > >My guess is that the return code from the service > >determines if the service has failed or not when > >stopping. The stop method from the WrapperListener > >returns the exit code for the service. If it returns 0 > >everything works the way I want, the service stops > >correctly. But if the exit code is not zero, that > >should indicate that something is wrong and the > >service should be restarted, but it doesn=E2=80=99t. Instead, > >if the exit code is 1 the service stops and in the W2k > >Event Viewer shows the description of the exit code > >(in this case =E2=80=98Incorrect function=E2=80=99). > > > >Is it possible to get the Wrapper to return the code > >to the Service Control Manager in a way that the > >service will be restarted? > > > >Thanks in advance, > > > >/Jocke > > > > > >H=C3=B6strusk och gr=C3=A5 moln - k=C3=B6p en resa till solen p=C3=A5 Y= ahoo! Resor p=C3=A5 > adressen http://se.docs.yahoo.com/travel/index.html > > > > > >------------------------------------------------------- > >SF.Net is sponsored by: Speed Start Your Linux Apps Now. > >Build and deploy apps & Web services for Linux with > >a free DVD software kit from IBM. Click Now! > >http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick > >_______________________________________________ > >Wrapper-user mailing list > >Wra...@li... > >https://lists.sourceforge.net/lists/listinfo/wrapper-user > > > > > > > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |
|
From: Leif M. <le...@ta...> - 2004-02-25 16:23:22
|
Geoff,
SF has this problem once in a while. It usually comes back up within a
day.
I found the final message in that thread on my machine and attached it.
Let me know if you have any problems getting it working. I don't have
any HP-UX machines myself, but I wonder if there is a way that I could
modify the HP-UX build to build both 32 and 64-bit JNI libraries so that
they can both be included with the release. It would really be great if
such a thing was possible to compile on 32-bit machines? Too much to
hope for??? Depends on the build tools available on HP-UX systems.
The user who has been helping with the HP-UX releases so far has
a 32-bit system.
Cheers,
Leif
Geoffrey Mitchell wrote:
> Leif,
>
> That is correct. We are running a 64-bit HP-UX. Thank you very much
> for the information, however, when I try to access the referenced
> archives, I get a message, "Message Not Found
> This message does not (any longer) exist." On the project page on
> sourceforge, it says "Mailing list archives temporarily disabled
> (details in status if extended outage)
> <http://sourceforge.net/docman/display_doc.php?docid=2352&group_id=1>".
> Any ide if the archives will be available again soon, or if the
> referenced makefile is available anywhere else?
>
> Thanks!
> Geoff
|
|
From: Leif M. <le...@ta...> - 2004-02-25 15:57:00
|
Jocke, This is actually a known problem with 3.0.5 and earlier versions. Due to a misunderstanding in the way that portion of the NT Service Manager API worked, I was not exiting the Wrapper correctly in the event of a non-zero exit code. This has been resolved and will be in the 3.1.0 release. If you are able, you can build a snapshot from CVS to get this fix early. Cheers, Leif my Mailer wrote: >Hi all! > >I know this has been a topic before but when I’m >reading earlier mails, the documentation and running a >few tests I don’t get it all. In W2k one could set the >service to restart if it fails (in the recovery tab). >My guess is that the return code from the service >determines if the service has failed or not when >stopping. The stop method from the WrapperListener >returns the exit code for the service. If it returns 0 >everything works the way I want, the service stops >correctly. But if the exit code is not zero, that >should indicate that something is wrong and the >service should be restarted, but it doesn’t. Instead, >if the exit code is 1 the service stops and in the W2k >Event Viewer shows the description of the exit code >(in this case ‘Incorrect function’). > >Is it possible to get the Wrapper to return the code >to the Service Control Manager in a way that the >service will be restarted? > >Thanks in advance, > >/Jocke > > >Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på adressen http://se.docs.yahoo.com/travel/index.html > > >------------------------------------------------------- >SF.Net is sponsored by: Speed Start Your Linux Apps Now. >Build and deploy apps & Web services for Linux with >a free DVD software kit from IBM. Click Now! >http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click >_______________________________________________ >Wrapper-user mailing list >Wra...@li... >https://lists.sourceforge.net/lists/listinfo/wrapper-user > > > |
|
From: <jo...@ya...> - 2004-02-25 13:51:34
|
Hi all! I know this has been a topic before but when Im reading earlier mails, the documentation and running a few tests I dont get it all. In W2k one could set the service to restart if it fails (in the recovery tab). My guess is that the return code from the service determines if the service has failed or not when stopping. The stop method from the WrapperListener returns the exit code for the service. If it returns 0 everything works the way I want, the service stops correctly. But if the exit code is not zero, that should indicate that something is wrong and the service should be restarted, but it doesnt. Instead, if the exit code is 1 the service stops and in the W2k Event Viewer shows the description of the exit code (in this case Incorrect function). Is it possible to get the Wrapper to return the code to the Service Control Manager in a way that the service will be restarted? Thanks in advance, /Jocke Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på adressen http://se.docs.yahoo.com/travel/index.html |
|
From: v103 <v1...@za...> - 2004-02-25 01:34:51
|
Leif. Thanks, problem solved. I looked over the property files as you mentioned. I placed the application main class to wrapper.java.additional instead of wrapper.app.parameter. Sorry, my mistake. Taikei > Taikei, > Please set the wrapper.debug=true property and then post again. > > This looks like the output from one of my test programs, but it looks > like you are calling its main class directly. My guess is that you > have not read over the integration documentation. > You should be specifying WrapperSimpleApp as your main class. > Then specify your application's main class as its first argument. |
|
From: Leif M. <le...@ta...> - 2004-02-25 01:10:39
|
Taikei, Please set the wrapper.debug=true property and then post again. This looks like the output from one of my test programs, but it looks like you are calling its main class directly. My guess is that you have not read over the integration documentation. You should be specifying WrapperSimpleApp as your main class. Then specify your application's main class as its first argument. v103 wrote: > Leif, the portion of log file is listed as below. > I even adjusted the ping property of conf file but yet to be resolved. Please change the timeouts back to their defaults. That is not the cause of your problems. Cheers, Leif |