Comments (5)
Solution proposed -> see pull request.
Don't know if it is the way you wanted to solve this as I changed the mode java to mode jvm.
So open questions are
- I don't know the reason why java mode was choosen instead of jvm (may be you had a good reason, and may be you prefer to make it configurable -> but will requires to update documentation)
- I don't know if the list of path to jvm.dll is complete -> see findJvmDll(), and don't know if returnon "auto" is a good idea.
But I tested on my windows 7, 64 bits, and it works as expected.
Let me know if you have any remarks.
from capsule-daemon.
The main reason for java
was to allow running the application as a service under an account without the LogonAsService
privilege. Thanks for the PR, an alternative I was thinking about was to simply fix the documentation to state that start/stop methods don't apply to Windows.
What is your use case for start/stop methods under Windows?
from capsule-daemon.
My use case is : run an Apache Camel based application as a windows service.
So I have a start method to launch Camel, and another one to stop it.
- Using the
java
way requires to developIPC
(inter process communication) as themain
method is called to start and stop the process. It means, oneJVM
is launched to start the application,and anotherJVM
is launched to handle the stop request. We need anIPC
between both of them to notify the first one to shutdown. - Using the
jvm
way, it starts only oneJVM
it means start and stop will executes under the same context, and may use same object instances. It is more easyier in my use case.
But you are true, it breaks the feature LogonAsService
. To provide both features (start/stop method
and LogonAsService
, the mode
should became configurable and the doc should be updated. But should be easy to do :)
from capsule-daemon.
Regarding the the feature LogonAsService
,
There are 2 options available in procrun
--User
: enables running applications as a service under an account without the LogonAsService privilege--ServiceUser
the name of the account under which the service should run
Note : I see both of them are currently available in the capsule daemon.
If we choose for mode JVM, I guess the jvm will run under the user specified in ServiceUser
and then having the same feature.
Do you have any specific use case where an application should be run in Java
mode instead of in JVM
mode ?
from capsule-daemon.
No specific use case (yet) but I'd avoid dropping --User
without understanding the consequences, which I don't really understand; also, I can't test on a Windows system right now. Is the matter any clearer to you and do you have a chance of testing your PR with --ServiceUser
with an account lacking the LogonAsService
privilege?
I still think the best solution would be to add a mode
option as you suggested though.
from capsule-daemon.
Related Issues (12)
- Only `Application-Class` capsules are supported HOT 2
- Application-Script Daemon Capsule HOT 6
- Fails to run under Capsule 1.0.1 under OS/X HOT 2
- Add an option to stop the daemon HOT 1
- Occasional service start failure on Windows 10 64-bit
- IllegalAccessError HOT 3
- Documentation of manifest entries
- CentOS 6.7 (and possibly others) incompatibility of the `jsvc` binary shipped with `capsule-daemon` HOT 11
- How the tool should behaves ? HOT 6
- Allow system properties to be specified in the manifest HOT 3
- Add Daemon-User as a system property HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capsule-daemon.