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?
Related
I'm using Arquillian to deploy a Java EE WAR on Payara embedded for functional testing with Graphene. Everything works fine.
However, I'd like to know whether it's possible to test user authentication for #RolesAllowed protected RESTful methods. Afaik there's no way around creating users on the Java EE server and in GlassFish and Payara that's done in the web admin UI:
I didn't find anything about a Payara RESTful or similar API for Payara admin tasks.
There seems to be nothing created on the filesystem by the drone driver so that there's no access to the asadmin command.
According to sudo netstat -tupln | grep java the Payara embedded process only opens port 8181 (HTTP) and 8182 (can't be opened in browser).
My question is similar to How to test login with Arquillian - Java EE 7 whose answer doesn't work because CommandRunner isn't injected and a comment says the interface has changed - whatever that means.
The approach in Embedded Glassfish, security and Arquillian questions doesn't work because it's unclear which Server class is used and none of the available ones match all method names (I tried all that pop up in NetBeans autocompletion).
I'm aware of the possbility to replace the embedded with a remote instance, but that's not part of the question.
I'm using Payara 4.1.2.174.
The preferred way to configure the embedded GlassFish/Payara is to configure a standalone Payara Server instance interactivey first (using Admin console or asadmin commands), copy the configuration from the domain (domain1) into test resources and then point the Arquillian container to the configuration.
The documentation of the Arquillian GlassFish embedded container describes that you can use the property instanceRoot to point to the whole domain directory or configurationXml to just point to the domain.xml in that directory.
In fact, the answer in your last link (https://stackoverflow.com/a/24967309/784594) explains precisely this scenarios and provides a ste-by-step guide. You shouldn't be using any Server class to configure the server, you can skip that step - if you secure your REST endpoint using basic HTTP authentication, you just need to send user and password in request headers.
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 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.
What is the Difference between standalone.xml and standalone-full.xml. In what scenarios we use standalone-full.xml
standalone.xml: Support of Java EE Web-Profile plus some extensions like RESTFul Web Services and support for EJB3 remote invocations
standalone-full.xml: Support of Java EE Full-Profile and all server capabilities without clustering
standalone-ha.xml: Default profile with clustering capabilities
standalone-full-ha.xml: Full profile with clustering capabilities
Answer taken from: The Differences Between JBoss EAP 5 and EAP 6
From RHELSM (https://access.redhat.com/solutions/1136103)
standalone.xml: This is the default configuration file for a standalone server. It contains all information about the standalone server, including subsystems, networking, deployments, socket bindings, and other configurable details. This configuration is used automatically when you start your standalone server.
standalone-full.xml: This is an example configuration for a standalone server. It includes support for every possible subsystem except for those required for high availability.
standalone-ha.xml: This example configuration file enables all of the default subsystems and adds the mod_cluster and JGroups subsystems for a standalone server, so that it can participate in a high-availability or load-balancing cluster.
standalone-full-ha.xml: This is an example configuration for a standalone server. It includes support for every possible subsystem, including those required for high availability.
The server configuration for Messaging is contained in the $EAP_HOME/standalone/configuration/standalone-full.xml or $EAP_HOME/standalone/configuration/standalone-full-ha.xml file for standalone servers. The element in the server configuration file contains all JMS configuration.
It says, full config also include sub config:
standalone-full.xml has standalone.xml
standalone-full-ha.xml has standalone-ha.xml
If you configured standalone-full.xml instead of standalone.xml,- then you have to choose it while you start JBoss service.
./standalone.sh -c standalone-full.xml
If you do it in JBoss Developer Studio then you should choose standalone-full.xml instead of standalone.xml in the Server Config.
Is there any way to restart JMS in running JBOSS.
Use the web-console, admin-console or jmx-console depending on which version of jboss you are using. They are deployed in the default JBoss server config.
http://localhost:8080/admin-console
You may want to set the passwords though..
http://community.jboss.org/wiki/SecureJBoss