|
From: Earnie D. <ed...@vr...> - 2003-09-26 13:59:13
|
You should be able to start your application when the user logs on by adding it to the users startup folder in windows. You should be able to identify the user via the system properties. Should work the way you want it to. Earnie! -----Original Message----- From: ender wiggin [mailto:end...@ya...] Sent: Friday, September 26, 2003 9:51 AM To: wra...@li... Subject: Re: [Wrapper-user] Sockets and desktop Hi. Thanks for the replay.I wonder if you could point me in the right direction.Quoting: "You are going to need to have an > application running in the User space > which is launched when the user logs in. This > component could then communicate to > the service using any of a number of methods" It would be very nice to write an small program that gets launched AUTOMATICALLY at user logon.(then this application will communicate with the service that collects messages and tell it to print the messages to screen to screen)Is there a way(In Java)? Alex --- Leif Mortenson <le...@ta...> wrote: > Alex, > I am not sure that your assumption about not > being able to use Sockets > and a GUI in the same service is correct. The > TestWrapper example > that is shipped with version 3.0.5 of the Wrapper > does both and works > just fine. > > Edit wrapper.conf and set the following > wrapper.ntservice.interactive=true > at the bottom of the file. Then install the > TestWrapper as a service > and start > it. > InstallTestWrapper-NT.bat > net start testwrapper > > Now telnet to the machine on port 9999. When it > connects, type 'R' > Must > be upper case. The Wrapper will promptly restart > the JVM.. All works fine > both using localhost and from a remote machine. > > The problems you are having with your users is a > little more > difficult. Unless you > specify an account in the wrapper.conf file, NT > services will by default > always run > as the SYSTEM user. This is also true for their > child processes (Java > in this case) > So no matter how many times you check, your user is > always going to be > SYSTEM. You are going to need to have an > application running in the > User space > which is launched when the user logs in. This > component could then > communicate to > the service using any of a number of methods. > > There is not any way that I am aware of for an > NT service to tell > when a user logs > in to the system. It sounds like it should be > possible, but not with > the current Wrapper. > > Telling when the user logs out is easy. Windows > sends a logout > signal to all processes > when any user logs out. The Wrapper intercepts this > and prevents the > Wrapper and its > JVM from exiting. The WrapperSimpleApp and > WrapperStartStopApp classes > do not > provide a way for your java app to see this signal, > but you can see it > if you use method > 3, by implementing the WrapperListener interface > directly. The > listener's controlEvent > method is called whenever any system signals are > received. This gives > the app the > opportunity to respond. > > I posted a couple of feature requests around > this so I remember to > look into ways > of making it possible to tell when and who logs in. > http://sourceforge.net/tracker/index.php?func=detail&aid=812174&group_id=394 28&atid=425190 > http://sourceforge.net/tracker/index.php?func=detail&aid=812175&group_id=394 28&atid=425190 > > Cheers, > Leif > > > > ender wiggin wrote: > > >Hello. > > > >First some details: > >I am working on a project involving an instant one > way > >messaging on windows. Basically I am writing a > >service(SocketService) that connects with a server > >through a socket and writes to file/(some > repository) > >the messages it receives. Another service( > >DesktopMessageService) reads from the files the > >messages and if it finds a new message for the > CURRENT > >user it will open a frame and show it on the > screen. > >The reason I use two services instead of one is > >because I read that a service either does neworking > or > >it accesses the desktop or console. > > The SocketService performs well, it does indeed > read > >from a socket(ServerSocket) and when contacted > there > >are messages it does store them on file. > > > >The problems arise with the DesktopMessageService.I > >have yet to find a way to detect the current > >user.Basically when the pc is booted the > >DesktopMesssage starts ,tries to detect the current > >user and print to screen a message.The problem is > that > > > >I cannot decect when a user loggs on to the > machine. > >The current user for the DesktopService is still > >System.So if I want to print a message Hi + > >System.getProperty("user.name") , even if there is > a > >user logged on it still prints Hi System , not Hi > >"Current User Name".Im also tried to restart the > JVm > >periodically but the curent user is still System. > >By the way the service works fine when tested in a > >console . > > > >So my questions are, Is there a way to detect when > a > >user loggs on and get his name? > >Also, is there a way to detect when a users logs > off? > > > >Thanks, Alex > > > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user ===== __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user **************************************************************************** NOTICE: This email (including any attachments) may include confidential information. It is intended solely for the individuals or entities to which it is addressed. If you have received this email in error, distribution or use of it is prohibited. Please notify the sender and permanently delete it from your email system. Also, given the nature of electronic mail and its potential to carry computer viruses, the Virginia Retirement System and the sender in no way warrant a virus free transmission. You and your organization should use appropriate means to check this email and any attachments for potential viruses and to prevent their execution. |
|
From: ender w. <end...@ya...> - 2003-09-29 20:51:43
|
In short: I wrote a java program that listens to a Server Socket and when receives a message on the socket it prints it on the screen in a Frame. The program works fine when I test it in the Wrapper console. Next, I tried adding a shortcut of the .bat file frok the bin dir to the my startup folder. When I log on the wrapper console appears, and it says: ////////////////////////////////////////// wrapper | --> Wrapper Started as Console wrapper | Launching a JVM... jvm 1 | Wrapper (Version 3.0.5) jvm 1 | //////////////////////////////////////// but my program does not start. If I look at the log I actually see that there is no entry for the current time, ie for the user logon time. Basically I would like to know if I am using the wrapper improperly, and if I am, how do I make my program start automatically short of making an exe and placing it in the startup? --- Earnie Dyke <ed...@vr...> wrote: > You should be able to start your application when > the user logs on by adding > it to the users startup folder in windows. You > should be able to identify > the user via the system properties. Should work the > way you want it to. > > Earnie! > > -----Original Message----- > From: ender wiggin [mailto:end...@ya...] > Sent: Friday, September 26, 2003 9:51 AM > To: wra...@li... > Subject: Re: [Wrapper-user] Sockets and desktop > > > Hi. > > Thanks for the replay.I wonder if you could point me > in the right direction.Quoting: > "You are going to need to have an > > application running in the User space > > which is launched when the user logs in. This > > component could then communicate to > > the service using any of a number of methods" > It would be very nice to write an small program > that > gets launched AUTOMATICALLY at user logon.(then this > application will communicate with the service that > collects messages and tell it to print the messages > to > screen to screen)Is there a way(In Java)? > > Alex > > > > --- Leif Mortenson <le...@ta...> wrote: > > Alex, > > I am not sure that your assumption about not > > being able to use Sockets > > and a GUI in the same service is correct. The > > TestWrapper example > > that is shipped with version 3.0.5 of the Wrapper > > does both and works > > just fine. > > > > Edit wrapper.conf and set the following > > wrapper.ntservice.interactive=true > > at the bottom of the file. Then install the > > TestWrapper as a service > > and start > > it. > > InstallTestWrapper-NT.bat > > net start testwrapper > > > > Now telnet to the machine on port 9999. When > it > > connects, type 'R' > > Must > > be upper case. The Wrapper will promptly restart > > the JVM.. All works fine > > both using localhost and from a remote machine. > > > > The problems you are having with your users is > a > > little more > > difficult. Unless you > > specify an account in the wrapper.conf file, NT > > services will by default > > always run > > as the SYSTEM user. This is also true for their > > child processes (Java > > in this case) > > So no matter how many times you check, your user > is > > always going to be > > SYSTEM. You are going to need to have an > > application running in the > > User space > > which is launched when the user logs in. This > > component could then > > communicate to > > the service using any of a number of methods. > > > > There is not any way that I am aware of for an > > NT service to tell > > when a user logs > > in to the system. It sounds like it should be > > possible, but not with > > the current Wrapper. > > > > Telling when the user logs out is easy. > Windows > > sends a logout > > signal to all processes > > when any user logs out. The Wrapper intercepts > this > > and prevents the > > Wrapper and its > > JVM from exiting. The WrapperSimpleApp and > > WrapperStartStopApp classes > > do not > > provide a way for your java app to see this > signal, > > but you can see it > > if you use method > > 3, by implementing the WrapperListener interface > > directly. The > > listener's controlEvent > > method is called whenever any system signals are > > received. This gives > > the app the > > opportunity to respond. > > > > I posted a couple of feature requests around > > this so I remember to > > look into ways > > of making it possible to tell when and who logs > in. > > > http://sourceforge.net/tracker/index.php?func=detail&aid=812174&group_id=394 > 28&atid=425190 > > > http://sourceforge.net/tracker/index.php?func=detail&aid=812175&group_id=394 > 28&atid=425190 > > > > Cheers, > > Leif > > > > > > > > ender wiggin wrote: > > > > >Hello. > > > > > >First some details: > > >I am working on a project involving an instant > one > > way > > >messaging on windows. Basically I am writing a > > >service(SocketService) that connects with a > server > > >through a socket and writes to file/(some > > repository) > > >the messages it receives. Another service( > > >DesktopMessageService) reads from the files the > > >messages and if it finds a new message for the > > CURRENT > > >user it will open a frame and show it on the > > screen. > > >The reason I use two services instead of one is > > >because I read that a service either does > neworking > > or > > >it accesses the desktop or console. > > > The SocketService performs well, it does indeed > > read > > >from a socket(ServerSocket) and when contacted > > there > > >are messages it does store them on file. > > > > > >The problems arise with the > DesktopMessageService.I > > >have yet to find a way to detect the current > > >user.Basically when the pc is booted the > > >DesktopMesssage starts ,tries to detect the > current > > >user and print to screen a message.The problem is > > that > > > > > >I cannot decect when a user loggs on to the > > machine. > > >The current user for the DesktopService is still > > >System.So if I want to print a message Hi + > > >System.getProperty("user.name") , even if there > is > > a > > >user logged on it still prints Hi System , not Hi > > >"Current User Name".Im also tried to restart the > > JVm > > >periodically but the curent user is still System. > > >By the way the service works fine when tested in > a > > >console . > > > > > >So my questions are, Is there a way to detect > when > > a > > >user loggs on and get his name? > > >Also, is there a way to detect when a users logs > > off? > > > > > >Thanks, Alex > > > > > > > > > > > > > > > > > === message truncated === ===== __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |
|
From: Leif M. <le...@ta...> - 2003-10-07 05:49:26
|
Ender,
Sorry for the slow response. Could you please post your
wrapper.conf file?
I will also need to see some debug output. Please set the following
property:
wrapper.debug=true
Then rerun your application. Post the wrapper.log file that you get.
You may also want to try pressing CTRL-BREAK and see what your program
threads are doing.
By the way, this looks like a new post, unrelated to the one you replied
to. It
is easier for me to track and respond to issues promptly if you start a
new thread
for new subjects. :-)
Cheers,
Leif
ender wiggin wrote:
>In short:
>I wrote a java program that listens to a Server Socket
>and when receives a message on the socket
>it prints it on the screen in a Frame.
>The program works fine when I test it in the Wrapper
>console.
>
>Next, I tried adding a shortcut of the .bat file
>frok the bin dir to the my startup folder.
>When I log on the wrapper console appears, and it
>says:
>//////////////////////////////////////////
>wrapper | --> Wrapper Started as Console
>wrapper | Launching a JVM...
>jvm 1 | Wrapper (Version 3.0.5)
>jvm 1 |
>////////////////////////////////////////
>
>but my program does not start.
>If I look at the log I actually see that there is no
>entry for the current time, ie for the user logon
>time.
>
>Basically I would like to know if I am using the
>wrapper improperly, and if I am, how do I make my
>program start automatically short of making an exe and
>placing it in the startup?
>
>
|
|
From: Andre H. <nas...@ya...> - 2003-10-10 13:33:08
|
Hi guys, I was just wondering if it's possible to install this wrapper on Windows 95/98? Or will it only work with NT/2000/XP? Any info would be helpful Thanks! Andre __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |
|
From: Leif M. <le...@ta...> - 2003-10-10 14:25:24
|
Andre, I have heard that some users are able to use it under Windows 98. Not sure about Windows 95 though. You will not be able to install as a service of course. But the ability to run in console mode should work fine. Give the batch files that come with the Wrapper a try. But if they do not work, try launching the Wrapper manually with the following command Wrapper.exe -c ..\conf\wrapper.conf Please post back with your results as I am sure there will be others out there with the same question. Cheers, Leif Andre Harry wrote: >Hi guys, > >I was just wondering if it's possible to install this >wrapper on Windows 95/98? > >Or will it only work with NT/2000/XP? > >Any info would be helpful > >Thanks! >Andre > > |
|
From: Andre H. <nas...@ya...> - 2003-10-13 16:02:07
|
Hi Leif,
Thanks alot for the info. I have a problem tho
STATUS | wrapper | 2003/10/13 16:37:25 | Launching a
JVM...
INFO | jvm 1 | 2003/10/13 16:37:25 |
WrapperSimpleApp Usage:
INFO | jvm 1 | 2003/10/13 16:37:25 | java
org.tanukisoftware.wrapper.WrapperSimpleApp
{app_class} [app_parameters]
INFO | jvm 1 | 2003/10/13 16:37:25 |
INFO | jvm 1 | 2003/10/13 16:37:25 | Where:
INFO | jvm 1 | 2003/10/13 16:37:25 | app_class:
The fully qualified class name of the application
to run.
INFO | jvm 1 | 2003/10/13 16:37:25 |
app_parameters: The parameters that would normally be
passed to the
INFO | jvm 1 | 2003/10/13 16:37:26 |
application.
STATUS | wrapper | 2003/10/13 16:37:28 | <-- Wrapper
Stopped
This is taken from the log file.
this is the conf file
wrapper.java.command=C:/Program
Files/Java/j2re1.4.1_01/bin/java
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=C:/java/TEST/audatex
#wrapper.app.parameter.1=Scanner --> this is the main
java class of my program
wrapper.ntservice.name=Mot4FTP
wrapper.ntservice.displayname=Mot4 FTP
wrapper.ntservice.description=To FTP export files to
M4
im totally lost
help...
Thanks
Andre
--- Leif Mortenson <le...@ta...> wrote:
> Andre,
> I have heard that some users are able to use it
> under Windows 98. Not sure
> about Windows 95 though. You will not be able to
> install as a service of
> course. But the ability to run in console mode
> should work fine.
>
> Give the batch files that come with the Wrapper a
> try. But if they do not
> work, try launching the Wrapper manually with the
> following command
>
> Wrapper.exe -c ..\conf\wrapper.conf
>
> Please post back with your results as I am sure
> there will be others out
> there with the same question.
>
> Cheers,
> Leif
>
>
> Andre Harry wrote:
>
> >Hi guys,
> >
> >I was just wondering if it's possible to install
> this
> >wrapper on Windows 95/98?
> >
> >Or will it only work with NT/2000/XP?
> >
> >Any info would be helpful
> >
> >Thanks!
> >Andre
> >
> >
>
>
>
>
>
-------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback
> Program.
> SourceForge.net hosts over 70,000 Open Source
> Projects.
> See the people who have HELPED US provide better
> services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
>
https://lists.sourceforge.net/lists/listinfo/wrapper-user
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
|