How to test SOAP Web Services

This tutorial will teach how to test SOAP Web Services using open source testing tools or Java testing frameworks. Coding our SOAP Web Service Let’s start from the definition of our JAX-WS Web Service contract: @WebService public interface AccountWSItf { @WebMethod public String newAccount( String name); @WebMethod public String withdraw(String name, long amount) throws RuntimeException; … Read more

How to set EJB timeout period ?

EJBs support two types of transaction management: Container managed and Bean managed. Container managed transactions provide a transactional context for calls to bean methods, and are defined using Java annotations or the deployment descriptor file ejb-jar.xml. Bean managed transactions are controlled directly using the Java Transaction API (JTA) . In both cases, you can set … Read more

JBoss run out of Connections ? here is how to fix it

Have you got No ManagedConnections available error message ? … javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/MyDataSource … javax.resource.ResourceException: IJ000655: No managed connections available within configured blocking timeout (30000 [ms]) In this tutorial we will learn which are the possible causes to this problem. # 1  Your connection pool is too small Increase … Read more

How to capture your Application alerts in a Slack channel

Slack is a channel-based messaging platform which can be used to help people to effectively work together, connect their software tools and services, and find the information they need within a secure, enterprise-grade environment. In this tutorial you will learn how to forward application alerts to a Slack channel so that your team can get … Read more

How to monitor JBoss CPU usage like a pro

In this tutorial we will learn which options can be used to monitor the CPU usage of JBoss / WildFly threads. CPU monitoring can be done in several ways, we however recommend using a free tool like JVisualVM or JConsole to collect this data. Monitoring WildFly CPU usage with JVisualVM VisualVM is a free tool … Read more

JBoss Datasource HA configuration made simple

JBoss / WildFly Datasource High availability was a feature available in older JBoss AS versions (namely JBoss AS 4 and 5). The current version of the application server still allows to use some HA strategies, although the best practice to implement HA at Database level, by clustering your Database. Clustering the Database refers to the ability … Read more

Configuring NetBeans with WildFly

This tutorial shows how you can configure NetBeans IDE with WildFly application server. NetBeans IDE is an open-source integrated development environment. NetBeans IDE supports development of all Java application types (Java SE (including JavaFX), Java ME, web, EJB and mobile applications) out of the box. Start by downloading the latest release of NetBeans from https://netbeans.org/downloads/ … Read more

EntityListeners in your Entity made simple

It is often useful for the application to react to certain events that happen inside the persistence mechanism. The JPA specification provides a simple mechanism for that: you can add the  @EntityListeners annotation to capture persistence events in callback methods. Example: Consider the following Note class: import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; … Read more