Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am working on custom monitoring system to my server.
the application is developed using python and Django.
The server is running java web applications and I need to monitor the JVM under which the application server is running, so I start the applications with enable the JMX.
Now I need to connect my python application to the JVM JMX agent.
Is there any way to get that?
I have read about the HtmlAdapterServer, that enable managing JMX MBeans from specific url but I do not know how can I use it?
Thanks in advance and best regards
How about using Jython ? http://www.jython.org/
There is a reference implementation of a WebServices based JMXServer you can deploy on your server. Based on the docs, it is possible to use VB Scripting to invoke JMX operations, so I would assume you could use Python too.
Update:
Jolokia provides an HTTP/REST API to access JMX MBeanServers. This should be easily invoked by a python client.
Jpype is another option. Start jvm and code java to retrieve glassfish monitoring data. http://jpype.sourceforge.net/
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am relatively new to Java and have developed a Java server application that receives small pieces of mass data in a proprietary protocol via TCP from many clients on the internet, sends it to a Postgres database (JDBC) and communicates with other modules using sockets, too.
So far I am using Java NIO for socket I/O and slf4j/logback for logging, apart from that only standard Java stuff.
Now I need to implement the administration stuff that every professional server application needs, e.g. switching logging on and off with fine granularity, make the server reread its configuration, shut the server down cleanly, reset client connections, get usage statistics, etc.
So I'll need to implement some administration interface using Sockets and design some communications protocol, etc. or something like that.
This is such a common task in creation of server apps that I thing someone must have had the idea before to create libraries for this.
Are there any common frameworks for such tasks either in the Java Standard Libraries or from other sources that you can recommend?
The library must be able to run on Linux and Mac OS X and must be Open Source, license preferrably BSD-style or similar.
Bye, Matthias
Maybe you can use JMX and JConsole to do it. Expose your server components as MBeans and grant write access.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I have a web app developing and I want to host it via any commercial hosting company however my app is using Java code that works on background and Rails code for user interaction. What do you think about the hosting company that provides such a infrastructure for such a architecture? Is there any that you would suggest?
This is possible on any server that you are in control of (dedicated server, VPS, EC2, etc.). I am not sure of any shared hosting solution that allows this. Your solution really depends on the traffic you are expecting.
The following are examples of servers in "the cloud"
http://www.linode.com/
http://amazonaws.com
http://rackspace.com
You can get a server from most hosting companies. It will either be advertised as a dedicated server (a physical machine) or a VPS (Virtual Private Server)
In the past I often used Heroku (http://www.heroku.com/) for Ruby on Rails projects. One web process is free and the deployment is really easy.
They also have support for Java background processes (http://devcenter.heroku.com/articles/run-non-web-java-processes-on-heroku)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
we are developing an simulator application where user can create simulation and run the logic. now in second phase of our project we required hardware triggering using web based application . i required some information on how i am going to interact with PLC machine using my java code we are using modbus serial communication but can be changed if you have some other better solution. as par my research we have seen OPC server but i didn't get anything from that. i want some one can help me to understand what will be flow. how to proceed with this. do i have to write driver for communicating with my application and PLC.
What need to be done complete approach this task. if you have any link please share
thank you
I don't know if this is helpful for you, but we have a java library (LGPL 3.0) which talks natively via TCP/IP with S7 devices.
have a look at http://openscada.org
we also have a OPC interface which is written in plain JAVA, no Windows required.
I use this.
http://www.modbusdriver.com/shop/index.php?cPath=0_42
It is cheap, and the examples and support are good. Their support is out of Australia, though, so you will either be answered at 6:00 at night or while you're asleep.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I have a requirement to do a web based interactive application in which server could push data in to the clients(web browser , android phone or JME phone). I have suggested to use Websockets rather than reverse ajax. Is there any nice framework for java to implement websockets. Please suggest.
The following very similar sounding Java servers / frameworks have web socket support:
Jetty
Netty
Note that web sockets aren't universally supported as a result of security issues (and because Microsoft doesn't want to).
You could also consider looking at some of the JMS providers that provide JMS to web sockets e.g. HornetQ and ActiveMQ using Stomp.
No need, Java has it's own very intuitive socket library.
api: http://download.oracle.com/javase/1.4.2/docs/api/java/net/Socket.html
tutorial: http://download.oracle.com/javase/tutorial/networking/sockets/
Grizzly also has websockets support for what it's worth. But one reason to use websockets rather than java.net.Socket is that websockets can traverse firewalls and proxies transparently without having to reconfigure network ports/policies.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am looking for a library that will allow me to look up the status of a windows service to verify that the service is started and running. I looked into the Sigar library, but it is GPL and therefor I cannot use it. A Commercial or BSD(ish) license is required as this will be bundled into commercial software.
If nothing else helps, try to think of a slightly different approach (if you can, of course), e.g.:
There is a plenty of free/non-free software which does monitoring, including Windows service monitoring (e.g. nagios, Zabbix, etc.). These monitors typically have open API where your Java app could integrate into in a number of different ways.
If you have the control over depending service application, expose another, different way for your Java application to check (e.g. run a dummy listener on a port, create a file, etc.). Windows services aren't a cross-platform thing therefore is not something you would expect to be supported anytime soon.
I don't think there is any pure-Java way to do this because some operating systems don't have the notion of "services" like Windows does. In our projects, we wrote a wrapper around calls to the "sc" command from the command line. To get the status of a service, you can do:
sc \\some-computer query "my service name"
You'll have to manually parse the output but it's pretty straightforward.
I don't know of any libraries, but depending on how detailed you need to get you might get by with some shell commands and parsing the output.
NET START servicename
will either start the service, or give you back an error message that tells you its already started. I don't know of any command that will just give you the status though.