Automatically reconnect to a database after a failure in JBoss EAP 7

My JBoss EAP 7 server couldn’t cope with a failing database. After a database restart or failure, e.g. due to maintenance, it simply would not connect to the database again automatically. The application simply stopped working as soon as the database was unavailable for a short period of time. JBoss’s server.log was full of (not … Read moreAutomatically reconnect to a database after a failure in JBoss EAP 7

How to enable access logging (accesslog) in JBoss EAP 7

Configuring JBoss EAP 7 to write an access log (e.g. like Apache webserver) is quite easy with the CLI: /subsystem=undertow/server=default-server/host=default-host/setting=access-log:add If you need any additional configuration, take a look at this: Wildfly 10.0.0.Final Model Reference. For example, to change the prefix of the log’s file name: /subsystem=undertow/server=default-server/host=default-host/setting=access-log:write-attribute(name=prefix, value=”my_access”) Alternatively, you could change the configuration in … Read moreHow to enable access logging (accesslog) in JBoss EAP 7

How to test a REST API with Arquillian

Testing a REST API on a real application server with Arquillian is easy – if you know what you need to do 😉 I have this simple REST service, that authenticates a user: @POST @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public Response authenticateUser(final UserData userData) { … return Response .status(401) .entity(false) .build(); } Let’s write a test for this … Read moreHow to test a REST API with Arquillian

How to test JBoss EAP 7 with Arquillian

It took me quite some time to get my Arquillian tests running against a remote JBoss EAP 7.0.0.Beta1 application server, so I thought I’d share my configuration. At the time of this writing, there was no Arquillian container adapter for JBoss EAP 7 available. So I had to use the Arquillian Chameleon Container. However, it … Read moreHow to test JBoss EAP 7 with Arquillian

How to create and deploy a web service with Java EE 7 and Wildfly 9

Apparently, creating and deploying an web service with Java EE 7 is just as easy as it was with Java EE 6. This maybe due to the fact, that support for web services and SOAP in JAX-WS hasn’t changed much since Java EE 6, as Adam Bien points out here: The State of SOAP / … Read moreHow to create and deploy a web service with Java EE 7 and Wildfly 9