I am using tomcat as webserver. Planning to use active mq for messaging purpose. Just started learning about jms and activeMQ.
Gone thru https://activemq.apache.org/getting-started.html. What i have got is active mq comes with its own web
server(probably apache IS not sure). My question is what if I want to use existing tomcat server instead of installing
new server for active mq. Is it possible?
UPDATE: i think i can itegrate existing tomcat with https://activemq.apache.org/tomcat.html
Yes Apache ActiveMQ is a light-weight broker, so you can deploy it in Apache Tomcat as a WAR file. Or try Apache TomEE which comes out of the box with AcitveMQ.
http://tomee.apache.org/apache-tomee.html
If you deploy ActiveMQ as a WAR file then it does not come with its own web service, its only the standalone distribution of ActiveMQ that comes with Jetty as its web server. You just don't need to include Jetty in your WAR file with ActiveMQ embedded.
At Apache Camel we have an example of a WAR file with ActiveMQ and Camel as a WAR file you can deploy in Tomcat. You can take a look, and just remove Camel from the example:
http://camel.apache.org/activemq-camel-tomcat.html
See these:
http://blog.octera.info/2011/06/how-to-embed-activemq-in-tomcat/
http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html
Basically, you just start a broker in your web application. If you need to retrieve some resource like ConnectionFactory or Destination(Queue/Topic), you can use Tomcat JNDI support to do this.
Related
i'm using Wildfly to deploy an EJB war that use an external messaging broker Apollo not the the one that come with wildfly ActiveMQ artemis.
What i must to do setup a JNDI configuration in standalone-full.xml file but there isn't any helpful tutorial to do this i don't know what exactly i need to change in the configuration to make this happen?
Is this post any help?
https://docs.jboss.org/author/display/WFLY10/Connect+a+pooled-connection-factory+to+a+Remote+Artemis+Server
I was able to use an external artermis broker (not the Wildfly container) following the above example.
i have a multiple domains on my centos vps (domains running on apache http server via virtual host configurations). and also same vps, i want to add my new domain but that domain will route my spring boot application (application is a jar file also inside embedded tomcat ). i couldn't find any configuration for embedded tomcat specific domains and ports.
standalone Tomcat i can make configuration via server.xml file like this image
also this short tutorial shows configuration for stadalone tomcat Tomcat Virtual Host Configuration
But how can i do that configuration for embedded Tomcat ? Any suggestion ?
With Spring Boot embedded Tomcat, you are hosting only one application per servlet container. So I don't believe that Tomcat's concept of Virtual Hosts make sense at all.
If you have to host your app on shared Tomcat instance, just build WAR without embedded container.
It depends. 2 ways to deploy your project.jar as you want to :
First way : You can use the "apache web server" and his own "mod_proxy" in order to serve as many Spring webapps you want to, each on a specific port configured with "php-fpm" and with a proxy defined to route requests from/to your namebased VirtualHost configuration.
Nowadays, with Spring Boot 2.5, all you have to do is to set the property server.port in your application.properties file, and use it accordingly with mod_proxy directives.
If you are using profile, you can either set one port to dev or prod or test or whatever properties file you need.
Another way to proceed : you can use the apache web server "mod_jk" bridge module to configure multiple load-balancers for your Virtualhosts too.
Choose your path, young Jedi ;)
This response is certainly not for the OP, 7 years later, but for other people whom are using any web search engine like Google. They will come here and see "something is impossible". It is not true.
I have deployed my camel integration projects (WAR) on a JBoss Wildfly application server.
I was wondering if there is a way to see what endpoints are available and what the URL's are?
In a similiar way as i can log into the administration console under Wildfly and select web services to get an overview of what is deployed?
Thanks in advance for your help.
Yes, if you have JMX enabled on your camel context, then you can view a list of endpoints via jconsole, as you can see from:
JMX is on by default according to the camel site but if you've somehow disabled it, adding:
<jmxAgent id="agent" disabled="false"/>
to your <camelContext> element should be enough to re-enable it.
There is also hawtio which is a web console to manage Java stuff, and it has plugins for Apache Camel, JBoss, and others too.
You could then install hawtio in wildfly, and then see your Camel routes / endpoints and whatnot
http://hawt.io/
I have an application tomcat + apache + mod_jk + spring mvc deployed on remote server. After making request to the controller I am having jsp source code in the response. It is not related with spring config cause locally it is working. After debugging mod_jk I see that tomcat returns jsp source.
I think the problem is related with remote tomcat or apache (cause it was configured by our it department). Is it possible to dissalow jsp execution on tomcat or apache (maybe httpd conf)? Plese suggest how can resolve this problem.
Apache Web Server does not execute JSPs, so you're probably getting your JSP from there.
Normally, static files are deployed on Apache Web Server, and dynamic files (JSPs, Custom Tags, classes, etc.) are deployed on Apache Tomcat (where Apache Web server redirects the corresponding requests). Check if your app is deployed this way.
Try to send an HTTP request directly to the Apache Tomcat (without intervention of Apache Web Server, and see what happens)
The reason was that jsp compiler was disabled see org.apache.jasper.servlet.JspServlet, in the tomcat\conf\web.xml. It-team says that it is recommend option for production)
I'm currently switching from Glassfish to WildFly-8.0.0.Final application server, and my MQ / JMS browser does not support the built-in HornetQ (2.4.0.Final) implementation.
After changing to JMSBrowser 2.6 (which should support HornetQ), I was unable to connect to my running WildFly instance. I presume, I need a little more configuration within the application server to make it work
Can someone supply a working wildfly standalone.xml or standalone-full.xml configuration, that has an enabled remote jmx which can be accessed by QBrowsers?