Is it possible to run a Spring Boot REST API service on top of Node.js instead of Tomcat,
or if not Node.js which are the other possible servers on which we can run our Spring Boot REST Application.
Please help me figure it out.
NodeJs is a server to run Javascript code. It can not run a Java web application, which needs a JVM (Java Virtual Machine) to be run into a JVM. Before you ask, no, NodeJS can not run a JVM. Is is just not made for that. To understand what I mean, it's like wanting a car to run with a outboard engine... Definitly not possible.
So NO, you can't run your Spring Boot REST Application on the top of NodeJs server.
If you don't want to use a Tomcat, then there is other options for you:
https://blog.idrsolutions.com/2015/04/top-10-open-source-java-and-javaee-application-servers/
Related
Some years ago we deployed several OSGi-based Spring Integration (SI) applications in Virgo. However, apparently SI has moved away from OSGi. So, in absence of Virgo container, what is best way to run an SI app in production now? Say, a simple app that monitors a file system location & loads file data into Oracle? Is it just java -jar?
Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". You can run a small production applications on it, you can consider using Spring Cloud then.
If you are looking for a container then think about SpringSource Tc Server - based on Pivotal Tc Server (an enterprise version of Apache Tomcat) as a platform. This is the drop-in replacement for Apache Tomcat that's optimized for Spring.
I am going to write a J2EE application and application will be deployed in Tomcat.
The requirement is that the server and the application must send snmp trap to external NMS.
The details of my application is
J2EE application
Deployed in Tomcat v7
The Server is Redhat Linux 6.2
We need to send trap for all the above 3 (For the application, Tomcat and the linux server).
Can we write our own agent using snmp4j for the above requirement and how will snmp agent know when to send trap to NMS?
Thanks in advance for support.
Yes you can for that you need to extend the logger framework. For Instance you can use logback framework. where you can extend the logging with CustomAppender where you can write snmp-agent code and forward the log as an trap. Moreoever logback has nice and easy way to format, deny log if not necessary other other feature. And you can change the tomcat logging to logback is simple steps. However I'm not sure if you can really send a trap for any issues on linux server. I believe it would be a tedious task. You might look for some syslog server monitoring feature.
grails run-app will start my app in an embedded tomcat server.
I would like to configure this embedded server so that only a single request processor thread is available and that multiple threads are processed serially rather than concurrently (similar to default webrick behaviour in the rails world)
Is it possible? If so, how do I do it?
As far as I know, this is not directly supported by the Tomcat plugin. But you could easily modify the Tomcat plug-in and run your own version.
If you look at the class org.grails.tomcat.TomcatServer, you will see it starts a Tomcat instance.
Here is the doc for this class: http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/startup/Tomcat.html
There is a getConnector() method which will return the default HTTP connector. Once you have it, you can probably change the settings, like maxThreads.
But be careful the performance will be awful. But I guess you already know that.
I need to make an application that runs as a server that accepts connections from various clients and responds to their requests (via proprietary protocol). This server also needs a GUI for configuration and monitoring. I (of course) need to run the server as a service, and the GUI has to be available only at certain moments. Since the server service and GUI share some of the hardware resources and part of the configuration they would run on the same machine. I would like that the GUI and the whole long running service are one process that will run in the background; the GUI would than be invoked (shown) only when needed.
My question is: can this be done with a JavaFX 2 GUI and how?
Thanks in advance
Josip
So you need Monitoring and Management in a Java application? You should be using the Java Management Extensions (JMX) Technology. http://docs.oracle.com/javase/6/docs/technotes/guides/management/overview.html
And if you decide that you can't just use a standard JMX client or create a plugin then you create your JavaFX application as a JMX client.
Does anyone know a way to have a JavaScript file or set of files always running under IISNode without the need for a client request? The idea would be to have scripts that behave as services, but have them running under IISNode.
Thanks!
csh3
How about trying node-windows, it allows Node.js applications to run as a windows service. A nice feature is that it also exposes a way to write to the EventLog.
It probably fits your scenario better considering that you need any of the IIS features other than the long running aspect of it.
Hope this points you in more applicable direction.
I guess you have some reason to use iisnode, but you are trying to run a service in iis which is not a good idea, if you want to run as service then run as service. how?
if you still insist to use iisnode then options are
use Application Initialization for IIS
Or write a scheduled job that pings your iisnode page
Or use pingdom like service to ping your iisnode application.