|
From: Daniel M. <dan...@be...> - 2006-02-10 13:47:52
|
Leif, > Strange. I assume you are using the console output of the Wrapper. =20 > That output should > be getting sent to stdout in pretty much real time. It shows=20 > up in the console immediately > on all platforms at least. I wonder if there is some kind=20 > of a flush=20 > that needs to be done > that is not needed the way the wrapper is normally used. You=20 > might want to try poking > around in the logger.c file to see if you have any ideas. =20 > The Windows=20 > version makes > use of the WriteConsole function to write to the console if=20 > running as a service and a console is being displayed. Other=20 > cases simply write to stdout. I will take a peek at it today to see if I notice anything obvious... > I'll poke around, but other than flushing ??? Not sure what=20 > it would be. Let me know how your program is running. If=20 > you are running as a service, then you may need to set the=20 > wrapper.ntservice.console property to get a console to capture from. I apologize! I should have mentioned in my first message: I am running in console mode, NOT as a service. Hopefully this will be a clue.=20 Thanks for the tips. The search continues... Daniel Mace Software Engineer, Payroll Integration benefitfocus.com 843-849-7476 x393 > -----Original Message----- > From: wra...@li...=20 > [mailto:wra...@li...] On Behalf=20 > Of Leif Mortenson > Sent: Thursday, February 09, 2006 10:33 PM > To: wra...@li... > Subject: Re: [Wrapper-user] Wrapper stdout redirection in realtime >=20 > Daniel, >=20 > Daniel Mace wrote: > > I have a C#/.NET 2.0 GUI application I use as a front end to a Java=20 > > application I have developed. Traditionally, this Java app=20 > was invoked=20 > > via a DOS batch script which constructed classpaths and=20 > executed the=20 > > Java command directly. Within the GUI application, I was able to=20 > > invoke the batch script and redirect stdout and stderr to=20 > capture the=20 > > Java app's output in realtime and display it to the user.=20 > In order to=20 > > gain more control over the indirectly-invoked Java app, I have=20 > > encapsulated it in the Service Wrapper, to good effect (For=20 > instance,=20 > > I can now capture the pid of the Java/wrapper instance and kill it=20 > > from the C# application). I realize this isn't necessarily=20 > the intent=20 > > of the wrapper, but launch4j can't do all the classpath=20 > stuff I need,=20 > > and I don't have access to an exe4j license. So bear with me... > > =20 > Fine. viva open source. :-) > > My problem is this: since I modified the batch script to invoke the=20 > > wrapper rather than the Java command itself to launch the=20 > application,=20 > > my C# application no longer gets realtime output from stdout/stderr=20 > > when the wrapper is running. The C# code itself hasn't changed; in=20 > > fact, output from the batch script itself gets redirected=20 > properly and=20 > > in realtime as before. It's just the wrapper output which=20 > is funky: it=20 > > doesn't actually get passed back to stdout until it's=20 > completely run=20 > > its course. > > =20 > Strange. I assume you are using the console output of the Wrapper. =20 > That output should > be getting sent to stdout in pretty much real time. It shows=20 > up in the console immediately > on all platforms at least. I wonder if there is some kind=20 > of a flush=20 > that needs to be done > that is not needed the way the wrapper is normally used. You=20 > might want to try poking > around in the logger.c file to see if you have any ideas. =20 > The Windows=20 > version makes > use of the WriteConsole function to write to the console if=20 > running as a service and a console is being displayed. Other=20 > cases simply write to stdout. > > Any ideas what could be causing this? Obviously it's redirecting=20 > > somewhat properly, because I do eventually get the stdout stream...=20 > > but not until the end of the wrapper execution. I searched and=20 > > couldn't find any configuration properties related to=20 > output redirection. > > =20 > I'll poke around, but other than flushing ??? Not sure what=20 > it would be. Let me know how your program is running. If=20 > you are running as a service, then you may need to set the=20 > wrapper.ntservice.console property to get a console to capture from. >=20 > Cheers, > Leif > > Heeeelllp! :) > > > > Daniel Mace > > Software Engineer, Payroll Integration benefitfocus.com > > 843-849-7476 x393 > > > > > >=20 > ************************************************************** > ************************** > > BENEFITFOCUS.COM CONFIDENTIALITY NOTICE: This electronic=20 > message is intended only for the individual or entity to=20 > which it is addressed and may contain information that is=20 > confidential and protected by law. Unauthorized review, use,=20 > disclosure, or dissemination of this communication or its=20 > contents in any way is prohibited and may be unlawful. If you=20 > are not the intended recipient or a person responsible for=20 > delivering this message to an intended recipient, please=20 > notify the original sender immediately by e-mail or=20 > telephone, return the original message to the original sender=20 > or to bfp...@be..., and destroy all copies=20 > or derivations of the original message. Thank you. =20 > (BFeComNote Rev. 08/01/2005) > >=20 > ************************************************************** > ************************* > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. Do you grep=20 > through log files > > for problems? Stop! Download the new AJAX search engine that makes > > searching your log files as easy as surfing the web. =20 > DOWNLOAD SPLUNK! > > = http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=103432&bid#0486&dat=121642 > > _______________________________________________ > > Wrapper-user mailing list > > Wra...@li... > > https://lists.sourceforge.net/lists/listinfo/wrapper-user > > > > =20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep=20 > through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. =20 > DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486& dat=3D121642 > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user >=20 *************************************************************************= *************** BENEFITFOCUS.COM CONFIDENTIALITY NOTICE: This electronic message is = intended only for the individual or entity to which it is addressed and = may contain information that is confidential and protected by law. = Unauthorized review, use, disclosure, or dissemination of this = communication or its contents in any way is prohibited and may be = unlawful. If you are not the intended recipient or a person responsible = for delivering this message to an intended recipient, please notify the = original sender immediately by e-mail or telephone, return the original = message to the original sender or to bfp...@be..., and = destroy all copies or derivations of the original message. Thank you. = (BFeComNote Rev. 08/01/2005) *************************************************************************= ************** |