Contexts and Dependency Injection (CDI) (JSR 299) defines a set of services for the Java EE environment that makes applications much easier to develop. It provides an architecture that allows Java EE components such as servlets, enterprise beans, and JavaBeans to exist within the lifecycle of an application with well-defined scopes.
F.Marchioni
How to create a MDB 3.0 singleton ?
You can specify the maximum number of JMS Sessions that are available to concurrently deliver messages to an MDB using the maxSession property. Here is an example: @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = “maxSessions”, propertyValue = “1”), @ActivationConfigProperty(propertyName = “destinationType”, propertyValue = “javax.jms.Queue”), @ActivationConfigProperty(propertyName = “destination”, propertyValue = “TASK.QUEUE”) }) public class BuildTasksMessageListener implements MessageListener { … Read more
How to use environment variables in persistence.xml ?
In this short tutorial we will show how to use variables in your persistence.xml so that you can dynamically specify the data source which is used by our application. In WildFly the simplest and most elegant way to do that is enabling the property replacement in the ee subsystem, as in the following example: <subsystem … Read more
What is a Web Service One Way invocation?
Most of the message-exchange-patterns are request-response ones; however in some scenarios oneway invocations are preferred, as the client does not expect any actual data in the response from the server. In such cases, the server is instructed that no SOAP response message has to be sent back to the client, whose low-level invocation is immediately … Read more
How do I reload dynamically my jsp from an EAR ?
Deploy your JSP as part of an application deployed in exploded format. (That is create a folder named yourapplication.ear’ and inside it create a folder yourwebapplication.war). This is the suggested deployment’ strategy when you’re developing your applications because changes to the JSP pages take effect immediately. Therefore, you don’t need to redeploy the application nor … Read more
SOAP Web services on WildFly made simple
JAX-WS simplifies the development model for a web service endpoint a great deal. In short, an endpoint implementation bean is annotated with JAX-WS annotations and deployed to the server. The server automatically generates and publishes the abstract contract (i.e. wsdl+schema) for client consumption. All marshalling/unmarshalling is delegated to JAXB. You can follow two approaches for … Read more
Introduction to Drools Rules
This tutorial provides an introduction to JBoss Drools, covering the core concepts, how to bootstrap a Drools project, how to code a simple Drool rule file and which tools can be used to run the Drools runtime engine Drools in a nutshell Drools is a business-rule management system with an inference-based rules engine, which allows … Read more
How to create an Index on your Entity Beans?
An index is a data structure such as B-Tree that improves the speed of data retrieval on a table at the cost of additional writes and storage to maintain it. When using plain SQL, to add an index for a column or a set of columns, you use the CREATE INDEX statement as follows: CREATE INDEX … Read more
How to navigate and edit a JSON Document with JSON Pointer API
This tutorial will teach you how to navigate or modify a JSON Document using a JSON Pointer, which is available in javax.json API. Put it simply, a JSON Pointer is a string that references an element within a JSON document. By using a JSON pointer, an application can retrieve a value, but it can modify … Read more
How to capture Data changes with Debezium
This tutorial will teach you how to use Debezium to capture changes from a Database. When a change happens in the database, you will see the resulting event streams captured by a Microprofile compatible Quarkus applications. Debezium is a set of connectors for Apache Kafka Connect. Each connector ingests changes from a different database by … Read more