How to connect to a DataSource from a remote client?

WildFly and JBoss EAP 6/7 no longer support remote JNDI lookup of datasource objects. If you attempt to lookup a Datasource object from a remote client, the following error will be thrown: ERROR: org.jboss.remoting3.MessageCancelledException Exception in thread “main” org.jboss.naming.remote.protocol.NamingIOException: Failed to lookup [Root exception is java.io.NotSerializableException: org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] As an alternative, it is recommend using an … Read more

Using Bean Managed Transactions (BMT) in Java EE applications

In a Bean Managed Transaction (BMT), the code in the EJB or Message Driven Bean explicitly marks the boundaries of the transaction. Although beans with container-managed transactions (CMT) require less coding, they have one limitation: When a method is executing, it can be associated with either a single transaction or no transaction at all. If this … Read more

How to use failover and distributed Realms in Elytron

In this tutorial we will learn how to create failover and distributed Elytron Realms to add resilience and distribution to your identity lookup. The option to stack multiple login modules is already available in the legacy Security Model. As the legacy security model is soon going to be deprecated, all the missing features are now … Read more

Message Driven Bean example

A Message Driven Bean (MDB) is an asynchronous message consumer. The MDB is invoked by the container as a result of the arrival of a message at the destination that is serviced by the MDB. In this tutorial you will learn how to code a simple MDB and and a Client to interact with.

Read more

How to configure JBoss to bind to a different IP ?

If you want to change the jboss.bind.address property use the “-b” option in when calling the JBoss startup script (run.sh or run.bat in the bin directory). On WildFly and JBoss EAP you can bind the public interfaces using: standalone.sh -b 192.168.0.1 On the other hand, you can bind Management Interfaces using: standalone.sh -bmanagement 192.168.0.1 Older JBoss versions (4-5-6): … Read more

3 ways you can connect to MongoDB from WildFly – JBoss EAP

In this updated tutorial we will learn some possible ways to use MongoDB NoSQL Database from within an application server like WildFly or JBoss EAP. 1) Using the MongoDB Java Driver The most common way to connect to MongoDB from Java applications is by means of the MongoDB Java Driver which provides a simple and … Read more

How to create a Queue with Jmx Console ?

NOTE: The JMX Console is a tool used to manage JBoss AS 5. If you are running the newer version of the application server, follow up on this tutorial: JBoss JMS configuration Bring up the JMX Console in your browser and look for the section labelled jboss.mq in the main agent view. Click on the link … Read more