|
From: Keith <li...@ke...> - 2004-07-07 17:01:37
|
Hi All, Great util, but Im having a problem getting it set up. Ive followed the instructions for integration method1, and launching the myApp.bat file will launch my App, which acts as a listener on a TCP port. Should my application block once this listener thread has been set up? If I do, I get an error starting the service (after a short while), as it stays in my main method and never exits. If I remove the infinite loop from the end, it falls straight through when starting the service, with a your service has started then stopped; some services automatically message from the OS. Any thoughts? Am I missing something that I should be doing to inform the wrapper that my service is up and running? When I block, the service is running, but you get the service did not respond in a timely fashion error dialog. Once this happens, its no longer running :-( If I dont block, it only lasts for a second. Thanks in advance! Keith. ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ |
|
From: Randy M. <mu...@ca...> - 2004-07-07 20:28:25
|
I would suggest you place your blocking read in a separate thread and run() it from your main() method. =20 Randy On Wed, 2004-07-07 at 11:01, Keith wrote: > Hi All, >=20 > Great util, but I=C2=92m having a problem getting it set up. I=C2=92ve fo= llowed the > instructions for integration method1, and launching the myApp.bat file wi= ll > launch my App, which acts as a listener on a TCP port. >=20 > Should my application block once this listener thread has been set up? If= I > do, I get an error starting the service (after a short while), as it stay= s > in my main method and never exits. If I remove the infinite loop from the > end, it falls straight through when starting the service, with a =C2=93yo= ur > service has started then stopped; some services automatically=C2=94 messa= ge from > the OS. >=20 > Any thoughts? Am I missing something that I should be doing to inform the > wrapper that my service is up and running? When I block, the service is > running, but you get the =C2=93service did not respond in a timely fashio= n=C2=94 error > dialog. Once this happens, it=C2=92s no longer running=C2=85 :-( If I do= n=C2=92t block, it > only lasts for a second. >=20 > Thanks in advance! >=20 > Keith. >=20 >=20 > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ >=20 >=20 > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 -=20 > digital self defense, top technical experts, no vendor pitches,=20 > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user --=20 Randy Murrish Cassatt Corporation |
|
From: Leif M. <le...@ta...> - 2004-07-08 03:23:47
|
Keith, Integration Methods 1 and 2 (WrapperSimpleApp and WrapperStartStopApp) both handle the case where the main method does not return correctly. Method #3 expects that the WrapperListener.start method always returns. If as you say you are using Method 1, then it should not matter whether or not your main method has blocking code in it. Sorry if I am wrong, but here is my guess. What did you specify for your main class? Method #1 expects that this is always o.t.w.WrapperSimpleApp. The main class of your application is then specified as the first parameter to the helper class's main method. My guess is that you are probably specifying your main class directly. If you are using version 3.1.0 then the wrapper.log should contain a message informing you of this mistake. As a note with the Wrapper you should always test the integration running in a console before you attempt to run it as a service. It is much easier to debug that way as the messages are all in the console. If you are still not able to gt things working then I will need to see your wrapper.conf and a your wrapper.log file containing a single JVM run with the wrapper.debug=true property set. Cheers, Leif Keith wrote: >Hi All, > >Great util, but I’m having a problem getting it set up. I’ve followed the >instructions for integration method1, and launching the myApp.bat file will >launch my App, which acts as a listener on a TCP port. > >Should my application block once this listener thread has been set up? If I >do, I get an error starting the service (after a short while), as it stays >in my main method and never exits. If I remove the infinite loop from the >end, it falls straight through when starting the service, with a “your >service has started then stopped; some services automatically” message from >the OS. > >Any thoughts? Am I missing something that I should be doing to inform the >wrapper that my service is up and running? When I block, the service is >running, but you get the “service did not respond in a timely fashion” error >dialog. Once this happens, it’s no longer running… :-( If I don’t block, it >only lasts for a second. > >Thanks in advance! > >Keith. > > |
|
From: Keith <li...@ke...> - 2004-07-08 09:56:28
|
Spot-on Leif, that was my problem. Thanks also to Randy for his suggestion. Cheers for the help, everything is working great now!! Very useful utility! Keith. -----Original Message----- From: wra...@li... [mailto:wra...@li...]On Behalf Of Leif Mortenson Sent: 08 July 2004 04:24 To: wra...@li... Subject: Re: [Wrapper-user] Should my application block? Keith, Integration Methods 1 and 2 (WrapperSimpleApp and WrapperStartStopApp) both handle the case where the main method does not return correctly. Method #3 expects that the WrapperListener.start method always returns. If as you say you are using Method 1, then it should not matter whether or not your main method has blocking code in it. Sorry if I am wrong, but here is my guess. What did you specify for your main class? Method #1 expects that this is always o.t.w.WrapperSimpleApp. The main class of your application is then specified as the first parameter to the helper class's main method. My guess is that you are probably specifying your main class directly. If you are using version 3.1.0 then the wrapper.log should contain a message informing you of this mistake. As a note with the Wrapper you should always test the integration running in a console before you attempt to run it as a service. It is much easier to debug that way as the messages are all in the console. If you are still not able to gt things working then I will need to see your wrapper.conf and a your wrapper.log file containing a single JVM run with the wrapper.debug=true property set. Cheers, Leif Keith wrote: >Hi All, > >Great util, but I'm having a problem getting it set up. I've followed the >instructions for integration method1, and launching the myApp.bat file will >launch my App, which acts as a listener on a TCP port. > >Should my application block once this listener thread has been set up? If I >do, I get an error starting the service (after a short while), as it stays >in my main method and never exits. If I remove the infinite loop from the >end, it falls straight through when starting the service, with a "your >service has started then stopped; some services automatically" message from >the OS. > >Any thoughts? Am I missing something that I should be doing to inform the >wrapper that my service is up and running? When I block, the service is >running, but you get the "service did not respond in a timely fashion" error >dialog. Once this happens, it's no longer running... :-( If I don't block, it >only lasts for a second. > >Thanks in advance! > >Keith. > > ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ |